You must differentiate between the following business transactions for the transfer of the profit center to the billing document.
1. Basic determination:
a) With sales documents:
The determination of the profit center is carried out in the sales document item according to the following rules (in ascending order):
1) From the material master (table MARC)
2) Via a substitution
3) By manual entry
4) From a "real" account assignment (profitability segment, cost center, and so on)
b) Without sales documents:
The transfer of the profit center is carried out in the document item according to the following rules (in ascending order):
1) From the material master (table MARC, field MAEPV-PRCTR)
2) By "external" specification
Example of a process without sales documents:
Billing is carried out using the external billing interface (function module GN_INVOICE_CREATE).
Here an "external" specification is the transfer via the communication structure (field KOMFKGN-PRCTR).
2. Conventional business process
The profit center is transferred from the sales document item (field VBAP-PRCTR) to the billing item (field VBRP-PRCTR).
3. Cross-company code business process:
The profit center is transferred from the sales document item (field VBAP-PRCTR) to the intercompany billing item (field VBRP-PRCTR) since the company codes of the document item and document header match in this case.
The profit center is always deleted for the external billing document and a new profit center (the profit center of the billing document) is determined since the company codes of the document item and document header differ in this case.
Redetermination is carried out using a substitution. Therefore, you must maintain and activate a substitution rule in Customizing for the profit center invoice (transaction 0KEL and 0KEM).
This concept ensures that a profit center that can be posted to in the company code of the document header is available for a document item.
Special case:
If the profit center of the billing document (field VBAP-PCTRF) is already determined in the sales document item, this profit center is transferred to the external billing item.
4. Customer-specific adjustment:
If you want to transfer the profit center in the billing document differently from the concept described, you use transaction VOFM to create a data transport routine RV60C6XX or you enhance the routine already in use as described in the attached solution proposal.