Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

2022-10-04 2215424

2215424 - Material Number Field Length Extension -


General Information
Version 28 Type SAP Note Language English Master Language English Priority Recommendations /
Additional Info Category Upgrade information Release Status Released for Customer Released On
20.06.2017 Component CA-FLE-MAT ( Field Lenght Extension for Material )

Please find the original document at https://launchpad.support.sap.com/#/notes/ 2215424

Symptom

The material number and related data types are extended.

Other Terms

Material Number Field Length Extension, MATNR, ATWRT, Classification, Material Number, BAPI, IDoc,
RFC, 18 digits, 40 digits

Reason and Prerequisites

In SAP S/4HANA, the material number field length has been extended from 18 to 40 characters. This change
was first implemented in SAP S/4HANA, on-premise edition 1511 and affects this release and higher releases.

Solution

Preface

SAP S/4HANA supports material numbers with up to 40 characters. Therefore, the maximum length of the
fields that handle the material number has been extended from 18 to 40 characters.

This note gives an overview about how this extension was implemented and what the consequences of the
extension are for customer code. For details on different aspects, see the referenced notes.

Extending the material number means that the code in the system must guarantee that all relevant bits of code
can handle 40 characters. It's especially important to ensure that the material number is not truncated to its
former length of 18 characters, because this would result in data loss. The corresponding SAP development
entities (domains, data elements, structures, table types, and transparent tables, external and internal interfaces,
user interfaces, and so on) have been adapted accordingly.

Furthermore, all database fields that may be used to store a material number also have to be extended.
Where required, automated logic is in place and executed automatically in case a customer converts his
current SAP Business Suite system to SAP S/4HANA.

This note and the referenced notes describe which changes were needed to accommodate for the technical
length extension of the material number. As customer and partner code uses the same techniques all described
adaptions need also to be done in affected customer coding, irrespective of whether the extended material
number is actually activated (see below) or whether you stay with material numbers of 18 characters.

System-Internal Coding

© 2022 SAP SE or an SAP affiliate company. All rights reserved 1 of6


2022-10-04 2215424

In an SAP system, consistent behavior of a data field is usually guaranteed by the fact that all data elements
used are derived from the same domain, the domain defining the technical length of the derived fields.
Whenever code uses these fields, it is automatically adapted when the domain changes. For the material
number, several domains that are used to define material number fields have been extended to 40 characters.

Besides these direct usages, the material number is also valid content in other fields such as, for example,
characteristics values. For those fields for which a material – besides other possible values – is valid content, it
has been checked that these fields are long enough to hold the extended material number. If necessary, these
fields have also been extended.

These kinds of “target” fields, which are not material numbers in themselves, were only extended if the
material number needs to be handled in the field. In several places, the material number is used as reference,
template, or for other reasons, but another (shorter) value – for example a GUID – would also be useable. In
these and other similar cases, it may be a better option to switch to another value. Accordingly, this other
value was used everywhere where it was appropriate.

Overall, the entire data flow in the system was analysed to identify all the places in which a material number was
moved to a field that was not long enough for a 40 character material number. These conflicts have been
handled in one of the ways described above. This type of analysis is also required for customer or partner
coding (using appropriate tools).

The described changes have also been applied to parameters of all interfaces that are usually called only within
one system, such as local function modules, class methods, BAdIs, and so on. In the types and structures that
are used as parameters in these local calls, the material number has simply been extended to 40 characters.
The same is also true for other extended fields. This was usually also done for unreleased remote-enabled
function modules, because the main use case for such function modules is an internal decoupling within one
system (e.g. parallel processing).

For interfaces that are usually called remotely, a different way has been chosen. For more information, see
the specific chapter below.

Database Representation of the Material Number

Extending the material number in the database means that the field length of the MATNR field in the database
has been extended from 18 to 40 characters. This has been done in all tables (and all fields within the tables)
in which a material number can be stored.

The way in which the material number content is stored in these database field has not been changed
compared to SAP Business Suite.

This holds especially true for purely numeric material numbers. With standard Customizing (lexicographic flag
not set, i.e. leading zeroes are not significant), purely numeric material numbers are still restricted to 18
characters and will be filled up in the database up to only 18 characters by leading zeroes. This is the same
behavior as before.

