Symptom
You post journal entry with app Post General Journal Entries.
You would like to determine the profitability segment automatically from the objects like service document, sales order item.
It's not clear about the logic behind.
Environment
SAP S/4HANA Cloud Public Edition
Resolution
Service Document
For service documents, there are no derivation rules shipped in the Substitution / Validation tool, i.e. if you choose to assign a profitability segment as true CO account assignment and entered a service document on the account assignment screen of the profitability segment, no derivations should take place. For this case, you would need to create such rules in the Substitution / Validation tool.
If you enter a service document in the CO account assignment area, i.e. the coding block, you cannot maintain an additional profitability segment since you will end up with an error message saying you may only enter one true CO account assignment, either service document or profitability segment, once you leave the PA account assignment screen.
It's recommended that you only enter the service document in the coding block and uses this one as true CO account assignment because in this case PA attribution logic should automatically determine an attributed profitability segment and fill the desired attributes reading proxy table which should be available for each service document with the Accounting-relevant data.
Sales Order
PA derivation has not incorporated any shipped derivation steps for deriving customer, product sold, plant, etc. from sales order and sales order item. Therefore, when using app "Post General Journal Entries" and manually entering sales order and sales order item information, PA will not derive anything out-of-the-box. You have to implement your own derivation steps in Substitution / Validation Tool for Cloud to derive the data.
On the other hand, in the sales order itself, the profitability segment has no necessity to derive additional data like customer, product sold, plant, etc. via some sort of derivation tool because all data is directly transferred from the sales order and taken over into the profitability segment automatically. This mimic only works in this specific place though.
Substitution
If you would like to make your own derivation rule, you can use app Check this link.
Keywords
CO-PA, segment, derive, profit. segment, derivation, profitability segment, FCO_SRVDOC, sales order, service order, service contract, cost center. , KBA , CO-PA-2CL , Profitability Analysis (Public Cloud) , Problem