Distributing Freight Costs

Objective

After completing this lesson, you will be able to distribute Freight Costs.

Cost Distribution

This figure shows Cost Distribution.

Cost distribution takes place in a freight order (FO), a freight booking (FB), or a freight settlement document (FSD). Posting of the distributed cost to SAP S/4HANA is done with the freight settlement document (FSD).

In the shipper scenario, the distribution level is set to ERP item (Order/ Delivery item). In the logistics service provider (LSP) scenario (for cost-based internal settlement), the distribution level is set to forwarding order.

Cost Distribution Steps

Cost distribution involves the following steps:

  1. Distribution of the freight costs at the level of delivery items based on some rules, such as Weight of the Delivery items. This step is executed in TM.
  2. Processing of the distributed freight costs in the financials for either processing the freight cost for material valuation or for expensing at the product level. This step is executed in the respective SAP S/4HANA modules.

For example, the inbound delivery freight cost is typically posted for material valuation. Outbound delivery costs are posted to cost objects or modules, such as CO-PA segments from the sales order, to calculate the profitability during sales order processing.

Freight Cost Posting via Settlement Management Integration

TM uses SAP S/4HANA's LO Settlement Management module for distributed freight cost posting.

Settlement Management provides a flexible posting engine where you can define the type of processing that is carried out from a financial processing perspective via customizing. TM uses this posting engine to hand over the distributed freight cost to SAP S/4HANA.

The Settlement Management document provides a documented way of posting distributed freight costs in SAP S/4HANA. 

The Settlement Management document item created for TM freight cost postings has references to the following:

  • Order and order item–sales order, purchase order, or stock transfer order and the corresponding item reference.
  • Delivery and delivery item–Inbound or outbound delivery and the corresponding item references. During order and delivery integration processing, TM transfers these references.
  • Service purchase order–The service purchase order (for freight cost), linked to the FSD integration with SAP MM.
  • TM freight settlement document (FSD).
  • TM freight order (FO).

Settlement Management provides native integration to financial functions, such as financial accounting, controlling, CO profitability analysis, material valuation, and material ledger. For example, based on a given reference document, you can specify that the freight cost processing will be posted to the material account.

Settlement documents do not create or update any accounts receivables or accounts payables. The document is used only for material adjustment postings to either expense general ledger (G/L) accounts or to material accounts.

Document Types in Freight Cost Posting

For posting freight costs, SAP LO Settlement Management uses the following document types:

  1. Settlement Document Generic: This document type enables you to post freight costs to material valuation.
  2. Settlement Process Type: This document type enables you to post freight costs to the G/L accounts. 

Existing processes in Settlement Management and posting options are determined via use case types and document categories during mapping for cost distribution.

Customer Scenarios: Examples

The following are examples of customer scenarios:

SAP S/4HANA Integration

  • Transfer transportation cost as a delivery cost for the inbound material (material-level tracking).

    The transportation cost flows to material valuation. The freight cost transfer as delivery cost is not updated in the purchase order of the material. The delivery cost posting is achieved via the posting carried out by the Settlement Management document.

  • Post the cost back to CO objects linked from order/delivery/material.

    The material-relevant costs are tracked directly down to the CO objects from the transactions but more likely at an aggregated level, not necessarily at the material level. That is, there is no material valuation update. For example, all material-relevant costs, including indirect costs such as transportation, are tracked at the profit center level. Costs are segregated based on material movements (inbound, inter/intra, and customer deliveries).

  • Post cost back to the sales order /CO-PA responsible for the delivery (outbound scenario).

    This scenario occurs on the seller's side. Costs associated with the sales order directly are tracked and have an impact on profitability analysis (CO-PA) segments.

Customer Scenario: Goods Calculation

This figure shows the Goods Calculation in a Customer Scenario.

In the example in the figure, we see how the final cost of a finished good is calculated.

Before the finished good leaves the factory, the material cost consists of different cost components, such as the cost of material and manufacturing overheads. In CO-PA, some other costs can be displayed, such as fixed costs based on material costs or depreciations, and so on.