Overall, the chosen way of storing material number content avoids data conversions in the database. Note
that such data conversion is necessary when a material number is stored in a field that holds concatenated
content, and the material number is part of that concatenated content: Concatenation in the code uses the
technical length of the field – which is now 40 characters – and that is also reflected in the database content. If
you store such concatenated values in own tables, data conversion for these tables may also be needed.

If you have activated the DIMP (Discrete Industries & Mill Products) long material number or manufacturer
parts number, the content that is stored in the database for the material number will be need to be changed.

© 2022 SAP SE or an SAP affiliate company. All rights reserved 2 of6


2022-10-04 2215424

For further information see note 2381633.

Database Representation for Other Extended Fields

If possible, the database representation has also been kept for the other extended fields,
Some of the other extended fields may contain concatenated data that is constructed from the content of
other extended fields. In such cases, a conversion is usually necessary. See the referenced SAP Note
2215871 on data migration.

Released External Interfaces

External interfaces used for integration in a multi-system landscape (with SAP and/or non-SAP systems)
must be compatible with the old version of the interfaces, because it cannot be assumed that all connected
system are able to deal with 40 character material numbers immediately.

This is especially relevant for the commonly used integration techniques BAPI, RFC, and IDoc, because
these techniques rely on a fixed length and order of fields in the transmitted data. Simply extending the
material number field (or other extended fields) in these interfaces would therefore technically break the
version compatibility. For the material number and other extended fields as described in this note, version
compatibility is achieved in the same way that is commonly used for BAPI interfaces: The already existing
field keeps its original length and a new field has been added at the end of the structure that allows
transmitting 40 characters material numbers.

To enforce that only values can be maintained in the system that can be transmitted in the original short
fields, the extended material number functionality must be activated explicitly. Only after this decision is it
possible to allow more than 18 characters for the material number.

The changes described have been made for BAPIs, IDocs, and released remote-enabled function modules.

For released WebServices, adding a new field or extending the material number field was usually not
necessary because these services already allow material numbers with up to 60 characters in their
interfaces.

If you have created own external interfaces you have to check if similar compatible changes are needed. A
detailed description of the applied changes can be found in note 2215852.

System Behavior That Depends on the Extended Material Number Activation If the extended

material number functionality is NOT activated, the system behaves as follows:


After an SAP Business Suite System has been migrated to SAP S/4HANA, the B2B and A2A
communication via BAPIs, IDOCs, Web-Services, and released RFCs (inbound) still works without
further changes.

The system prevents data from being created that cannot be sent via the old interface, that is, the
usage of the extended fields is restricted to the old length.
• The shorter versions of the extended fields •
are still part of the interfaces
• are still filled when sending data
• are still understood when receiving data

This is also true if the extended field is used as part of a communicated concatenated field. This
concatenated field is still sent in the original field in the old short format, and is interpreted in the
inbound case in the original field in the old short format.
• Communication partners can still rely on the old known behavior of the interfaces. • The new 40
character field and other new extended fields in the interfaces are filled and interpreted,

© 2022 SAP SE or an SAP affiliate company. All rights reserved 3 of6


2022-10-04 2215424

too. So the 18 character material number is also communicated via the 40 character field. This is also
true if the extended field is used as part of a communicated concatenated field. The new extended field
will contain and expect the new long format. This means that the communication partners can already
adapt their interfaces for using the extended field even though only short material numbers are allowed.
When the extended material number functionality is activated, it is no longer guaranteed that the data can be
trasmitted in the old fields. The system behaves as follows:

• Material numbers and other extended fields can be used with the full length.
• It is no longer guaranteed that the old short fields in external interfaces can be filled or accepted:

If the material number or other extended fields are used with more than the original length, the
shorter version of an extended field cannot longer be filled in the interface and is therefore left
empty.

This is also true for concatenated keys containing extended fields. If the value that is part of the
concatenate is longer than the original field length, the concatenate can only be sent and
evaluated in the new format.

If the current value of the material number or the current value of another extended field still fits
into the old short field in the interface, the short field is filled in outbound and accepted in inbound
as well.

This is also true for concatenated values: if the old format can still be used because the current
value of the extended field contained in the concatenate is short enough, the old format is still
sent in outbound and accepted in inbound in the old short field.

Communication partners have to adjust to the new fields and data formats.
Be aware that all SAP Business Suite systems are communication partners!

