The change of material numbers from MATNR18 to MATNR40 in SAP systems is caused by several important reasons. Primarily, the increased number of characters allows for more detailed and complex material coding, enabling better alignment of material numbers with specific business and technical requirements. This allows organizations to more precisely manage and classify their products, resulting in more efficient logistics and production operations.

Changing material numbers in migration to SAP S/4HANA
Transition from MATNR18 to MATNR40
Data migration in complex SAP system transformation projects from ECC to S/4HANA is a process that requires special attention due to various technical and business aspects. As regards handling of logistics processes, it is crucial to transition from an 18-character material number (MATNR18) to a 40-character material number (MATNR40) . All for One provides tools that facilitate data transfer and necessary transformations, ensuring high data quality and integrity.
Data migration in complex SAP system transformation projects from ECC to S/4HANA is a process that requires special attention due to various technical and business aspects. As regards handling of logistics processes, it is crucial to transition from an 18-character material number (MATNR18) to a 40-character material number (MATNR40) . All for One provides tools that facilitate data transfer and necessary transformations, ensuring high data quality and integrity.
Change from 18 to 40 characters – challenges
Challenges related to the transition from MATNR18 to MATNR40 should be considered in the planning and implementation of the migration project. It is essential to ensure that all data aligns with the new material number format. This entails the need to convert existing numbers and to ensure that the new numbers are unique and consistent. In addition, all interfaces that communicate with the SAP system must be updated to support the new, longer material numbers.
During the migration from SAP ECC to SAP S/4HANA, in the context of transitioning from an 18-character material number to a 40-character number, a process that requires special attention is the migration of change documents. Change documents are not converted. For a given object class, a new class is created so that the old object class has a short material number, and the new class has only the extended material number. Alternatively, a date is used to determine whether a change document is created with a short or extended material number.
On the S/4HANA target system, material change documents are read by the MFLE_CHANGEDOCUMENT_READ_ALL function. This function reads the old change documents with 18-character material numbers and the new data, with 40-character material numbers for a given selection criterion, and merges them into a new format with 40 characters. This means that the system checks the conversion date and compares it with the date of the change document. If the change document was created after the conversion date, the new format with 40 characters is expected. If the change document was created before the conversion date, the old format with 18 characters is expected.
Table and tools
As the migration to S/4 HANA involves transitioning to a new data format, including 40-character material numbers (MATNR40), in addition to the key tables related to change documents, namely: CDHDR, which stores the headers of change documents and contains information such as the type of change, date and time of the change, the user making the change, and the object identifier, as well as CDPOS, which stores detailed information about changes at the field level, including old and new values and the identifier of the change document header, we also need to provide the CDPOS_UID table for certain objects. It helps manage this conversion change, allowing data to be stored and processed in the new format without losing data integrity. During migration, unique identifiers (UIDs) should be created to ensure that each change document has a unique identifier, eliminating the risk of conflicts in the future.

Transformation Cockpit: structure of CDHDR, CDPOS and CDPOS_UID tables in the migration object supporting data transformation from MATNR18 to MATNR40
The migration from MATNR18 to MATNR40 in the context of SAP system transformation from ECC to S/4HANA is a complex yet essential process. The All for One Transformation Cockpit tool we use not only facilitates precise data migration but also the necessary transformations, such as those mentioned above, ensuring high data quality and integrity. Our tool is an excellent choice for companies seeking a smooth and seamless migration to a modern S/4HANA system, while offering reliability and support at every stage of the migration process.