Skip to Content
Event Information
Author's profile photo Rahul Girdhar

Freight Settlement from TM module to CO-PA

Freight plays a vital role in the transportation industry, whether it’s a maritime industry, logistics services industry, supply chain, trade or simply a shipping business. Though shipping falls under Maritime Industry, but it has evolved in last couple of decades with the increase in international trade.

In this blog, we will not go in the background of how shipping or any of these industries operate. Neither we will go into logistics process. This blog is intended for those who are in SAP – Management Accounting Practice and want to have a clear understanding of how this freight cost are settled to product level which will provide profitability at that level.

Hence, this is an SAP CO-PA blog.

Let’s begin with the understanding of how the overall flow works before it reaches CO-PA

1. Execute the process in Transportation Planning and Execution.

Create orders (SAP S/4HANA)

You create orders in SAP S/4HANA and the system sends the orders to SAP TM. The following types of orders can be sent:

  • Sales orders
  • Purchase orders
  • Stock transport orders
  • Returns orders

Perform transportation planning (SAP TM)

SAP TM performs transportation planning for the orders received from SAP S/4HANA.


Create delivery proposals (SAP TM)

SAP TM creates delivery proposals based on the transportation planning results and sends the proposals to SAP S/4HANA.


Create deliveries (SAP S/4HANA)

SAP S/4HANA creates deliveries based on the proposals received from SAP TM. Depending on the corresponding order types, the deliveries can be inbound deliveries, outbound deliveries, or returns deliveries. SAP S/4HANA sends a confirmation of the deliveries to SAP TM.


Execute transportation (SAP TM)

SAP S/4HANA sends the deliveries to SAP TM, which executes transportation.


2. Transfer the Freight Settlement Document from TM to S/4HANA with cost distribution enabled in TM at delivery Item level.


In this blog, we will focus more on how this step 2 is executed, and how the values are flown to CO-PA profitability segment.

Role of Transportation Management Module

The Transportation Management module (TM) is used to create, support and monitor an efficient transportation plan, and manage forwarding / freight order management. TM can be integrated with SAP S/4HANA internal components or with an external system.

In TM module, we can perform freight settlement with our service providers or carriers by creating a freight settlement document and posting it to Materials Management (MM), meaning thereby – The settlement document data can be used to automatically create a purchase order and a service entry sheet (SES). The service entry sheet is the basis for invoice verification or the Evaluated Receipt Settlement (ERS) process in MM.


Following flow diagram shows the process from Transportation Management point of view –


Following are the respective steps –

Step 1: For each posted Delivery in the SD module, there will be automatically created a Freight Unit (FU) in Transportation Management (TM);


Subsequently a Freight Order (FO) / Freight Booking will be created with the execution data, planned departure time of vehicle and planned logistic processing etc.

Fiori App: Edit Freight Order


To access the TM transactions, add the following roles in the user-id





Step 2: Freight order will be settled in TM with cost distribution to Outbound Delivery line item level, through Freight Settlement Document (FSD).

Fiori App: Create Freight Settlement Document


Step 3: This involves 3 sub-steps –

3.1   Share calculated charges with the Carrier & receive a confirmation from them,

3.2   Approvals & Posting of Freight Settlement Document (FSD)

Fiori App: Edit Freight Settlement Document


Step 4: The system will automatically create Service PO & Service Entry Sheet. Alongside, through settlement management in S/4HANA system, the values will flow to the CO-PA object that is referenced in the Delivery Segments through Settlement document (earlier in ECC – Agency Business Document)

Tcode: WLFLTM2


After the service vendor invoice is received, user will analyze and compare the value with the originally posted Service Entry Sheet amount. If the same amount is there in the actual invoice, Accounts payable team will post the MIRO invoice against the freight order (FO) and Treasury team will pay the service vendor as per the payment terms.


Step 5A: In case the MIRO invoice value is higher than the originally posted service entry sheet, there will be a new Freight Settlement Document (FSD) against the original FO, for the differential amount and while the same will be posted there will be automatically created a new service PO and SES for the differential amount. And through Settlement document (earlier in ECC – Agency Business Document) in S/4HANA, the same will get posted to CO-PA.


