03-16-2011 5:08 PM
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.
BTW,
1: i have simulate the data which passed via ME22N,it work perfectly.
2:i also check the data in debug mode.it 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.
03-16-2011 6:35 PM
This problem may be as easy as missing leading zeros in front of G/L account or cost center.
Regards,
Chaiphon
03-17-2011 1:57 AM
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.
BR
Sam
03-17-2011 3:54 AM
03-17-2011 4:22 AM
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'.
03-17-2011 4:38 AM
HI Sam,
Try to show this error to your functional people. [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm|http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm] This link for deletion of po. Check if it is useful.
Regards,
Madhu.
Edited by: madhurao123 on Mar 17, 2011 5:39 AM
03-17-2011 5:36 AM
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.
BR
Sam
03-17-2011 4:59 PM
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.
BR
Sam
03-21-2012 12:56 PM
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?