In the case of a stock transfer order where finished goods are moved from the manufacturing plant to an external warehouse, a transportation cost is incurred. Cost distribution is required to assign this cost to the responsible material.

The material in the external warehouse is charged with the transportation costs based on a certain distribution key, such as weight or volume.

The scenario illustrates how the freight cost distribution functionality allocates the freight cost to the level of material and then processes the cost for material valuation. This is one example where the TM freight cost distribution functionality plays a role in allocating the freight cost to the level of material from the freight orders, before processing this cost information for material valuation.

From the example, you can extrapolate that the material cost valuation increased from $750 to $870, including the $120 actual transport cost from TM. This $120 represents the distributed cost for a given material in a transport. If the material valuation type is set to moving average, the cost increases upon receipt of the product. If the material valuation type is set to standard pricing the cost does not change until the next valuation run.

Freight Cost Distribution Process

This figure shows the Freight Cost Distribution Process S/$ in a Shipper's Scenario.
  1. In LE, create a delivery.
  2. In TM, based on the delivery, freight units (FUs) are created in the background.
  3. The freight units are assigned to certain freight orders (FOs) or freight bookings (FBs) for subcontracting to a carrier (air/ocean/land) and charge calculation.
  4. In TM, create a freight settlement document (FSD) to post to SAP S/4 for invoicing and cost distribution.
  5. In TM, cost distribution occurs in the FSD based on certain distribution rules such as weight, volume, distance-times-weight, or a customer-specific rule such as the number of product pieces in an SD order item.
  6. Send the FSD containing all the freight costs and the distributed freight cost details to SAP S/4HANA. Here the following two process subsets are executed:
    • The overall freight costs are posted to SAP Materials Management (MM) (step 6a in the figure) where a purchase order and a service entry sheet (SES) are created.
    • The distributed freight costs from the FSD are transferred to the settlement management posting engine in SAP S/4HANA for posting to the responsible cost collector (step 6b in the figure). Based on information such as an SD order item, the settlement management distributes the cost to the appropriate cost object in Controlling or to CO-PA. In the case of inbound deliveries for purchase orders or stock transfer orders, the freight cost may be posted to material valuation and to different CO object-level cost centers, determined from the production order or stock transport order. This step takes place in the background. In SAP S/4HANA, you can monitor this event using transaction WLFLTM2 or the Fiori Launchpad and view the list of such freight cost documents.
  7. In MM, based on the purchase order with a service entry sheet (SES), an incoming carrier invoice is verified and posted using transaction MIRO. Any deviation in the verification creates a new Adjustment settlement management document for the difference. The adjustment document uses the same splitting logic as the original document for the planned costs coming from TM (See step 7a and step 7b in the figure).

Distributed Freight Costs Posting

This figure shows the typical posting pattern for FSD and Cost Distribution.

The figure shows an example of a typical posting pattern. The setup has to ensure the following:

  1. From a financial posting perspective, at the material level, there are two steps in the process of posting freight costs to either material valuation or G/L account. In the first step (2a in the figure), the total freight costs are posted to an intermediate account, such as a freight clearing account. In the second step (2b in the figure), the amounts are moved from the freight clearing account to the material or G/L (expense) account, based on material information from the relevant sales, purchase, or stock transfer orders.
  2. The account posting key GBB, which is set up for the FSD, points to the freight clearing account (transaction OBYC).
  3. The step 6b is derived from the Settlement Management postings setup.
    1. In the case of inbound freight cost posting, the VBD setup picks up the freight clearing entry based on the account key maintained in the pricing schema (see example WT0001). The inventory posting account is determined by the material and its attributes, and determine whether it is posted to BSX or PRD.
    2. For outbound freight cost posting, the settlement document picks up both the accounts from the pricing schema. The freight clearing account is picked up from the account key accrual field, and the freight expense account from the accounting key. (For example, see pricing schema WT0002.)
  4. For outbound freight cost posting, if the freight cost components are to be posted to different G/L accounts, then map TM charge types to both the condition types (which are SAP MM conditions) and the account posting keys that were set up for the settlement document type. (For example, see pricing schema WT0002.)

Cost Distribution Configuration TM