Step 5B: In case the MIRO invoice value is lower than the originally posted service entry sheet, there will be reversal of the originally service entry sheet through reversal of Freight Settlement Document, and there will be a new Freight Settlement document with the new figures for the costs. Values will get captured in CO-PA for both reversal and new posting through Settlement document (earlier in ECC – Agency Business Document) in S/4HANA.


Step 6: For any future credit note to the Service Vendor, the process described in Step 7A will be repeated for the amount of Credit Note.


Prerequisite master data for this process is as follows.

  1. Scales
  2. Rate Tables
  3. Calculation Sheets
  4. Freight Agreements
  5. Business Partners (Carriers) and Vendors (Carrier), Invoicing Parties
  6. Locations
  7. Zones
  8. Material Master
  9. Service Master
  10. GL Accounts
  11. Cost Centers


The freight settlement process, as mentioned above, from TM module to CO-PA segments will happen at the time of posting settlement document (Type 1600). The account assignments (Cost center, Profit Center, Internal order CO-PA segment number etc.) in the settlement document Item – will be taken from the linked Sales Order Delivery, or STO item, if available.

In Customizing for Transportation Module, it will be specified that a CO-PA posting has to be triggered at the time of Settlement document posting.

(You specify the type of posting you want to do with the distributed cost. For example, you can post the distributed cost to material valuation or general ledger. Depending on the settings you have specified, the settlement management document posts to these or other cost objects. Settlement management uses the underlying sales order and delivery information from the freight settlement document cost distribution information to determine from the source order or delivery document the particular cost object against which it posts the distributed costs.)


Hence, while posting the distributed costs from TM to accounting, the posting to the CO-PA object happens which is referenced in the sales order. The system uses the freight settlement document to enable you to integrate the freight cost back to the underlying order/delivery items.

All the revenue accounting level profitability segments will also be derived at the time of aforementioned freight settlement –

  • Company Code
  • Profit Center
  • Segment
  • Plant
  • Sales Organization
  • Distribution Channel
  • Division
  • Delivery Details
  • Customer
  • Product / Material etc.



Just to repeat myself, the Settlement Management (which occurs at step 4 above) takes the following steps:

  • Creates a settlement management document with a type of Settlement Process and a document category of Settlement
  • Copies the references from the freight settlement document cost distribution information and gets the linked underlying delivery items
  • Copies the product and quantities in the delivery item to the settlement process document item (product 1, product 2, product n)
  • Copies the account assignments for the respective settlement process document item from the underlying sales order item to which the delivery item is linked
  • Copies the freight cost distribution amounts for the settlement process document items

Examples of account assignments can be cost objects including a cost center, profit center, CO-PA segment, or an internal order.


