SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cost center not populated in BAPI_PO_CREATE1

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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)

View solution in original post

2 REPLIES 2

former_member182609
Active Contributor
0 Kudos

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..

Former Member
0 Kudos

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)