If you’re an SAP Retail functional person, it helps to be familiar with relevant IDocs. And if you’re a Master Data Aficionado, it’s kind of expected. This article explains the most common mistake made when attempting to create Generic/Variant Articles in data migration. It’s all about understanding the functional use of ARTMAS IDoc segments.
I’ve written that Generic Article and Variants have changed in SAP S/4HANA. But one thing that hasn’t changed is that there isn’t any Migration Cockpit content for Retail Article Master.
For this reason, SAP Note 2538170 recommends using either Legacy System Migration Workbench (LSMW) or SAP Data Services for data migration of some Retail master data, including Article Master. To be more precise, SAP recommends using an ARTMAS IDoc (or BAPI BAPI_MATERIAL_MAINTAINDATA_RT) for the data migration load step for Article Master. A single ARTMAS IDoc is used to create a Generic Article together with its Variant Articles.
Because the focus of this story is creating Generic/Variant Articles, I’ll explain mainly what’s relevant for creating Generic/Variant Articles and not everything necessary for creating an Article Master in general. That’s a different story for another day.
Dependent Master Data
Master Data Aficionados know that The Essence of SAP Retail Master Data is orchestrating master data to create master data. That up-front-work and data governance is what enables creating Article Masters with least effort and consistent results. Understanding the orchestrated master data is a prerequisite for creating Articles, especially Generic/Variant Articles.
There’s more explanation to follow, but here’s a summary of the dependent master data:
- Merchandise Category (Material Group)
- Reference Article, assigned to the Merchandise Category
- Configuration Class
- Characteristics, with Characteristic Values, assigned to the Configuration Class
Create Generic/Variant Articles using T-Code MM41
I never attempt data migration of master data without first testing the master data process. If you can’t create the master data manually — to confirm the underlying configuration and master data — then there’s no point in trying to build an automated process.
With that in mind, let’s quickly walk through creating a Generic Article with Variant Articles using T-Code MM41. The example is a Generic Article for a Men’s Shoe, with Variant Articles created by Color and Size.
Mandatory Initial Data
T-Code MM41 begins with only a few mandatory fields.
When creating Generic/Variant Articles in S/4HANA, the choice of Merchandise Category (i.e. Material; Group) is less important than it was in ECC 6.0. That’s because Variant-Creating Characteristics are no longer associated with a Merchandise Category. That connection — and constraint — has been removed.
The choice of Merchandise Category does remain important because there should be a Reference Article assigned to the Merchandise Category. Master Data of the Reference Article will be copied to the Generic and Variant Articles as they’re created. After all, that’s The Secret of SAP Retail Master Data. Because of this, very little data entry is required to successfully “create” Generic/Variant Articles, either by user interface or by data migration. Reference Articles play a key role in data migration, just as they do in everyday data maintenance.
Article Category (01 – Generic Material) is the critical choice because it cannot be changed after the Article is created.
Pressing the Enter key after filling mandatory fields exposes the mandatory fields for Configuration Class.
Configuration Class master data is new for creation of Generic/Variant Articles in S/4HANA. Like the Characteristics Profile used in ECC 6.0, Characteristics are assigned to a Configuration Class. Your choice of Configuration Class is actually a choice to use the Variant-Creating Characteristics assigned to the Configuration Class.
In this example, there are two Characteristics assigned to Configuration Class MFVB_SHOES_MEN: MFVB_SHOES_SIZES_MEN and MFVB_COLOURS. As the Characteristic names imply, Variant Articles will be created based on Size and Color.
In the next screen, the possible Color and Size values for this particular shoe are chosen.
Characteristics MFVB_SHOES_SIZES_MEN and MFVB_COLOURS both include many characteristics values, but only some of those values are relevant for this particular shoe. The restriction of characteristic values for this particular Generic Article (this shoe) are defined in this step.
In the next screen, the Variant Articles to be created — for the previously chosen Color and Size values — are chosen by ticking the combinations in a grid.
Notice that we’re not creating Variant Articles for every permutation of Color and Size!
The difference between relevant characteristics values (the previous step) and choosing the specific Variant Articles to be created (this step) is the most frequently misunderstood point for data migration of Generic/Variant Articles. Later, we’re going to cover the detail of expressing these two distinct data entry steps correctly during data migration.
Article Master – Generic Article
After selecting the characteristics values and Variant Articles to be created, the remaining screens for the Generic Article look much like that of a Single Article. But there are a few standard behaviors to observe.
Take note of the Article Description maintained for the Generic Article: “MDA Shoe.”
Article Master – Generic and Variants in table MARA
After the Article is saved, table MARA records the basic data for the created Generic and Variant Articles, and T-Code SE16N also displays the short text (Material Description) for the Article in your logon language.
Article Number for Variants Articles is the number of the Generic Article with sequential three digits appended.
- Article Number of Variant Articles must be explicitly assigned in data migration.
- If the 3-digits appended to Generic Article number isn’t preferred for Variant Articles created via user interface, then consider SAP Enhancement MGW00002 (EXIT_SAPLMGNK_003 — Customer Exit: Variant Number Assignment).
Article Description of Variant Articles can be explicitly assigned in data migration. Or it can be left blank in data migration and the system will fill in the Article Description based on the default behavior.
- By default, Article Description for Variant Articles is set to the description of the Generic Article, with Characteristic Value descriptions appended, separated by commas.
- See SAP Note 325014 – Short text determination for generic articles and variants describes the ECC 6.0 behavior.
- The field for Article Description is only 40 characters for all Articles. That means the Article Description for Variant Articles must be truncated if the length of the Generic Article Description and Characteristic Value Descriptions exceeds 40 characters. The logic for the truncation ensures that at least 1 character of the Generic Article Description is included, and favors retaining the first Characteristic Value Description.
Create Generic/Variant Articles using ARTMAS IDoc
Understanding the functional usage of ARTMAS IDoc segments is critical to Article Master data migration success. This is especially true in the case of Generic/Variant Articles.
In addition, IDoc segments — other than the first segment — usually represent a possibility for one-to-many relationships. For example, for a given Article, Article Descriptions can be maintained by language. That potential one-to-many relationship between an Article and Article Descriptions is expressed in ARTMAS IDoc Segment E1BPE1MAKTRT (Retail Data Transfer: Article Descriptions). Managing the one-to-many relationships (between source data and target structures) for your particular use case is important for simplification of data migration. There’s a good primer of that concept included in the first 10 minutes of my LSMW Master Class video, which uses Article Master as an example.
ARTMAS09 IDoc includes 89 segments. This simple example will use only 8 segments, plus their relevant “X” segments.
The source data files (input structures) and IDoc segments (target structures) will be aligned (structure relationships) as follows:
|Source Data File
|Header Segment with Control Info
|List of Variants for Generic Article
|Characteristic Value Assignment
|Article Data at Client level
|Extension of Basic Data
|Article Data at Site Level
|Units of Measure (UoM)
Here is how the source data files will be filled:
- MD_ART_GEN01 – One record for each Generic Article.
- MD_ART_GEN02 – One record for each Variant Article.
- Populate records only for Variants that are to be created immediately.
- MD_ART_GEN03 – One record for each Article / Characteristic / Characteristic Value
- Populate records for the Generic Article to indicate possible Characteristic / Characteristic Values.
- Populate records for each Variant Article to indicate actually used Characteristics / Characteristic Values.
- MD_ART_GEN04 – One record for the Generic plus one row for each Variant Article. This is Basic Data.
- MD_ART_GEN05 – One record for the Generic / Site plus one record for each Variant Article / Site. This is Site-Level Data.
- Include at least one record per Article for the Global Reference DC.
- Include at least one record per Article for the Global Reference Store.
- MD_ART_GEN06 – One record for the Generic / UoM plus one record for each Variant Article / UoM.
- Includes the primary GTIN for each Unit of Measure.
The most common mistake made when attempting to create Generic/Variant Articles in data migration is incorrect usage of Segment E1BPE1AUSPRT (Retail Data Transfer: Characteristic Value Assignment).
The difference between characteristics values relevant for the Generic Article and the specific Variant Articles to be created is expressed by the E1BPE1AUSPRT rows for the Generic Article (relevant characteristics values) and E1BPE1AUSPRT rows for the Variant Articles (specific Variant Articles being created).
- E1BPE1AUSPRT must include records for the Generic Article to indicate possible Characteristic / Characteristic Values for the Generic.
- E1BPE1AUSPRT must include records for each Variant Article to indicate actually used Characteristics / Characteristic Values.
Example ARTMAS09 IDoc
In keeping with the above example of using T-Code MM41 to create Generic/Variant Articles, let’s look at an actual IDoc used to create a similar example.
IDoc Number 22012 was used to create Generic Article Number MDASAMPLE with four Variant Articles for the following color / size combinations:
|Article # MDASAMPLE001
|Article # MDASAMPLE002
|Article # MDASAMPLE004
|Article # MDASAMPLE003
You can view the full detail of IDoc Number 22012 by clicking here.
By looking at the IDoc, you can see exactly how each segment and field was filled to create Generic Article Number MDASAMPLE and the four Variant Articles (MDASAMPLE001 to MDASAMPLE0014).
I use MDA Workbench to comprehensively create mapping documents and LSMW projects and … the whole kit of deliverables for data migration.
Below you’ll find a linked to the files created for this example (produced by MDA Workbench).
The LSMW project was unit tested in an SAP S/4HANA 1909 Model Company for Fashion Vertical Business, and should work in your own SAP system running either SAP S/4HANA Retail for Merchandise Management or SAP S/4HANA for Fashion and Vertical Business.
- MDA_MATGEN.ZIP (kit of deliverables for this example, created by MDA Workbench) can be downloaded here.
- MD_ART_GEN_20210601-072949.MDAWB – MDA Workbench Project File.
- MD_ART_GEN_20210601-072949.XLSX – mapping document, with sample data.
- MD_ART_GEN_LSMW_PROJECT_02_20210601-072949.TXT – LSMW Project File (unit tested in S/4HANA 1909)
- MD_ART_GEN_SQL_20210601-072949.TXT – Database script to create staging tables for source data.
- MD_ART_GEN01.TXT – Sample data (load-ready file) for unit testing the LSMW project.
- MD_ART_GEN02.TXT – Sample data (load-ready file) for unit testing the LSMW project.
- MD_ART_GEN03.TXT – Sample data (load-ready file) for unit testing the LSMW project.
- MD_ART_GEN04.TXT – Sample data (load-ready file) for unit testing the LSMW project.
- MD_ART_GEN05.TXT – Sample data (load-ready file)for unit testing the LSMW project.
- MD_ART_GEN06.TXT – Sample data (load-ready file)for unit testing the LSMW project.
- MDA Workbench can be downloaded here.
- Video: Introducing MDA Workbench (1:38)
- Video: MDA Workbench End-to-End Example (23:17)
Notes and Asides
- In this document, I use the term SAP Retail as shorthand to mean both SAP S/4HANA Retail for Merchandise Management and SAP S/4HANA for Fashion and Vertical Business.
- This post is an update to my ECC blog this topic, which is the first blog I ever published on SAP Community: Create Generic and Variants Using LSMW (December 4, 2014).