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.
cancel
Showing results for 
Search instead for 
Did you mean: 

Account xxxxx requires an assignment to a CO objectu201D error in BAPI_ACC_DOCU

Former Member
0 Kudos

FI document posting failed due to

Error u201CAccount xxxxx requires an assignment to a CO objectu201D

When passing data through BAPI_ACC_DOCUMENT_POST.

While creating the document through F-41 if the Product No (ARTNR) and

customer (KNDNR) are not passed through profitability segment the same

error will be thrown.

The BAPI_ACC_DOCUMENT_POST does not have any direct field to pass

Product No (ARTNR) and customer (KNDNR). Tried to pass

the ARTNR and KNDNR through the table parameter CRITERIA. Still the

same error is showing and document failed to post.

Following notes related to FI_DOCUMENT post applied 769308 and 716783.

Please provide any note or documentation for the BAPI_ACC_DOCUMENT_POST

while handling CO-PA assignment.

Thank you

Thomas

4 REPLIES 4

Former Member
0 Kudos

Hi,

I have come across this error.And it occurs if you donoy pass cost centre while creating an FI document.If you would try to post through FB01,you would get teh sam error.Please confirm from the Functional Owner,if this particular GL accounts requires a cost centre.

TC

0 Kudos

Thank you for the reply.

I checked with FI consultant

Cost centre not required for the GL A/C.

This business scenario require PROFITABILITY SEGMENT.

if i am passing PROFITABILITY SEGMENT - Product number and custome in F-41 the document is getting posted.

But throug BAPI_ACC_DOCUMENT_POST its failing.

I failed to find any direct field in export or table parameter in BAPI to pass

Profitability segemnt and the values (ARTNR and KNDNR).

Edited by: Thomas Paul on May 19, 2011 8:38 AM

0 Kudos

Hi thomas ,

Its some thing related with the Costing , certain (vendors invoices or materials ) have been assigned to certain Cost Objects .

Please Contact wid CO consultant or FI .

Hope it helps .

Regards

Swapnil Kamble

Former Member
0 Kudos

by passing the Profitability sgement to the BAPI table criteria the issue is sorted out.

Fill the criteria

ls_criteria-itemno_acc = li_item.

ls_criteria-fieldname = 'ARTNR'.

ls_criteria-character = ls_acc-material.

APPEND ls_criteria TO lt_criteria.

ls_criteria-itemno_acc = li_item.

ls_criteria-fieldname = 'KNDNR'.

ls_criteria-character = ls_acc-customer.

APPEND ls_criteria TO lt_criteria.

******

pass the bapi with criteria table

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

EXPORTING

documentheader = ls_doc_header

IMPORTING

obj_type = lc_obj_type

obj_key = lc_obj_key

obj_sys = lc_obj_sys

TABLES

accountgl = lt_acc_gl

accountpayable = lt_acc_payable

currencyamount = lt_curr_amount

" Newly added for profitability segement

criteria = lt_criteria

return = lt_return

accountwt = lt_acc_wt.