Hi all,
It is told that we have to create a structure in order to pass input values to a BAPI, whether it is via import paramter or tables parameter.
When i tried to declare a import parameter with TYPE declaration also BAPI was generated and worked fine.
<b>Why is it necessary to create a structure to import/export values?</b>
Please throw light on the concept behind declaring the structures
Request clarification before answering.
Hi,
BAPI is an interface to SAP application and can be triggered from external application as well. When an external application wants pass values to parameters it has to read structures of the parameters of BAPI before the BAPI object being generated which is possible only if we declare the parameters with TYPE declarations.
Hope u got the clarity if you need any more clarification please let me know I shall give you more detailed explanation.
Regards
Savitha.
Message was edited by: savitha m
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Seems that I m not clear in asking my Question.
Let me put it this way:
In the Standard BAPI, <b>BAPI_VENDOR_DISPLAY</b> <b>which takes Vendor Number</b> as an import paramter has been delacred as <b>VENDORNO LIKE BAPIVENDOR_ID-VENDOR_NO</b> where BAPIVENDOR is a structure created explicitely for this BAPI.
Not only for this every standard BAPI paramters will have the same rule being followed.
Now my question is
<b>Why is it a structure is created to pass/get parameters to/from a BAPI?</b>
Thanks
Lakshmi
HI,
There is no other option to declare the import/export/tables parameter other than creating a structure.
Suppose you want to create a bapi which accepts a structure with fields name(char 20) and roll number(numc 10 ).
If they are single fields then you can create with referance to char20 and num10 data types,but they must be declared as a structure.How can you declare in a bapi?
If it is a program you can delare whatever we like using data: begin of ..endof statements.
BUt how do we do that in the bapi interface parameter declaration??
We must refer a structure that is not previously there.
That means we have to create it in order to tell the system that the bapi import parameter is of so and so structure.
Hope it clarifies.
REgards,
Ravi
| User | Count |
|---|---|
| 14 | |
| 13 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.