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

Error in BAPI_PO_CREATE1

Former Member
0 Likes
898

Hello,

We have had a new plant setup in SAP and I have been tasked with figuring out why it doesn't work...

This is an existing program we have that has been working for quite some time, it is failing at a point were it is trying to create a STO (Stock Order) and it is failing within this BAPI

Here is what were are passing


  CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
      poheader                     = gs_poheader
      poheaderx                    = gs_poheaderx
*   POADDRVENDOR                 =
*   TESTRUN                      =
*   MEMORY_UNCOMPLETE            =
*   MEMORY_COMPLETE              =
*   POEXPIMPHEADER               =
*   POEXPIMPHEADERX              =
*   VERSIONS                     =
*   NO_MESSAGING                 =
*   NO_MESSAGE_REQ               =
*   NO_AUTHORITY                 =
*   NO_PRICE_FROM_PO             =
    IMPORTING
      exppurchaseorder             = gv_sto
*   EXPHEADER                    =
*   EXPPOEXPIMPHEADER            =
    TABLES
      return                       = lt_return
      poitem                       = gt_poitem
      poitemx                      = gt_poitemx
*   POADDRDELIVERY               =
      poschedule                   = gt_poschedule
      poschedulex                  = gt_poschedulx
*   POACCOUNT                    =
*   POACCOUNTPROFITSEGMENT       =
*   POACCOUNTX                   =
*   POCONDHEADER                 =
*   POCONDHEADERX                =
*   POCOND                       =
*   POCONDX                      =
*   POLIMITS                     =
*   POCONTRACTLIMITS             =
*   POSERVICES                   =
*   POSRVACCESSVALUES            =
*   POSERVICESTEXT               =
*   EXTENSIONIN                  =
*   EXTENSIONOUT                 =
*   POEXPIMPITEM                 =
*   POEXPIMPITEMX                =
*   POTEXTHEADER                 =
*   POTEXTITEM                   =
*   ALLVERSIONS                  =
*   POPARTNER                    =
            .

Here are the errors it is returning.:

E BAPI 001 No instance of object type PurchaseOrder has been created. External reference:

E MEPO 000 Purchase order still contains faulty items

E 06 849 Customer does not exist (please change entry in plant 1081)

Thank you,

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
678

Just check the documentation whether this bapi is suitable for the account assignment category you mentioned.

pass customer number,profit center,cost center etc with leading zeros.

3 REPLIES 3
Read only

tushar_shukla
Active Participant
0 Likes
678

Keith,

Have you looked at the 3rd error message, this seems to be an configuration issue.

E 06 849 Customer does not exist (please change entry in plant 1081)

Try to create the PO with same data via ME21n and see if you get the same error.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
679

Just check the documentation whether this bapi is suitable for the account assignment category you mentioned.

pass customer number,profit center,cost center etc with leading zeros.

Read only

Former Member
0 Likes
678

Ended up being a data issue, had to debug to see the plant was not setup correctly in the company