Skip to Content
Event Information

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

/SCMTMS/PLANNER

/SCMTMS/TRANSPORTATION_MANAGER

/SCMTMS/FREIGHT_CONTRACT_SPEC

 


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!

13 Comments
You must be Logged on to comment or reply to a post.
  • 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

    • Hello,

      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.

       

      Thanks,

      • 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

        Thanks…

  • 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.

  • Please refer to below –

    /SCMTMS/SFIR_SES_ACC_ASSIGN of enhancement spot /SCMTMS/ENH_SFIR_POSTING

    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).

    Activities

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

    Example

    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:

    • /SCMTMS/CL_SFIR_SES_ACC_ASSIGN

    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
  • 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

    Steven

     

    • 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!

  • 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

    Steven

    • 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..

      Thanks!

  • 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?

    Pierre

  • 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.

    Regards

    Arnab