‎2010 Nov 25 2:57 PM
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,
‎2010 Nov 30 8:30 PM
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.
‎2010 Nov 30 4:44 PM
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.
‎2010 Nov 30 8:30 PM
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.
‎2010 Nov 30 8:31 PM
Ended up being a data issue, had to debug to see the plant was not setup correctly in the company