Background documentationTM Freight Cost Posting to ERP (Shipper Scenario)

 

You can process the costs that you have distributed at SAP ERP item level in SAP Transportation Management (SAP TM). For example, you can post the distributed freight cost on the outbound delivery item to the freight expense account at the level of the material master (product). You can also post the distributed freight cost in the profitability segment in the sales order for the item. SAP TM transfers the distributed freight cost to SAP ERP when it transfers a freight settlement document.

Prerequisites

You have enabled the following settings:

  • Business function ERP-TMS: Order and Invoice Integration (LOG_TM_ORD_INT_II).

    We deliver the standard cost distribution settings with this business function.

  • Alternatively, in Customizing for SAP ERP:

    • Prerequisites for freight settlement document integration

      For more information, see Prerequisites: Invoice Processing (MM-IV/SD-BIL) - SAP TM.

    • Under Start of the navigation path Integration with Other SAP Components Next navigation step Transportation Management Next navigation step Invoice Integration Next navigation step Mapping for Cost Distribution End of the navigation path:

      • Assigned the SAP TM charge type to the condition type in the activity Assign SAP TM Charge Types to SAP ERP Condition Types

      • Specified payment types, billing types, and other appropriate settings under Start of the navigation path Posting via Agency Business Next navigation step Basic Settings for Creation of Agency Documents End of the navigation path

  • You have executed the transportation planning and execution process in SAP TM.

    For more information, see Transportation Planning and Execution.

  • You have created a freight settlement document for the relevant freight order or freight booking in SAP TM.

    You have distributed costs to SAP ERP item level in the freight settlement document.

  • You have transferred the freight settlement document from SAP TM to SAP ERP.

Features

Posting of the Distributed Freight Cost

Run the freight cost distribution report (transaction WLFLTM or WLFLTM2) in SAP ERP. You can use this report to review the agency business posting documents that contain the distributed costs. SAP ERP uses the freight settlement document from SAP TM to create the agency business documents. You can use the freight order, freight booking, or freight settlement document IDs to find the relevant agency business document.

Release of the Distributed Freight Cost Posting to Accounting

You can use transactions WLF2 and WZR2 to release individual agency business documents that contain the distributed costs, to accounting. You can use reports RWLF2004 and RWLF2001 to release multiple agency business documents to accounting.

References to SAP ERP and SAP TM Documents

An individual item in an agency business document that contains an SAP TM freight cost posting contains the following references:

  • Order and order item

    This includes the SAP ERP sales order, purchase order, or stock transfer order and the corresponding item references.

  • Delivery and delivery Item

    This includes the inbound delivery and outbound delivery and the corresponding item references. SAP TM transfers these references to SAP ERP during order and delivery integration processing.

  • Service purchase order

    The service purchase order (for freight cost) linked to the freight settlement document integration with SAP ERP.

  • SAP TM freight settlement document

  • SAP TM freight order

Account Assignments in Agency Business Documents

SAP ERP transfers the account assignments from the original source document such as the sales order, purchase order, or stock transfer order. SAP ERP creates the account assignments at the item level in the agency business document. SAP ERP uses the transferred account assignments to post the freight cost to financials.

Agency Business Document Settings

As standard, SAP ERP refers to the freight order or freight booking information transferred from SAP TM. SAP ERP determines the item in the sales order or order delivery that is linked to the item in the freight order or freight booking. SAP ERP takes information from the following places to update the agency business document:

  • For an agency business document of category 1 Settlement (Payment Document), from the sales organization, distribution channel, and division

  • For an agency business document of category 2 Invoice (Vendor Billing Document), from the purchasing organization and purchasing group

  • Plant from the plant in the line item of the sales order, purchase order, or stock transfer order

  • Company code for the header of the agency business document from the company code of the plant assigned to the agency business document item

  • Quantity in the agency business document item from the quantity information in the delivery item or order item that is assigned to the agency business document item

  • Pricing and currency information from distributed cost information for the corresponding SAP ERP item in SAP TM

  • Cost center, profit center, CO-PA segment number, and other account assignment information from the linked sales order, purchase order, and stock transfer order item if available

Using Agency Business Document Settings

You specify the basic settings for your agency business documents in Customizing under Start of the navigation path Integration with Other SAP Components Next navigation step Transportation Management Next navigation step Invoice Integration Next navigation step Mapping for Cost Distribution Next navigation step Posting via Agency Business Next navigation step Basic Settings for Creation of Agency Documents End of the navigation path. SAP ERP uses the fields APPLICATION, REF_DOC_TYPE, EXT_POST_TYPE, USE_CASE, KAPPL, AGENCY_DOC_CAT of the database table behind this Customizing activity to determine the agency business document type.

As standard if the item in a freight settlement document for a freight order or freight booking corresponds to an outbound delivery item in a sales order, SAP ERP sets the REF_DOC_TYPE to 12 (Sales Order/Contract). If the item in a freight settlement document for a freight order or freight booking corresponds to an inbound delivery item of a purchase order or an inbound or outbound delivery item of a stock transfer order, SAP ERP sets the REF_DOC_TYPE to 17 (Purchase Order/Contract).