I hope you would find this blog post helpful. Good Luck!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Servet Acar
      Servet Acar

      Hi Rahul,

      I have a problem when creating cost distribution document from FSD  it is failed after PO and SES creation.Could you pls share some screen shots or parameters which needs to be maintained for having Settlement document (earlier in ECC – Agency Business Document)?Maybe schema or special hints ...

      I notice this from the FSD status tab like below

      "Confirmation Status : Cost distribution document creation failed"


      Thanks for the shared document

      Author's profile photo Joby John
      Joby John


      Please check whether you have maintained the number range for the settlement document. Normally Cost distribution document creation fails when the number range for the settlement document is not maintained.

      Please maintain and let us know whether its working or not.



      Author's profile photo Servet Acar
      Servet Acar

      Hi Joby,

      Thanks for your reply.It was already maintained number range.I debuged and noticed  AB creation  couldnt find the schema for settlement document 1600.I did neccessary customizings and have created the setlement document1600.But settlement documents accounting documents are not like which I expected.It is not distributed item level like triggered settelement document.I can see the distributed ERP item costs only FSD and the 1600 settelement document.Do you have a hint for this did I miss some thing in the full scenario.

      Intriggered PO or 1600 settelement document's accounting documents dont have the item level distributed costs.I can just see the profibility segment details via pop up window like shared above in blog att settlement document 1600.How I can use this ERP-Item level distributed  details to post CO-PA


      Author's profile photo Enes Çelebioğlu
      Enes Çelebioğlu

      Hi Rahul,

      Thank you for the post. I’m dealing with the same process, but facing some problems.

      I’ve managed to process until the creation of the settlement document in ERP, and releasing it to accounting. I can see the profitability segment acc. assignment (the characteristics) in the settlement document item, but it is neither in the accounting document nor in COPA line items (KE24). The distributed costs are not actually posted to COPA (also not on FI document). The only line item posted to COPA comes from the purchase order created after the FSD, which is not cost distributed and also doesn’t include the item-level characteristics.

      How do accounting documents of purchase order and settlement document look like in your example?

      Any input would be appreciated.

      Author's profile photo Rahul Girdhar
      Rahul Girdhar
      Blog Post Author

      Please refer to below -


      BAdI: Change of Account Assignment Information

      You can use the MODIFY_ACC_ASSIGN method to change the account assignment information. The system calls the method when you post an individual freight settlement document for a service entry sheet (SES) document.
      This Business Add-In (BAdI) is used in the freight settlement (TM-FRS) component. You can use this BAdI to change the account assignment information when you create a service entry sheet (SES) in Materials Management (MM). You can use the BAdI in an embedded posting scenario where Transportation Management (TM) and MM run on the same system and client.

      For example, you can change the following account assignment information:

      • Cost center
      • General ledger (G/L)
      • Internal order

      You can use this BAdI to create your own logic to override the default account assignment information. For example, you can use information from the freight settlement document to change the default cost center. For more information, see the example implementation below.

      You must deselect the EV_DEFAULT_ACC setting to indicate that you have changed the account assignment information in the BAdI.

      Alternatively, in a shipper scenario, you can use this BAdI to include the cost split from a cost distribution in a line item of an SES. This enables you to create a multiple account assignment in an SES. You take the following steps:

      1. Create the logic in this BAdI to extract the cost distribution information from the freight settlement document using the retrieve on the cost distribution dependent object. You summarize the cost distribution information by each charge type and order or delivery item.
      2. Extract other relevant information from the order or delivery, for example, accounting information such as cost center and profit center.
      3. Loop at each charge element in internal table CT_CHARGE_ELE and create the split of the accounting posting in internal table CT_CHARGE_ELE-ELEMENT_ACC.

      Standard settings

      For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).


      For information about implementing BAdIs as part of the enhancement concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.


      You can find example implementations in the BAdI Builder on the Enhancement Spot Element Definitions tab in the Implementation Example Classes section.

      The following example implementation is available:


      Change the cost center when you post a freight settlement document. In your business, you need the system to assign a cost center based on the settings you specify in the Customizing activity Assign Internal Order / Cost Center to Sender Organization under Integration with Other SAP Components -> Transportation Management -> Invoice Integration -> Billing -> Settings for Posting Intracompany Settlements.

      The system uses a combination of the purchase organization and purchase group from the freight order to choose the cost center from the Assign Internal Order / Cost Center to Sender Organization Customizing activity. If the combination doesn’t exist in the freight order, the system uses the purchase organization to choose the cost center. This will override the standard determination of cost center for a line item in an SES. If the system doesn’t find the purchase organization and purchase group in the Customizing settings for the freight order, it uses the standard determination of a cost center for a line item in an SES.

      For example, you have specified the following information in the Assign Internal Order / Cost Center to Sender Organization Customzing activity:


      Purchase Organization Purchase Group Controlling Area Internal Order Cost Centre
      ORG 1 PG1 CAX COST_C_1
      ORG 1 CAY COST_C_2

      You create a freight settlement document for the following orders:

      Freight Order Purchase Organization Purchase Group
      FO1 ORG1 PG1
      FO2 ORG1
      FO3 ORGX PGX

      The system creates the following cost centers in the SES:

      Freight Order Cost Center
      FO1 COST_C_1
      FO2 COST_C_2
      FO3 Default
      Author's profile photo Tej Soni
      Tej Soni

      Hi Rahul,

      This is really helpful for me. I am able to trigger enhancement properly.

      My client having below requirement :

      Cost center for SES to be determined based on profit center + G/L Account + Cost Segment = Cost Center. and data should come from outbound delivery document number.

      Only thing is we are unable to access LIPS data in the enhancement. How to get outbound delivery number in the  CT_CHARGE_ELE.

      Please help me



      Tej Soni

      Author's profile photo MILAN CHOWDHURY

      Hi Rahul,

      This is excellent information. Very helpful for enhancements needed to develop a custom solution.




      Author's profile photo S4SPEED TEAM


      Author's profile photo Steven Hill
      Steven Hill

      Hi Rahul,

      Really useful Post!

      Unfortunately I am seeing the same problems as 'Servet Acar'. My FSD looks good. It contains the Cost Distribution to the Outbound Delivery items as expected and the associated Sales Order contains Account Assignment information.

      The Service PO and SES are created and look fine.

      My Settlement Document (Agency Business Document) creates but with no line items and no document flow to the PO. As the Document creates I'm pretty sure it's not the number range.

      Your view as to what I've missed (or got wrong) would be greatly approciated.

      Many Thanks



      Author's profile photo Rahul Girdhar
      Rahul Girdhar
      Blog Post Author

      Hi Steven,

      Thanks for appreciating the blog!

      Now, for the issue which you are facing at the time of ABD (now, Settlement document) which is getting posted but without item level distributed costs.

      Although the standard functionality of Settlement management as given on Help page of SAP, explains how the distributed costs at the time of WLFLTM can be fetched to ACDOCA, but so far, I have following observations (from accounting per se) through multiple trial and errors –

      1. There is a balance sheet account debited & credited at the time of release to accounting doc in WLFLTM, therefore the COPA characteristics unfortunately are not posted in the Accounts based COPA.
      2. Now, if I try to change the FR1 or FR2 key in OBYC for this posting to P&L account, then there are two P&L postings – one at SES and one at settlement (ABD) doc. level, which is again wrong as per accounting.
      3. I didn’t give a try to Costing based COPA to post to COPA characteristics, as this would not reconcile with ACDOCA, which was my purpose to bring.

      Therefore I found an alternative -

      In order to fetch the aforementioned split at product (MATNR) or any other level in ACDOCA, we can do that at the time of SES automatic posting itself. This would be possible through the BADi – /SCMTMS/SFIR_SES_ACC_ASSIGN of enhancement spot /SCMTMS/ENH_SFIR_POSTING

      You can use this BAdI to include the cost split from a cost distribution in a line item of an SES. This enables you to create a multiple account assignment in an SES. I have explained more on this BADi in one of my previous comments. Thanks!

      Author's profile photo Steven Hill
      Steven Hill

      Hi Rahul - thanks for the quick response.

      So am I right in my understanding that the Settlement Document approach doesn't actually work and the solution you have found is to apply the correct Cost Distribution postings from the BADI off the back of the SES?

      Many Thanks


      Author's profile photo Rahul Girdhar
      Rahul Girdhar
      Blog Post Author

      Hi Steven,

      Like I mentioned, I didn't try Settlement Management Doc. posting with Costing Based COPA, but for Accounts based COPA that approach didn't work for me. And implementing this aforementioned BADi for posting at the time of SES, actually helped reducing the number of accounting docs for customer. Now only one document at SES level is being posted. WLFLTM's release to accounting can be restricted..


      Author's profile photo Gleisson Ramos
      Gleisson Ramos

      Hi Rahul,

      First off all, thank you for sharing this insightful content with us.

      I've tried use the WLFLTM process and the distribution happen properly. My problem was the same you said. The SES creates a debit posting against the P&L account and the cost center, and I'v changed the FR1 to use the same P&L and get the previous SES posting credited at the settlement time (ABD).

      The problem is since the ABD uses the account classfi. from Sales Order it doesn't recognize the cost center from SES when posting. See below:

      Settlement (ABD) line FR1 without considering the cost center:

      Do you know how to do to the settlement recognize the cost center from SES?


      So, I decided to implement the BADI and create the same distribution logic inside it. I've implemented the BADI in order to replicate the freight cost distribution directly to a P&L account. One problem I'm facing is about the percent distribution field CT_CHARGE_ELE-ELEMENT_ACC-WPROZ. This field support just one decimal place, so the distribution sometimes can't be so accurate as is as in the cost distribution of the billing freight document. Did you get this rounding problem when distributing the cost through the BaDI?

      Author's profile photo Steven Hill
      Steven Hill

      Ok, many thanks, Steven

      Author's profile photo Pierre Rensonnet
      Pierre Rensonnet

      Hello Rahul, Thank you for this blog.

      We came to the same conclusion:

      "Now, if I try to change the FR1 or FR2 key in OBYC for this posting to P&L account, then there are two P&L postings – one at SES and one at settlement (ABD) doc. level, which is again wrong as per accounting."

      Could we assign a P&L account to FR2 and the same balance sheet account to "FR1"(or any custom key) and SES? Differences related to invoice verification would have to be periodically reviewed. Any thoughts?


      Author's profile photo S4SPEED TEAM

      Very Nice Post.

      So Assumption is one FO/FB represents 1 cost center.

      If I club multiple deliveries with different profit centers into one Freight booking, keen to know the cost center. Assume each profit center has unique cost center.




      Author's profile photo MILAN CHOWDHURY

      Very useful blog. Thanks for sharing.

      Author's profile photo Eric Etienne
      Eric Etienne

      This Blog is VERY interesting, Thanks a milion

      Author's profile photo Eric Etienne
      Eric Etienne

      Dear Rahul,


      On a nominal basis my process is ok up to invoice verification but when I wanted to record a MIRO value higher than the originally posted SES, the FSD is updated with the verified Invoice amount but the Delta FSD is not created and as a consequence Charge distribution is not updated.

      What is the missing configuration to implement to get this delta FSD?

      Thanks in advance for your analysis

      Author's profile photo Eric Etienne
      Eric Etienne

      Dear Rahul,

      Settlement profile settings are correctly set for Change process FSD with 02 create new FSD for delta amount

      Unfortunatly the Delta FSD is not created (Embedded TM 2020) when higher amount is recorded in MIRO

      Author's profile photo Thomas PETITPIERRE
      Thomas PETITPIERRE

      Hi Rahul

      If we had to implement the embedded TM on a product costing-based COPA.

      And wanted to split the different items of the settlement doc. Type in different MM item on the purchase order.

      The target is to obtain a COPA actual item per each MM item in order to have a copa item per product, product hierarchy…


      Best regards,


      Author's profile photo Partha Sarathi Samantaray
      Partha Sarathi Samantaray

      Hi Rahul,


      Thank you for this detailed and elaborated article. I need your help in resolving an issue encountered during the posting of FSD. The PO and SES are not getting created due to Account Assignment issue. It says Profit centre is not filled in the line item 001. This error message appears under the application log  It is indicative of document splitting issue but it doesn't say specifically anything in regards to this particular process. There is a Goods issue document created for stock transfer with MT 643 and a subsequent Outbound delivery created as well.

      Could you please put some light on the account assignment part as from where it is being sourced at the time of posting the FSD.


      Appreciate an early reply.



      Partha Sarathi Samantaray

      Author's profile photo Rafa Fernandez Sanchez
      Rafa Fernandez Sanchez

      Hello Rahul.

      I'm having the same issue with the profit center determination as the PA segment is the enabled for this account.

      How can I determine the Profit Center at time of PO/SES creation, and it is required to use the one from the Sales Order for Outbound flows.



      Author's profile photo Eric Etienne
      Eric Etienne

      Hi Rahul

      Currently the cost are distributed to the destination plant/company in intercompany process: how to switch the distribution to source plant/company?


      Appreciate an early reply



      Author's profile photo Guatam S
      Guatam S

      Thanks , Rahul for sharing this knowledge enriching blog .

      Could you please share your advice on posting date comes in cancelled ABD which is not the current date .

      say I have a  FSD created and posted ( PO/ ses/ ABD) in the month of April . Now in the month of may I need to cancelled it  for some reasons.  So I cancelled the FSD in may month but cancelled ABD type 1601 created has the posting date as previous month actual FSD Date and not the current .

      Isn’t this strange and shouldn’t the posting date be current date when cancel the FSD.

      Please advice what setting or config I am missing.

      TM EMBEDDED 1809



      Gautam S


      Author's profile photo Guillaume Dubeau Mimeault
      Guillaume Dubeau Mimeault

      Thanks Rahul for sharing your expertise in TM integration with COPA, which is hard to find.

      From your experience with TM integration with Finance/Copa, how would you reconcile Freight Settlement Document, Cost Distribution and TM Invoice in Finance?
      Individually, we can do it using TM transaction, but in mass, we are having difficulty to do reconciliation as the Freight Order ID (FO) is not in ACDOCA table or other related Finance tables. I was not able to find any Standard SAP documentation on FI/TM Reconciliation.

      Our only solution currently to faciliate reconciliation is to either:

      - add new substitution rule to add Freight Order ID in the Journal Entry Text
      - add new custom field into ACDOCA table for the Freight Order ID.

      Any advice will be appreciated,