2005 Dec 12 12:27 PM
I want to use BAPI_PO_CREATE1 for doc_type NBAR but i didn't succeed getting the right fields from the contract. It has to act like CREATE PURCHASE ORDER with REFERENCE TO CONTRACT. Help me!
2005 Dec 13 12:41 PM
In the BAPI the POHEADER and the POHEADERX have to be filled giving appropriate values for COMP_CODE, DOC_TYPE, PURCH_ORG, PUR_GROUP, CURRENCY, DOC_DATE, SUPPL_PLNT..
If any number of items are created then the POITEM and POITEMX data has to be given.
Since it is a contract the schedule data of the items should also be given i.e. the POSCHEDULE and the POSCHEDULEX data in which the PO_ITEM and the DELIVERY_DATE have to be given. And the POACCOUNT and POACCOUNTX have to be filled in with the respective values.
Whatever fields are filled in POHEADER, correspondingly the fields in POHEADERX take the value 'X'.
In POITEM table if there are 4 items then the POITEMX also has 4 items with PO_ITEM taking the same value in both the tables and the rest of the fields depending on the requirement in POITEM and 'X' in POITEMX.
In POACCOUNT and POACCOUNTX the serial no. should be the sequential number of account assignment.
The PO_ITEM field in all the item tables i.e. POITEM,POITEMX,POSCHEDULE,POSCHEDULEX,POACCOUNT,POACCOUNTXis generated programatically.
2005 Dec 13 8:28 AM
Addition:
To create a purchase order with REFERENCE TO CONTRACT with order_type NB (Standard PO) gives us also some problems. When you create a PO with ME21 you only have to fill the order_type and PO date. After that fill the agreement and agr.item and you can start creating...
What fields do i need with the BAPI ?
2005 Dec 13 12:41 PM
In the BAPI the POHEADER and the POHEADERX have to be filled giving appropriate values for COMP_CODE, DOC_TYPE, PURCH_ORG, PUR_GROUP, CURRENCY, DOC_DATE, SUPPL_PLNT..
If any number of items are created then the POITEM and POITEMX data has to be given.
Since it is a contract the schedule data of the items should also be given i.e. the POSCHEDULE and the POSCHEDULEX data in which the PO_ITEM and the DELIVERY_DATE have to be given. And the POACCOUNT and POACCOUNTX have to be filled in with the respective values.
Whatever fields are filled in POHEADER, correspondingly the fields in POHEADERX take the value 'X'.
In POITEM table if there are 4 items then the POITEMX also has 4 items with PO_ITEM taking the same value in both the tables and the rest of the fields depending on the requirement in POITEM and 'X' in POITEMX.
In POACCOUNT and POACCOUNTX the serial no. should be the sequential number of account assignment.
The PO_ITEM field in all the item tables i.e. POITEM,POITEMX,POSCHEDULE,POSCHEDULEX,POACCOUNT,POACCOUNTXis generated programatically.
2005 Dec 14 10:56 AM
Thanks Radhika,
I used most off the structures but i didn't use POACCOUNT(X). This may be the problem.
2005 Dec 14 3:27 PM