Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 


Former Member
0 Kudos

Hi Gurus,

I am using the BAPI_PO_CHANGE to change the account assignment categeory from blank to cost center 'K'. The BAPI is throwing an error :

"Account 50010101 requires an assignment to a CO object".

but I have already passed the CO objects.


1: i have simulate the data which passed via ME22N,it work perfectly.

2:i also check the data in debug has been passed into the function correctly

3:i also populated the parameters into the BAPI import parameters poaccountx

4:i try to change the other datas such as delivery schedule,price,quantity.the BAPI also work.

does anybody have any hints to solve this issue? kindly thanks in heart.


0 Kudos

This problem may be as easy as missing leading zeros in front of G/L account or cost center.



Former Member
0 Kudos

Hi Chaiphon Pulnitiporn :

thanks for your answer.i have called the CONVERSION_EXIT_ALPHA_INPUT function and i have debug the code that the GL account has been filled with the leading zero .so was costcenter.



Active Contributor
0 Kudos


what all paramters aer you passing to the BAPI...?

0 Kudos

Hi niraj gadre:

for the account data,i passed the below:

MOVE-CORRESPONDING it_po_account TO lt_po_account.

lt_po_accountx-po_item = it_po_account-po_item.

lt_po_accountx-serial_no = it_po_account-serial_no.

lt_po_accountx-po_itemx = 'X'.

lt_po_accountx-serial_nox = 'X'.

lt_po_accountx-delete_ind = 'X'.

lt_po_accountx-quantity = 'X'.

lt_po_accountx-net_value = 'X'.

lt_po_accountx-gl_account = 'X'.

lt_po_accountx-costcenter = 'X'.

lt_po_accountx-co_area = 'X'.

lt_po_account-asset_no = 'X'.

lt_po_account-orderid = 'X'.

0 Kudos

HI Sam,

Try to show this error to your functional people. [|] This link for deletion of po. Check if it is useful.



Edited by: madhurao123 on Mar 17, 2011 5:39 AM

0 Kudos

Hi madhurao:

thanks for your suggestions.

actually, i am the function consultant too.

all the configuration was work normally from the persepcts of functional consultant.

again, thanks for your effort, i have raised a ticket to SAP and hope get the answer soon.

any update i will keep you all posted.



Former Member
0 Kudos

Hi All:

althought i still do not receive the reply from SAP, I am sure i rooted the caused that was the program error.

correct the program

L2012F25 Line 502

replace with " IF sy-subrc IS INITIAL. "

correct the program

L2012I03 line 35

insert "lo_acct TYPE REF TO if_purchase_order_account_mm,"

line 74

insert " mmpur_dynamic_cast1 lo_acct io_model."

after that.the BAPI work perfectly.

hope it can help you all and the other persons.



0 Kudos

Hi sam,

I have countered the same error,  when appending a new item with account assignment WBS , error message shows I didn't input a CO object. But the replacement line no. you gave is wrong in my system, because there is patch notes in the code, so I cannot check why the code goes wrong and convince the team to change code.

Could you give me some more information?