logo

Are you need IT Support Engineer? Free Consultant

SAP TM – How to configure the system to propagate Commodity Codes from Material Master to TM Freight

  • By Sanjay
  • 30/07/2026
  • 17 Views



Overview

Commodity codes are classification codes used globally to identify goods and services for customs, trade compliance, and transportation purposes. In SAP, the commodity code is stored in the plant segment of the material master (field MARC-STAWN) and plays a critical role in foreign trade, preference processing, and logistics execution. 

A common business requirement is to ensure that commodity codes maintained in the material master are correctly propagated to SAP Transportation Management (TM) freight documents — including Freight Orders, Freight Bookings, and Freight Units — so that cross-border shipments carry accurate classification data for customs and carrier compliance.

This blog walks through the end-to-end configuration required to achieve this propagation, from material master setup through TM classification and freight document verification.

Prerequisites

Before beginning configuration, ensure the following are in place:

  • Commodity codes are defined in the system. In SAP S/4HANA, commodity codes are stored in tables /SAPSLL/CLSNR (Trade Classification Number) and /SAPSLL/CLSNRT (descriptions). In classic ERP, they are maintained in table T604. 
  • Numbering schemes are configured in TM Customizing under Master Data → Classification of Goods → Define Commodity Codes. SAP delivers the Standard Transportation Commodity Code (STCC) as default numbering scheme content, but custom schemes can be defined.  

Rogerio_Lima1_0-1784214874847.Png

Rogerio_Lima1_1-1784214874849.Png

  • Material master records exist with the commodity code field (MARC-STAWN) populated at the plant segment level. Note that it is possible — though generally undesirable — to store different commodity codes in different plant segments for the same material.  
  • Authorization object YYPR_STAWN is assigned to users responsible for maintaining commodity codes, if the control table YTY01 switch (ID = 0017, Par1 = 0045) is activated. Only users with this authorization will be able to change the commodity code field.  
  • TM integration is active between SAP S/4HANA logistics documents (SD/LE/MM) and SAP TM, with TM Control Keys and Logistics Integration Profiles configured.  

 

Configuration Steps

Step 1: Ensure Commodity Codes Are Correctly Maintained in the Material Master

The commodity code field is stored in the plant segment of the material master (MARC-STAWN). Maintenance of this field is resource-intensive given the volume of materials and codes. SAP provides the report YYSTAWN (called via transaction YYSTAWN) to manage this efficiently. 

  • For initial assignments, a manual assignment is unavoidable for the first time. Subsequent changes resulting from data updates can be handled more efficiently using the YYSTAWN program. 
  • To change individual commodity codes in the material master, use the Convert commodity codes radio button in the YYSTAWN report. Enter the expiring or invalid codes in the Commodity code old fields and the newly assigned codes (validated against table T604) in the Commodity code new fields. New codes are not written back until you click Save; change documents are written.  
  • If more than 9 conversion rules are needed, upload a conversion file into table YYCONVERT_STAWN using YYSTAWN_UPLOAD (accessible via transaction SA38 or transaction YYSTAWN_UPLOAD). 
  • To detect inconsistencies, the YYSTAWN report also provides analyses for: materials with no commodity code, materials with invalid codes, materials with different codes across plants, recently changed materials, and materials with 6-digit codes. 

Important: A change of the commodity code in the material master can have extensive consequences for preference determination. All preference calculations containing the affected material must be recalculated before the next shipment. 

Step 2: Configure Commodity Code Numbering Schemes and Product Classification in TM

Once commodity codes are correctly maintained in the material master, configure TM to recognize and use them:

  1. Define Numbering Schemes for Commodity Codes Navigate to TM Customizing and define the numbering scheme relevant to your transportation mode (e.g., STCC for North American rail, or a custom scheme for EU trade). You can assign a validity period to the numbering scheme content to accommodate changes in code length or structure over time.  

Rogerio_Lima1_2-1784214874850.Png

  1. Assign Numbering Scheme to Country/Region (if applicable) In TM configuration, assign the numbering scheme for commodity codes to the relevant country or region. 

Rogerio_Lima1_3-1784214874851.Png

Rogerio_Lima1_4-1784214874852.Png

Rogerio_Lima1_5-1784214874853.Png

  1. Classify Products Using the TM App Use the Manage Commodity Codes for Transportation app (App ID: F7150) to create entries for commodity codes under the relevant numbering scheme content. You can add descriptions, define validity periods, and add descriptions in multiple languages. 

Rogerio_Lima1_6-1784214874856.Png

Rogerio_Lima1_7-1784214874859.Png

Then use the Classify Products – Commodity Codes for Transportation app to assign commodity codes to products (materials). Once assigned, the commodity codes will appear in Freight Units, Freight Orders, and Freight Bookings whenever a classified product is transported. 

Rogerio_Lima1_8-1784214874863.PngRogerio_Lima1_9-1784214874865.Png

 

Step 3: Configure Propagation from FU to Freight Documents

In SAP TM, the Freight Unit acts as the primary source of truth for commodity code classification at the cargo item level. For that need to customize the FU to be relevant for take the Commodity from customizing;

Rogerio_Lima1_10-1784214874870.Png

Also check the Freight Order type:

Rogerio_Lima1_11-1784214874873.Png

The system automatically copies commodity codes from the Freight Unit to the corresponding Freight Order or Freight Booking.  

Verification

To confirm that commodity codes are correctly propagating to TM freight documents, perform the following checks:

Check the Freight Order / Freight Booking

    • In   SAP Fiori, navigate to Freight Order Management → Change Freight Order (or Change Air/Ocean Freight Booking).
    • Open the detail data for a main cargo item and navigate to the Commodity Codes tab page.

Rogerio_Lima1_12-1784214874880.PngCheck Freight Unit Items

    • Navigate to the detailed view of a Freight Unit.
    • In the Items tab, select a product and then choose Commodity Codes to display the commodity codes assigned to that product. 

Rogerio_Lima1_13-1784214874883.Png

Validate Material Master Consistency

    • Run the YYSTAWN report analyses to confirm there are no materials with missing, invalid, or inconsistent commodity codes across plants before processing shipments. 

Summary

Propagating commodity codes from the material master to TM freight documents requires a coordinated setup across material master maintenance, TM numbering scheme configuration, product classification, and forwarding order management. Key points to remember:

  • Commodity codes are stored at the plant segment level in the material master (MARC-STAWN) and must be consistently maintained. 
  • TM uses its own numbering scheme framework; products must be classified in TM using the Classify Products app for codes to appear on freight documents. 
  • Changes to commodity codes in the material master may require recalculation of preference determinations for affected materials. 

Important Notes

3778673 – How to configure the system to propagate Commodity Codes from Material Master to TM Freight Documents – SAP for Me

2681467 – Commodity Code propagation to Freight Documents in SAP Transportation Management – SAP for Me

Hope that can help you.

Thanks, and regards

Rogerio Lima.





Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

Chat with us on WhatsApp!