I am using the BAPI_INCOMINGINVOICE CREATE for mass creation of logistic invoices.
I am filling the GL Account data for the invoice.
For some GL Accounts I am getting the error: 'Account requires an assignment to CO object'.
I tried passing the production order to the GL Account data but with no success. Does anyone have a solution?
First, if G/L account was created in FI, you can only create primary cost element in CO.
Secondary cost element can only be created if no account exists in FI.
Second, if you created the primary or secondary cost element in CO, you have to assign CO account assignment.
You can delete cost element in CO (KO04) if dependent objects found.
Third, when you create cost element in CO, documents would be also created in Cost center accounting and Profit center accounting when posing in FI. If no cost element exists in CO, no related documents would be created in CCA and PCA.