Note: Before SAP S/4HANA, on-premise edition 1511 FPS2, the old short fields have not been filled or
accpeted when the extended material number functionality is activated. With SAP S/4HANA, on-premise
edition 1511 FPS2, this has been changed to the behavior mentioned above (see also note 2287625).

It is important to understand that the activation of the extended material number only affects the length of the
value that can be entered. Independent from the activation of the functionality the technical length of the
material number field (and other affected fields) is already extended to the new maximum length. That means
that all coding needs to be able to handle a technical field of length 40 for the material number even if the
extended material number functionality is not enabled and you stick to values with 18 characters.

Internal Calls of Released External Interfaces

As described in the previous chapters, different strategies have been chosen for internal and for released
external APIs.

If a released external API is called internally, that is, locally within one system, compatibility is not required.
The interfaces already understand and fill the new extended fields. Therefore, all internal calls of external
interfaces must only use the newly added extended fields.

This is also true if structures that are also used in released external interfaces, and which have therefore been
changed in the way described, are used internally. Additionally, only the new extended field should be used
for all internal coding in this case.

Inquiry is just a simple document showing the interest shown by your prospective customer on products
and services.

© 2022 SAP SE or an SAP affiliate company. All rights reserved 4 of6


2022-10-04 2215424
Software Components
Software Component Release

QRT_STAG 100 - 100

S4CORE 100 - 100

SAP_ABA 75A - 75A

Other Components
Component Description

LO-MD-MM Material Master

This document refers to


SAP Title
Note/KBA

2382620 Material Field Length Extension: converting concatenated values read from an archive

2381633 Material Field Length Extension: additional information for DIMP systems with active long
material number or MPN

2381584 Material Number Field Length Extension: ALE interface generation and calling of generated
ALE outbound modules for changed BOR objects

2310255 Material Number Field Length Extension - Structures used in Workflow Containers

2287625 Changed behavior of material mapping at interfaces for extended material number functionality

2218350 Material Number Field Length Extension - IDoc Interface/ALE

2216958 Precheck Program for Migration to SAP S/4HANA with regards to Material Number Field
Length Extension: Find BOR Usage and Material Number Usage

2216654 Material Number Field Length Extension - BOR Objects

2215871 Material Number Field Length Extension - Data Migration

2215852 Material Number Field Length Extension: Code Adaptions

© 2022 SAP SE or an SAP affiliate company. All rights reserved 5 of6


2022-10-04 2215424
2214790 Material Number Field Length Extension - UIs

This document is referenced by


SAP Title
Note/KBA

2782444 Characteristics value & description extension in HANA system


2334547 Increase Material Number to over 18 Characters

2453997 S4/HANA: BMG142 The numeric material number is longer than 18 characters

2422224 SAP S/4HANA Long Material number integration with SAP BW / SAP BW/4HANA

2443908 SAP S/4HANA: Material Number Field Length Extension in BAPI / BOR method
parameters: Restriction Note

2438006 Material Number Field Length Extension: Code Adaptions for compatibly enhanced local
function modules

2438110 Material Number Field Length Extension: Code Adaptions for usages of RFC enabled
function modules

2438131 Material Number Field Length Extension: Code Adaptions for usages of released RFCs and BAPIs

2381633 Material Field Length Extension: additional information for DIMP systems with active long
material number or MPN

2381584 Material Number Field Length Extension: ALE interface generation and calling of generated
ALE outbound modules for changed BOR objects

2353005 CIF adjustments for material field length extensions (MFLE)

2330311 CIF Adjustments for MFLE

2337941 Material Field Length Extension - Unfinished Workflows from DIMP LAMA system

2310255 Material Number Field Length Extension - Structures used in Workflow Containers

2274307 BDBG dumps as the transaction is blacklisted in SAP S/4HANA, on-premise edition 1511

2267140 S4TWL - Material Number Field Length Extension

2218350 Material Number Field Length Extension - IDoc Interface/ALE

2216654 Material Number Field Length Extension - BOR Objects

2215871 Material Number Field Length Extension - Data Migration

2214790 Material Number Field Length Extension - UIs

2215852 Material Number Field Length Extension: Code Adaptions

© 2022 SAP SE or an SAP affiliate company. All rights reserved 6 of6


2022-10-04 2215424

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy


© 2022 SAP SE or an SAP affiliate company. All rights reserved 7 of6

You might also like