06-15-2012 7:00 PM
Environment: IS-Retail solution EhP 5.
Hi,
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'
POACCOUNTX-PO_ITEM='00010'
POACCOUNTX-PO_ITEMX='X'
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
My observation:
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.
My question:
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.
- Raj
06-18-2012 7:59 PM
I found the answer myself. It's a config. setting in account assignment.
MM —> Purchasing —> Account Assignment —> Maintain Account Assignment Categories
There is a flag by name 'Derive account assignment'.
If you select that flag, automatic cost center determination will happen (OKB9 entries will be picked up)
06-18-2012 10:57 AM
In PO account you can see cost centre field as it is blank you are getting error.So you need to pass cost centre in function module.
BAPI_PO_Create1 will not automatically find the cost centre.
Please crete manually PO with the values what you are passing in function module ,If you are able to crete the PO with out cost centre then you can create the PO with the function module with out passing cost centre.
If not manually you are not able to crete the PO without cost centre then you need to pass the cost centre in function module.
I guess you need to pass cost centre..
06-18-2012 7:59 PM
I found the answer myself. It's a config. setting in account assignment.
MM —> Purchasing —> Account Assignment —> Maintain Account Assignment Categories
There is a flag by name 'Derive account assignment'.
If you select that flag, automatic cost center determination will happen (OKB9 entries will be picked up)