This figure shows an overview of SAP TM Cost Distribution Configuration.

Cost Distribution Configuration

The cost distribution configuration consists of the following:

  • Defining cost distribution methods
  • Assigning cost distribution methods to distribution profiles
  • Defining the organizational unit settings for charge calculation
  • Enabling the freight settlement and freight order/booking types for cost distribution

Step 1: Define Cost Distribution Methods

This figure shows the configurations of TM Cost Distributions.

In Customizing, choose Transportation ManagementBasic FunctionsCost DistributionDefine Cost Distribution Methods.

In the Define Cost Distribution Methods customizing activity, you assign a distribution method to a distribution class, in which you have specified your own distribution logic. This enables you to specify your own distribution method for cost distribution.

The standard settings deliver two default methods: direct distribution and hierarchical distribution.

If necessary, you can add your own distribution methods in this customizing activity.

Direct Distribution

This figure shows an example of a Direct Distribution Method.

In a direct distribution, the system distributes costs according to the attributes you specify in the distribution rule and distribution level, without reference to where in the item hierarchy you package a product. For example, if you specify a distribution rule of Gross Weight and a distribution level of ERP Item, the system uses the gross weight of the ERP item in the cost distribution, regardless of where the ERP item appears in the item hierarchy of the freight order or freight booking.

In the example in the figure, the distribution method is set to Direct, the distribution rule is Gross Weight, and the distribution level is ERP Item (that is, the product).

In a direct distribution for product 40, the system performs the following calculations:

​Product 30 = 1500 kg.

Product 40 = 2500 kg.

Product 70 = 500 kg.

The distribution for product 40 is 2500 kg/ (1500 kg+ 2500 kg + 500 kg) * USD 2000 = USD 1111.11.

In general, whether it is hierarchical or direct distribution, costs are applied to those products that are accruing costs. For example, there is a freight order with two stages, and in the charge management master data, the calculation resolution base for basic charges is defined as STAGE. This means for that freight order, each stage is calculated separately. As this freight order has two stages, the basic charges are calculated twice. Then during cost distribution, the basic charges of each stage are allocated to only those products that are being transported on that specific stage. Therefore, costs accruing on the first stage are allocated to the products that are transported on the first stage. The same applies to the second stage.

Hierarchical Distribution

This figure shows an example of a Hierarchical Distribution Method.

In the hierarchical distribution method, the system uses a step-by-step approach to take each level of the packaging hierarchy into account in the cost distribution. For example, if you specify a distribution rule of Gross Weight and a distribution level of ERP Item, the system uses the gross weight at each level of the item hierarchy to distribute the higher-level costs to the ERP item level. The system takes into account the tare weight of the packaging in the packaging hierarchy.

In the figure, you can see a table containing an example of data from a freight settlement document. In this example, the cost distribution is done first to move all Root (header) level charges of the freight order to the containers. Then the cost is distributed from each of the container items to the packages in the container, and finally to the product.

You perform a cost distribution for product 40. You specify a distribution level of ERP Item and a distribution rule of Gross Weight. The charge type is applicable to the whole document, with a calculation resolution base of root. The total freight cost is USD 2000.

In a hierarchical distribution for product 40, the system performs the following calculations:

Step 1

​Container 10 = 7500 kg.

Container 60 = 2500 kg.

The distribution for container 10 is 7500 kg/(7500 kg+2500 kg) * USD 2000 = USD 1500.00.

Step 2

Package 20 = 1750 kg.

Package 50 = 2750 kg.

The distribution for package 50 is 2750 kg/(2750 kg+ 1750 kg) * USD 1500.00 =  USD 916.67.​

Step 3

Product 40 = 2500 kg.

No distribution is required, because package 50 includes only product 40: USD 916.67.​

Step 2: Define Cost Distribution Profile

This figure shows the Profile and Assignment of TM Cost Distribution.

In Customizing, choose Transportation ManagementBasic FunctionsCost DistributionDefine Cost Distribution Profiles.

