I am trying to convert my old IDoc type PORDCR to newer IDoc type PORDCR1. PORDCR uses BAPI_PO_CREATE whereas PORDCR1 uses BAPI_PO_CREATE1.
In BAPI_PO_CREATE, I pass the following values:
PO_ITEMS-PO_ITEM = '00010'
PO_ITEMS-ACCTASSCAT = '3'
PO_ITEM_ACCOUNT_ASSIGNMENT-PO_ITEM = '00010'
My G/L account as well as Cost center gets determined and populates in the PO successfully.
In BAPI_PO_CREATE1, I am passing the following values:
POITEM--ACCTASSCAT = '3'
POITEMX--ACCTASSCAT = 'X'
POACCOUNT-PO_ITEM = '00010'
The G/L account gets determined, but cost center does not get determined. Hence throws an error in the BAPI - ME 083 : Enter cost center
The cost center determination happens via OKB9 transaction. BAPI_PO_CREATE seems to pick up the configuration values from here whereas BAPI_PO_CREATE1 does not.
Is BAPI_PO_CREATE1 designed NOT to pick up values from OKB9? Or Am I missing some other parameter to pass in the BAPI?
Any clue/hint is much appreciated. (I am in IS-Retail solution EhP 5)