Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Stock transport order with BAPI_PO_CREATE1

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

Have you tried BAPI_PO_CREATE?

Arne Hein

Former Member
0 Kudos

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!

0 Kudos

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?

Former Member
0 Kudos

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!

0 Kudos

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...

dev_parbutteea
Active Contributor
0 Kudos

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.