Skip to Content
author's profile photo
Former Member

How to create PO with reference to Pr through BAPI

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Oct 12, 2007 at 04:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 12, 2007 at 04:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 17, 2007 at 12:46 PM

    you should call new BAPI: BAPI_PO_CREATE1

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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