Data migration is always a hot topic when switching from SAP ECC to SAP S/4HANA. Migrating customs-related data into the component SAP S/4HANA International Trade is especially complicated: For most master data, SAP has provided a solution via the migration cockpit (SAP S/4HANA 2021) or, in earlier S/4HANA releases, via transaction LTMC. If you have maintained customs-related data such as commodity codes for Intrastat declarations and customs tariff numbers in your ECC system up until now, you will be affected by the replacement of the ECC Foreign Trade component with S/4HANA International Trade. And up until now, there was no out-of-the-box migration tool available for migrating this data.
Mass upload of commodity codes for EU countries is obsolete
In an SAP ECC system, you were able to load commodity codes and the related descriptions to the system en masse in the SD foreign trade and customs sub-component with transaction VE94. According to SAP note 2267310 – Worklist for transition to SAP S/4HANA – foreign trade (https://launchpad.support.sap.com/#/notes/2267310), we aren’t just losing transaction VE94; we are losing all transactions for maintaining commodity codes.
In a S/4HANA system from release 1610, apps are available for maintaining commodity codes, however, these do not allow any mass upload. From SAP note 2432527 – KBA: S/4HANA – Define Commodity Codes and (re-)classify products (https://launchpad.support.sap.com/#/notes/2432527) also shows that the data at table level is no longer saved in the previous ECC tables but in new tables. So, if you have built your own program for uploading commodity codes, you will need a new solution after a switch to S/4HANA.
Initial mass upload of commodity codes under S/4HANA
What are your options for loading commodity codes to the system for data migration after a switch to SAP S/4HANA?
Option 1 is to create all commodity codes manually with the SAP FIORI app “Manage Commodity Codes”. This may still be reasonable, up to a certain number of codes. However, this begs the question of whether it would be better to invest the time and the budget into a custom program that can also be used for future data migrations, as option 2.
My colleagues and I were also faced with this problem for several S/4HANA implementations. And our project teams chose option 2.
You can find an approach for developing a custom program for migrating commodity codes in SAP Note 2458080 – KBA: S/4HANA 1610 – Commodity Codes and (Re-)Classification without Fiori Apps (https://launchpad.support.sap.com/#/notes/2458080). Here, SAP recommends using the function modules /SAPSLL/API_COMCO_CLS_DISTR and /SAPSLL/API_COMCO_MD_DISTR, to maintain and allocate the commodity codes. There are restrictions to consider here, such as the fact that an automated creation of commodity codes only succeeds if you have defined the related numbering scheme with the type “SAP GTS” in customizing. This kind of custom program should only be used for the initial creation. We would be delighted to develop a migration program for you. Contact us to find out more!
As in other areas of the SAP S/4HANA system, it’s also worth keeping your eyes open for new apps and functions in new releases for International Trade as well. In any case, we will keep working on the topic of data migration so we can advise and support our customers in the best way possible.
Do you have further questions about S/4HANA International Trade?
Contact me or set up a web meeting. You are also welcome to write your question in the comment box at the end of the article.

You are currently viewing a placeholder content from Active Campaign. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More Information
2 thoughts on “Migration to SAP S/4HANA: mass upload of commodity codes”
Hi ,
We have a requirement where we are moving MDG to S4Hana, Here do we have any std API for moving it apart from Std Fiori app (Which is ‘Manage Commodity Codes’) . Because we are not using Fiori tile over there so looking for any std API.
Regards,
Adarsh G
Hi Adarsh,
Find more information about this topic in the OSS note:
As the OSS note 2458080 states:
If you don’t want to use these Fiori Apps to assign the commodity codes to a product, you can use the following APIs to create your own solution for an initial load of commodity codes (please note that those APIs shouldn´t be used for a classification on a daily basis):
• /SAPSLL/API_COMCO_CLS_DISTR for assignment in /SAPSLL/MARITC and
• /SAPSLL/API_COMCO_MD_DISTR for the maintenance of table /SAPSLL/CLSNR (former T604).
With function module /SAPSLL/API_COMCO_CLS_DISTR you can create, and update commodity code classifications, there is no further validity handling. It should generally be used for the initial commodity code classification of the products when they were first loaded into your S4 system. App classify or reclassify products – commodity codes or the APIs do not allow deletion of classifications. Deletion of classification periods is only possible when a new classification is done that overlaps an existing classification period.
With function module /SAPSLL/API_COMCO_MD_DISTR you can do the same for the commodity codes itself. In function module /SAPSLL/API_COMCO_MD_DISTR there is a restriction that commodity codes can only be created when the corresponding numbering scheme content is of type ‘SAP GTS’. It is dependent on SAP GTS and restricted to commodity codes (type 01).
If you want to classify your products on a daily basis without the use of Fiori Apps please use method CREATE _CLASSIFICATION of class /SAPSLL/CL_PRCLS_API.
Regards,
Sophie