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: 

How to create PO with reference to Pr through BAPI

Former Member
0 Kudos

Hi everybody

I wanted to create PO with reference to PR through BAPI_PO_CREATE (4.6c), but i found there is no field to set PR info in the parameter. Is the bapi right for this case, or there are other functions?

THANKS FOR ANY ADVICE!

Best regards,

Egg

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If u want to maintain PR field in the BAPI_PO_CEATE,

then in the FM, there is PO_ITEM_SCHEDULES table, where you have the PR field named,

PREQ_NO BANFN Purchase Requisition Number

PREQ_ITEM Item Number of Purchase Requisition

There you can maintain PR data.

Thanks,

Bhawani

5 REPLIES 5

Former Member
0 Kudos

Hi,

If u want to maintain PR field in the BAPI_PO_CEATE,

then in the FM, there is PO_ITEM_SCHEDULES table, where you have the PR field named,

PREQ_NO BANFN Purchase Requisition Number

PREQ_ITEM Item Number of Purchase Requisition

There you can maintain PR data.

Thanks,

Bhawani

0 Kudos

Hi Bhawani !

I find the fields and I think I can solve the problem now. Many thanks!

Best regards,

Egg

Former Member
0 Kudos

Hi,

use the transaction ME59 to create a PO with reference to PR..

use call transaction to ME59 and pass the PR number in the bdc data..

Thanks

Naren

Former Member
0 Kudos

you should call new BAPI: BAPI_PO_CREATE1

0 Kudos

Hi abappers!

I'm using bapi BAPI_PO_CREATE1 to create PO with reference to one or more PR. I have a problem with document date:

If the delivery date of the PR is lower than creation date of PR, the document date of the PO is the delivery date (lower than sy-datum).

If the delivery date of the PR is the same or higher than creation date of PR, the document date of the PO is the creation date of PR (sy-datum or high).

I'm trying to change this date in poheader-doc_date, but the system ignores me. I'm sure this is the correct variable, because I use it to create other PO's without reference.

Another thing confuses me is that if I create the PO with reference to the same PR from ME21N, the system doesn't allow me to indicate a document date lower than sy-datum.

Thanks in advance,

Jorge