In this Customizing activity, you specify the settings you want the system to use to perform cost distribution in a freight order, freight booking, or freight settlement document. You can specify the following settings:

  • Distribution Method - Specifies the analysis approach the system takes in performing a cost distribution.
  • Distribution Rule - Specifies the criteria that the system uses to perform a cost distribution. Criteria can include gross weight, net weight, gross volume, distance times weight, and a custom rule (based on a BAdI).
  • Distribution Level - Specifies the target level to which the system allocates costs for a freight order or freight settlement document (FWO or ERP Item).

Step 3: Assign the Cost Distribution Profile to the Organizational Unit

In the Charge Calculation customizing activity, you can assign the distribution profile to the organizational unit for charge calculation.

In Customizing, choose Transportation ManagementBasic FunctionsCharge CalculationBasic SettingsDefine Charges Profiles.

Step 4: Assign Charges Profile to Organizational Unit

Assign the charges profile to the purchasing organization in transaction PPOME.

Step 5: Enable Cost Distribution in Document Types

This graphic shows Cost Distribution Enablement in Document Types.

Cost distribution takes place in the freight order (FO), the freight booking (FB), and the freight settlement document (FSD).

The posting of distributed costs to SAP S/4 is done with the FSD.

Cost Distribution Enablement

To enable cost distribution, choose one of the following paths in Customizing:

  • FSD type:

    Transportation ManagementSettlementFreight SettlementDefine Freight Settlement Document Types.

  • Freight order type:

    Transportation ManagementFreight Order ManagementFreight OrderDefine Freight Order Types.

  • Freight booking type:

    Transportation ManagementFreight Order ManagementFreight BookingDefine Freight Booking Types.

Customer-specific Cost Distribution Settings

This figure shows BAdls in SAP TM for Cost Distribution.

SAP Business Add-Ins (BAdIs) for Cost Distribution

SAP Business Add-Ins (BAdIs) are used to adapt SAP TM to specific cost distribution requirements:

  • Cost distribution rule (/SCMTMS/TCD_DISTRIB_RULE)

    You can use this BAdI to perform the following tasks:

    • Overwrite the distribution rule for the individual charge types provided in the Define Cost Distribution Profiles Customizing activity (the standard distribution rule in the Customizing activity covers all charge types in a business document). For example, you can specify a distribution rule for gross volume instead of gross weight for an individual charge type.
    • Provide your own distribution rule for any quantity field.
  • Cost distribution rule at hierarchy level (/SCMTMS/TCD_DIST_RULE_HIE_LVLS)

    You can use this BAdI to specify a different distribution rule at each level of a hierarchical distribution. For example, in a freight order for a trailer, you can use one rule for the trailer, another rule for the packages in the trailer, and another rule for the products in the packages.

  • Exclusion of charge lines (/SCMTMS/TCD_UNALLOC_CE)
    • You can use this BAdI to prevent the system from distributing charge lines during a cost distribution analysis. The system stores these items as unallocated.
    • The system calls this BAdI before it runs the distribution logic on charge lines.
  • Exclusion of Items from a Cost Distribution (/SCMTMS/TCD_UNASSIGN_DI)
    • You can use this BAdI to change the way the system distributes costs for one or more distribution items in a freight document.
    • The system does not allocate a cost to one or more distribution items that you exclude from a cost distribution in a freight document, such as a freight order. Instead, the system allocates the cost to the remaining distribution items in the freight document.

You can activate the BAdI implementations in Customizing.

In Customizing, choose Transportation ManagementBusiness Add-Ins (BAdIs) for Transportation ManagementBasic FunctionsCost Distribution.

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

Cost Distribution S4 Mapping Configuration

This figure shows Type Mapping for a Cost Distribution Charge.

In the Assign Transportation Charge Types to Condition Types Customizing activity, you can assign a transportation charge type to a MM condition type for cost distribution.

This setting is needed for shipper scenarios in TM, where the freight cost distribution is activated with the TM freight settlement document (FSD) to the SAP order item. The SAP S/4HANA system uses this assignment and mapping when processing the settlement management document for processing the distributed freight cost posting to Financials.

In Customizing, choose the following path: Transportation ManagementSettlementFreight SettlementIntegration for Settlement PostingMapping for Cost DistributionAssign Transportation Charge Types to Condition Types.

