‎2006 Aug 17 9:31 AM
Could any one please tell me,
how to pass import/exprot parameters in bapi function module: bapi_po_change for POHEADER, POITEM, POSCHEDULE, POITEMX.... (whether we have to pass through work area or table)
please help me out, its very urgent, am facing lot of difficulties.
‎2006 Aug 17 10:34 AM
Hello Venu
To find out the type of an parameter simply double-click on its "Associated Type". IMPORTING and EXPORTING parameters may be either fields, structures or table types. TABLES parameters are always tables.
- POHEADER = structure
- POITEM = table (because TABLES parameter)
- POSCHEDULE = table (because TABLES parameter)
Now what is the meaning of these "X" parameters like POITEMX? POITEMX is also a table (because TABLES parameters). In field PO_ITEM you have to enter the Item Number of Purchasing Document. All others fields simply define which corresponding field in TABLES parameter POITEM should be updated ('X' = update; ' ' = do nothing).
Example:
- In POITEM you have 10 entries with PO_ITEM = 1 - 10.
- For PO_ITEM = '2' you want to change its short text (field SHORT_TEXT)
Then you have to fill the following fields:
- in POITEM (itab) the entry with PO_ITEM = '2' has in field SHORT_TEXT = <new short text>
- in POITEMX (itab) you add an entry with PO_ITEM = '2' and SHORT_TEXT = 'X'
The logic is the same for IMPORTING parameters POHEADER and POHEADERX. You will find this logic in many BAPIs.
Regards
Uwe