on 07-21-2004 9:47 AM
Hello Friends,
I am basically a J2ee developer and very new to ABAP Programming language, and need to do some BAPI call through ABAP. I am having a following problem, and I am very thankful to some one who can help me out !
The problem is:
For example
DATA : MY_NUMBER LIKE BAPIRET2- NUMBER,
MY_TEXTFORMAT LIKE BAPITGA-TEXTFORMAT,
correct me if I am wronge, BAPIRET2- is an internal-table or structure and - NUMBER, is its attribute, ? if its true then,
1) Do we alwayas need for each BAPI to define its parameter and initilize with LIKE to the attribute of the internal database table ?
2) how do I come to know that, for which bapi which internal database table I have to use from SAP SYSTEM ?
I have already looked in many articals of BAPI, but did not help me much,
Thanks in advance
Haider Syed.
Hi Syed,
BAPI's are basically fucntion modules which have some import and export parameters. some of these parameters are optional and some are not. You will have to pass mandatory parameters and for that you will have to define variables.
<correct me if I am wronge, BAPIRET2- is an internal-<table <or structure and - NUMBER, is its attribute, ? if <its <true then,
yes you are right BAPIRET2 is an standard structure for passing messages. each BAPI returns a table of type BAPIRET2. NUMBER is a field for message number.
<how do I come to know that, for which bapi which <internal database table I have to use from SAP SYSTEM ?
you can check the function module related to BAPI and see what parameters it accepts.
hope it helps,
Komal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Komal,
Thanks for your reply.
It does help me But, I am having a problem of figuring out, through which internal table's attribute I have to initilze the variables of BAPI. :)... AS I am very new to ABAP world, I have no idea where to look in, for the internal table (attributes) for a certain bapi ?
Please advise me any artical or if you have any electronic material, please do send me in this regard.
Many thanks,
Haider Syed.
Hi Syed,
standard table for bapis is 'BAPI'. you can go to that transaction. there is a list of BAPI's available there you can search your BAPI from there you can find name of function module for that BAPI.
you can see that function module in SE37 transaction.
here you can see various parameters and their tpyes. for example
COMPANYCODEID LIKE BAPI0002_2-COMP_CODE.
from there you can check type of parameter.
If you want documentation on BAPIs then i can send you.
Have you used function modules in ABAP.
Regards,
Komal
Hello Komal,
Thankyou very much for your reply,
I have selected the bapi( with which I am intrestd to do work) through BAPI explorer e.g. Debtor under Financial Accounting. Now I am intrested to call the function module or BAPI "GetDetail" and "Find" of the object type 'Debtor'. I am confused with which structure or internal table's attribute I should initilize the parameters(import, export etc) of the function module "GetDetail" in oder to call it.
It would be nice of you, if you please send me the documentation on BAPIs, here. hayder_zaidi@yahoo.com.
So nice of you !
With Regards,
Haider Syed.
Hi Syed,
Do you want to call these BAPIs from ABAP or from JAVA?
From ABAP - it is pretty simple. You just can do something like that:
*----
REPORT z_mi_test .
DATA: l_debtorid TYPE bapi1007-customer.
DATA: ls_debitor_general_detail TYPE bapi1007_4.
l_debtorid = '0000000001'.
CALL FUNCTION 'BAPI_DEBTOR_GETDETAIL'
EXPORTING
debtorid = l_debtorid
COMPANYCODE =
IMPORTING
debitor_general_detail = ls_debitor_general_detail
DEBITOR_COMPANY_DETAIL =
RETURN =
TABLES
DEBITOR_BANK_DETAIL =
.
*----
This function module 'BAPI_DEBTOR_GETDETAIL' corresponds to the method 'GetDetail' of Buisness Object 'Debtor'.
The types of IMPORT/EXPORT/TABLES parameters of the function module you can just see in SE37. Just start this transaction enter the name of the Function Module, like 'BAPI_DEBTOR_GETDETAIL. Or you just can navigate to this transaction when making double click on the Function Module name in BAPI explorer.
Anyway, you can find the types of the parameters on the corresponded tab strips Import, Export and Tables.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.