cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_CREATE1 LSMW for Multiple PO's and PO items

former_member233055
Discoverer
0 Kudos

We want to upload Open Purchase orders using LSMW and BAPI_PO_CREATE1, but I can't see how to structure the input from a one to many level between EKKO and EKPO.

The table POITEM only have the key value PO_ITEM (EBELP) and not PO_NUMBER (EBELN),thus if I create two input files on tow levels for header and items, there is no way to indicate which items belong to which header records. This problem is compounded when you add the Pricing conditions (POCOND).

Therefore it looks like you can only upload one PO Header with its various items, unless someone have a workaround for me.

Accepted Solutions (0)

Answers (2)

Answers (2)

daniel_coelho
Explorer

Try to create purchase order manually using me21n and see what it does.
Or continue your LSMW using:
Fill POHEADER-ITEM_INTVL and POHEADERX-ITEM_INTVL as following:
POHEADER-ITEM_INTVL = '0000'.
POHEADERX-ITEM_INTVL = 'X'.
Regards.

JL23
Active Contributor
0 Kudos

You have to distinguish between the data that is coming from your source and the data that is created from the conversion step.

Of course you need to have a common identifier (can be the PO number from legacy system) to let SAP (even more the people who maintain several spreadsheets) know which items belong to which header and which condition to which item.

Using a field in the source structure does not automatically mean it has to be in the target structure too. If you use it just depends on its availability in the target structure and on your field mapping.