Cost Distribution Configuration: Settlement Management

For inbound & outbound freight costs, the system creates Settlement Management Document and Process Types for TM integration.

Settlement Document Types

Settlement document types control the processing of settlement documents, such as invoices, credit, and debit memos, as well as cancellation documents.

In the Settlement Document Types customizing activity, you define the settlement document types that model the different business transactions involved with cost distribution activities.

Settlement document type 1600 Cost Distribution, is the generic document type for posting freight costs.

For canceling/ reversal of the posting, the settlement management uses document type 1601.

In the section Control of Account Determination, the settings for determining the accounting procedure (MM Account Determination) and the clearing account assignment is done.

You can adapt these document types during implementation.

In Customizing for Logistics - General, choose the following: Logistics - GeneralSettlement ManagementSettlement DocumentsAll Document Types.

To process outbound freight costs, the system creates and uses settlement process types with settlement documents to determine the right settlement procedure for SAP TM integration purposes.

Settlement Process Types

In the Settlement Process Types customizing activity, you define process types that determine and depict the different business transactions involved in processing payments for vendors and customers.

Process type 1600 Cost Distribution on G/L accounts - TM, is the settlement process type for posting freight costs on G/L accounts. It has a settlement document type 1600 assigned to be used for processing the freight costs and right accounts.

You can adapt this process type during implementation.

In Customizing for Logistics - General, choose the following: Logistics - GeneralSettlement ManagementSettlement ProcessDefine Settlement Process Types.

Basic Settings for Settlement Document Creation

This figure shows the Cost Distribution Configuration of Mapping for Posting.

In the Basic Settings for Creation of Settlement Management Documents Customizing activity, you can specify the customizing used for the creation of the specific settlement documents based on reference documents, such as orders and deliveries as well as use cases. This configuration drives the freight cost posting via the settlement management documents.

You must specify settlement document types and process types. If you input calculation procedures, the settlement management procedure determination is overruled. Some of the keys of this table are set in BAdI Determine Fields That Control Settlement Management Document Creation.

Configuration Fields

The following fields are filled out during the configuration:

  • Reference Document Category: Indicates the classification for the various document categories that you can process in the system (for example purchase orders, sales orders, or invoices). It corresponds to the direct reference of SAP S/4HANA objects in the FO or FB in TM. For example, if the FO is linked to a sales order, then while posting distributed freight costs to SAP S/4HANA, this line is referenced to pick up the posting rule.
  • Posting Type: Blank is the default value. If there are other business scenarios and the customer would like to extend the posting rules, this field allows special posting.
  • Use Case Type: The use case characterizes existing business processes within Settlement Management. For freight cost posting, the following two rules are relevant:

    • 30 - Freight Cost Posting on Material Account
    • 31 - Freight Cost Posting on G/L Account

    This use case drives the type of posting: Use case type 30 creates Settlement Documents to post to material account and use case type 31 posts to expense account.

  • Condition Application: Subdivides the usage of a condition (for example, pricing) for use in different application areas (for example, sales and distribution or purchasing). Purchase is the default use for the pricing procedure from the MM module (Purchasing).
  • Document Category: This is directly related to the use case type. The value Settlement is used to post to the G/L account (outbound), and Invoice for posting to material valuation (inbound).
  • Settlement Process Type and Settlement Document Type fields: You assign the document types here that is used to post to the G/L account via the process type or the material valuation via the settlement document type.

For example, for inbound delivery, the use case type is 30 - Freight Cost Posting on Material Account. You then assign the settlement document type 1600 for such a line.

In Customizing, choose the following: Transportation ManagementSettlementFreight SettlementIntegration for Settlement PostingMapping for Cost DistributionPosting Using Settlement ManagementBasic Settings for Creation of Settlement Management Documents.

Note

As a prerequisite, all basic settings in SAP S/4HANA LO, MM and FI/CO are required and have to be set up properly. This activity is performed in close corporation with the financial department of customers and demands close alignments. SAP also delivers BAdis to alter the behavior of the integration and posting processes.