Application Development and Automation 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: 
Read only

BAPI : BAPI_PO_CREATE

Former Member
0 Likes
527

hello everybody,

I am creating PO's using BAPI_PO_CREATE. I want to update the material document created for this PO during this BAPI. Is this possible and if yes how do I do it.

For reference - the material document no. is stored in EKBE as BELNR.

Note : I am creating the material document for this PO b4 creating the PO using MB1C. So now i need to update the PO with this created material documents.

Regards

Swanand

3 REPLIES 3
Read only

christian_wohlfahrt
Active Contributor
0 Likes
463

Hi Swanand,

if I remember correctly, it's possible to create POs automatically during goods receipt (by customizing...). If so, it's much better to change this PO later with BAPI_PO_CHANGE.

I don't recommend to 'manually' link these documents afterwards.

If you're already booking goods receipt by own program, switch order of these two steps. Then goods receipt with reference to PO is possible - if you run into performance problems, do both later offline (e.g. with storing info in Z-tables).

Regards,

Christian

Read only

0 Likes
463

hello christian,

my requirement is as follows....

I have a custom screen where in user enters some material and qty and i using custom tables calculate the value depending on conditions. Also simultaneously i do a goods receipt at this point using BAPI's.

My next requirement is i shud use this calculated value in my PO and also link this above created material document to the PO. so i use the BAPI_PO_CREATE. I am thru the majority part except the linking of PO and material document since i want the standard interface of SAP wherein when i go in a PO i cana double click and view the material document.

Regards

Swanand

Read only

christian_wohlfahrt
Active Contributor
0 Likes
463

Hi Swanand,

so your current process flow looks like this:

a) data is entered

b) calculation

c) goods receipt (GR) like MB1C

d) purchase order (PO)

e) link them

Do instead

a) data is entered

b) calculation

c) PO

d) GR with reference to PO like MB01

Then you will have a correct link between your documents.

Regards,

Christian