Introduction:

Merchandising /Material Group Hierarchy is an hierarchy available for categorizing articles from
a purchase/procurement business process point of view. Merchandising Category/Material group is the last level of the hierarchy.

For understanding this Hierarchy concept below resources are of big help.

Merchandise Category Hierarchy: WHY (Business View)

Merchandise Category Hierarchy

From a functional point of view while trying to figure out /understand the tables responsible for holding the hierarchy levels / assignments between levels/assignment of Material group to hierarchy level data, found very limited blogs/materials available in the internet explicitly explaining the same.

Through this blog I am sharing my findings on how Retail Merchandising/ Material Group Hierarchy content are stored within the back end standard tables and later on how it can be moved by triggering Idocs in S/4 HANA Fashion.

Note:To figure out the back end tables I debugged the FM‘MERCHANDISE_GROUP_HIER_ART_SEL’ by using some dummy hierarchy data setup.I would really appreciate if experts from the community would express their thoughts on any other easier methods for achieving the same.

 

1.How Retail Merchandising /Material Group Hierarchy stored in SAP S/4 HANA Fashion ?

The last level of the Hierarchy is always the Material group field (MARA-MATKL).The two main tables holding this information is KLAH & KSSK. Having said that I have created a sample Hierarchy data along with some levels assigned to a Material group which is called the Merchandising category (MC- being the last level). On each hierarchy level we can also have characteristics, or we can have them inherited from superior hierarchy levels.

All the characteristics are differentiated by class types for ex. Material class by 001, Batch by 023 etc.

Class%20types%20for%20Characteristics

Class types for Characteristics

Similarly In Fashion / Retail we also have variant creating characteristics which is of class type 300(Article- Size variants created via configuration class), and then there is this Material group/ Merchandising Category created with class type 026.

We create retail material group from T code – ‘WG21’. This would generate a record in table ‘KLAH’.

Material%20Group%20creation%20from%20WG21

Material Group creation from WG21

For simplicity creating material group ‘TESTMATGR‘ , MARA-MATKL being 9 characters, hierarchies can be built accordingly.(for eg: 1,11,111,1111,1111…till the last level which is the material group/merchandising category ).

WG21

WG21

Material%20group%20Basic%20data

Material group Basic data

Hierarchy levels can be assigned to the material group once they are already created and same goes also for Material group Reference articles which can also be created from T code – ‘WG22’ as shown below.

WG22

WG22

Special%20category%20for%20Material%20Group%20Reference%20Article%20%u2013%2030%28%20creation%20not%20possible%20from%20MM41%29

Special category for Material Group Reference Article – 30( creation not possible from MM41)

On creation of Material group, a record gets generated every time in table KLAH with an Internal Class Number (KLAH-CLINT)

Material%20Group%20record%20in%20KLAH

Material Group record in KLAH

Later on we will be using the same KLAH-CLINT for fetching the relevant hierarchy level assignments for the Material group.

All the superior levels above Material Group (Merch. Category) can be created from tcode CLWM

Retail%20IMG%20-%20W10M

Retail IMG – W10M

Hierarchy%20Level%20creations%20from%20CLWM

Hierarchy Level creations from CLWM

Create superior levels and also assign one level to the next level.

Display%20Hierarchy%20Levels

Display Hierarchy Levels

This is a Hierarchy level which itself can also hold characteristics, which can also be inherited down the hierarchy tree in that case those characteristics would be flagged in the Inherited Char column.

The assignment checkbox flagged which means the hierarchy levels are assigned to another hierarchy level or a Material Group (Merch. Category). To change anything within the hierarchy, the hierarchy level needs to be unassigned from the Material group first otherwise it holds on to the assignment record created in KSSK table will get to this in a bit. On unassigning it automatically deletes the assignment records from backend std. tables. In contrast Article hierarchy is more flexible/robust in this regard.

Characterisitics%20within%20Hierarchy%20level

Characteristics within Hierarchy level

Assignment of one Hierarchy level to another.

Hierarchy%20level%20assignment%20to%20another%20Hierarchy%20level

Hierarchy level assignment to another Hierarchy level

Assigning hierarchy level to Material Group at the end.

Material%20Group%20Assignment%20from%20WG26

Material Group Assignment from WG26

Display%20Material%20Group%20with%20hierarchy%20level%20assignment

Display Material Group with hierarchy level assignment

FM ‘MERCHANDISE_GROUP_HIER_ART_SEL’ gives the list of hierarchy levels connected with relevant Hierarchy levels.

As mentioned earlier debugging the FM would help us understand how the RMH content is stored in SAP tables including the hierarchy levels and all its assignments till the last level (Material Group / Merch. Category).

As already discussed for our material group – ‘TESTMATGR’ we have a record in KLAH.

TESTMATGR%20record%20in%20table%20KLAH

TESTMATGR record in table KLAH

Based on KLAH-CLINT in KSSK-OBJEK we retrieve KSSK-CLINT

Based on KSSK-CLINT in KLAH-CLINT we get the next hierarchy level connected to the Material group

In this case it is KLAH-CLASS = ‘1111’

Similarly, we continue the search for the other hierarchy level assignments based on the

KSSK-OBJEK = KLAH-CLINT , till there is no record to be found in KSSK.

We now understand if there is any assignment between two hierarchy levels or assignment between Material group and hierarchy level there will be a record generated for the same in KSSK.

Similarly, to find out the level itself we retrieve KLAH-CLASS based on KLAH-CLINT = KSSK-CLINT

which is ‘111’.

We continue the same until there is no assignments found in table KSSK and we get the highest level in KLAH.

2.How we can transfer RMH (Retail Merchandising/Material Group Hierarchy) ?

If the data transfer is between SAP systems, we can setup distribution models.

BD64%20Distribution%20Model%20Setup

BD64 Distribution Model Setup

If any legacy system sending this information to a S4 Hana Fashion/Retail system then similar idocs can be triggered through middleware with relevant mapping.

Distribute the Distribution model to receiver system and generate partner profiles accordingly.

Execute Tcode ‘WGSE’ to transfer the Material groups along with the Hierarchy levels.

WGSE%20-%20Transfer%20of%20Material%20Group%20Hierarchies

WGSE – Transfer of Material Group Hierarchies

Note if any characteristics are also included within the hierarchy levels, then the CHRMAS Idocs would also get triggered but going by my example following outbound idocs triggered.

In WE02 following outbound Idocs triggered.

CLFMAS

CLSMAS

W_WGRP

 

Conclusion

Hope this blog brings some more clarity and understanding on how the Retail Merchandising / Material Group Hierarchy content is stored in the back end SAP tables and how it can be transferred across systems by triggering Idocs in S/4 HANA Fashion.

Some useful resources

Article Hierarchy in Product Master

Category: Article Master Load Generic/Variant Articles in S/4HANA with LSMW

To know more on S4 Hana Fashion please follow the blog posts on SAP Fashion Management or post and answer questions about the SAP Fashion Management.

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x