Example

Example of a Transfer of a Freight Settlement Document from SAP TM to SAP ERP

When you transfer a freight settlement document from SAP TM to SAP ERP, SAP ERP takes the following steps:

  1. Creates a service purchase order and includes the items that correspond to the total amount in document currency for the freight settlement document.

  2. Posts a service entry sheet (SES) to confirm the services in the service purchase order.

  3. Creates an agency business document with a line item that corresponds to each individual line item in the freight order.

    When SAP ERP creates the agency business document, it copies the account assignment details from the relevant line item.

For example, in Customizing for SAP ERP under Start of the navigation path Integration with Other SAP Components Next navigation step Transportation Management Next navigation step Invoice Integration Next navigation step Mapping for Cost Distribution Next navigation step Posting Via Agency Business Next navigation step Basic Settings for Creation of Agency Documents End of the navigation path, you specify the following settings:

  1. Use case type of 31 Freight Distribution on G/L Account

    This posts the distributed freight cost of your outbound deliveries to the general ledger accounts (expensing the freight costs).

  2. Payment type of 1600

    This specifies the document type the system uses to create the agency business document.

You create a freight settlement document for the freight order in SAP TM. You transfer the freight settlement document from SAP TM to SAP ERP. SAP ERP creates the agency business documents that post the distributed cost to each of the delivery items in the freight cost account.

Example of Basic Settings in a Stock Transfer Order

For a stock transfer order, by default SAP ERP creates an outbound delivery document for transportation planning. In SAP TM, you create a freight order or a freight booking for the items in these deliveries. You create a freight settlement document in SAP TM, and transfer it SAP ERP. By default, SAP ERP uses the following basic setting information to create the agency business document:

Basic Setting

Value

APPLICATION

TM

REF_DOC_TYPE

7 (Purchase Order/Contract)

1 EXT_POST_TYPE

None

USE_CASE

30 (Freight Distribution on Material Account)

KAPPL

M

AGENCY_DOC_CAT

2 (Invoice)

SAP ERP uses these settings in the following conditions to create an agency business document for a freight settlement document when the freight settlement document has a distribution item for a stock transfer order:

  • When you plan and execute a transportation order in SAP TM without creating a corresponding delivery document in SAP ERP

  • When you create an inbound or outbound delivery document in SAP ERP and use it as a basis for transportation planning in SAP TM

Example of Basic Settings in a Sales Order

For a sales order, by default SAP ERP uses the following basic setting information to create the agency business document:

Basic Setting

Value

APPLICATION

TM

REF_DOC_TYPE

12 (Sales Order/Contract)

EXT_POST_TYPE

None

USE_CASE

31 (Freight Distribution on G/L Account)

KAPPL

M

AGENCY_DOC_CAT

1 (Settlement)

SAP ERP also uses these settings if you do not create a delivery document for a sales order.

Example of Basic Settings in a Purchase Order

For a purchase order, by default SAP ERP uses the following basic setting information to create the agency business document:

Basic Setting

Value

APPLICATION

TM

REF_DOC_TYPE

17 (Purchase Order/Contract)

EXT_POST_TYPE

None

USE_CASE

30 (Freight Distribution on Material Account)

KAPPL

M

AGENCY_DOC_CAT

2 (Invoice)

SAP ERP also uses these settings if you do not create an inbound delivery document for a purchase order.

Example of a Freight Order in SAP TM, with a Sales Order and Stock Transfer Order in One Container

The following table gives you an example of a freight order in SAP TM. You transport the sales order and stock transfer order in one container, 100010.

Freight Order Item

SAP ERP Outbound Delivery Item

100010

Container

10

10 (from a sales order item)

20

20 (from a stock transfer order item)

The following table gives you the details of the freight settlement document for the freight order:

Freight Settlement Document Item

Freight Order

10

Freight Order

The following table gives you the distributed freight costs at SAP ERP item level in the freight settlement document in SAP TM:

Freight Cost Distribution Item

Corresponding SAP ERP Item

10

10 (from sales order item)

20

20 (from stock transfer order item)

When you transfer the freight settlement document to SAP ERP, SAP ERP creates 2 agency business documents. The following table explains how SAP ERP creates the documents:

Agency Business Document

Item

SAP ERP Outbound Delivery Item

REF_DOC_TYPE

1

10

10 (from the sales order)

12

2

10

20 (from the stock transfer order)

17

More Information

For more information about cost distribution in SAP TM, see SAP Library for SAP Transportation Management on SAP Help Portal at http://help.sap.com/tmInformation published on SAP site. Under Application Help, open SAP Library and choose Start of the navigation path Settlement Next navigation step Freight Settlement Next navigation step Cost Distribution Management Next navigation step Cost Distribution for Shippers End of the navigation path.