07-02-2007 10:47 AM
Hi,
can anybody give me an advice how to use the function BAPI_PO_CREATE1
to create stock transport orders?
I´m getting some errors when I run it. Here is my test data I have used:
poheader-comp_code: NO10
poheader-doc_type: UB
poheader-langu: EN
poheader-purch_org: NO10
poheader-pur_group: 999
poheader-suppl_plnt: 2041
in poheaderx I have set a flag for the filled fields.
poitem-po_item: 00010
poitem-short_text: test
poitem-material: 100230
poitem-plant: 2001
poitem-quantity: 1
poitem-po_unit: CYL
poitem-conv_num1: 1
poitem-conv_den1: 1
poitem-prnt_price: X
poitem-unlimited_dlv: X
poitem-item_cat: U
poitem-acctasscat: K
poitem-gr_ind: X
poitem-ir_ind: X
poitem-gr_basediv: X
poitem-preq_name: TEST
I´m getting the following errors in the return table:
ID Num: 000 PO could not be creating using Enjoy-BAPI
E ID MEPO Num: 002 PO header still faulty
E ID 06 Num: 098 Please enter supplying plant
E ID ME Num: 018 Item category U can only be used with material
W ID ME Num: 040 Can delivery date be met?
E ID ME Num: 083 Please enter G/L account no.
Any ideas how I can create one successfully?
Cheers
07-02-2007 11:31 AM
07-02-2007 11:34 AM
hi,
Have you been through the documentation of BAPI_PO_CREATE1 ? If not
goto SE37 and see it , You might get idea for mandetory parameters.
Reward if useful!
07-02-2007 11:37 AM
I have exactly the same problem and I have seen the documentation,
but I can´t figure out, which of the million parameters has to be filled and
sometimes how.
Maybe anybody has a sample program for creating a simple stock transfer
order with BAPI_PO_CREATE1?
07-02-2007 11:42 AM
Hi all,
Please go through below link may help you,
/people/sap.user72/blog/2005/03/22/sample-code-to-create-purchase-order-using-bapi-in-r3
Reward if useful!
07-02-2007 11:58 AM
Hey,
for me it does not help, because this is a sample for creating a standard
purchase order, but I have to create a stock transport order.
It must be possible by online using:
plant from
plant to
material
quantity
unit
And for that I have to use doc_type UB, right? I can´t find an example for creating
stock transport orders with BAPI_PO_CREATE1 and I´m also getting very similar error messages to Michael...
07-02-2007 12:37 PM
Hi,
poitem-po_item: 00010
poitem-short_text: test
poitem-material: 100230
poitem-plant: 2001
poitem-quantity: 1
poitem-po_unit: CYL
poitem-conv_num1: 1
poitem-conv_den1: 1
poitem-prnt_price: X
poitem-unlimited_dlv: X
poitem-item_cat: U
poitem-acctasscat: K
poitem-gr_ind: X
poitem-ir_ind: X
poitem-gr_basediv: X
poitem-preq_name: TEST
fill the corresponding fields in POITEMX table also with 'X'!
Regards,
Sooness.