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 All,
I have a doubt regarding the logic behind declaring a separate BAPI structure for import paramters and use it.
Let me explain you clearly,
Whenever we pass an import parameter(like vendor number/sales order number) to an normal function module we declare it using either like/type referring to an existing dictionary structure field. but when the number of import parameters increase we may think of creating a single structure with all and use it for simplicity.
But when it is the case with a BAPI, it is suggested that we create a structure even when we have single import parameter.
for example.
supposing that we create a normal function module to get the details of a given Vendor, then we declare the import parameter as below
VENDORNO LIKE LFA1-LIFNR
But if we observe the BAPI_VENDOR_DISPLAY, We find that declaration for the same as
<b>VENDORNO like BAPIVENDOR_ID-VENDOR_NO,
where BAPIVENDOR_ID is a separate BAPI sturcture created and assocaited only with Business object "Vendor".</b>
I tried it by declaring as for a normal FM, even then it work fine.
Now my question is,
If SAP Suggests that we have a separate structure for all import parameters starting with name BAPI and use only those fields to reference with,
what is the logic/reason behind asking so.
I had created a BAPI with paramters referring to standard database fields like
VENDORNO like LFA1-LIFNR and it is still working
I had also written interface programs using VB/ .NET to access the data from my own BAPI and standard BAPI's and both were working alike.
so anyone <b>please give me the reason/logic behind declaring a separate BAPI stuture for all the import parameters</b> to be used in a method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 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.