CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
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 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 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



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



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 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 IMG - W10M



Hierarchy Level creations from CLWM



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


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.


Characteristics within Hierarchy level


Assignment of one Hierarchy level to another.


Hierarchy level assignment to another Hierarchy level


Assigning hierarchy level to Material Group at the end.


Material Group Assignment from WG26



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 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 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 - 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.
2 Comments