SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

Merchandise category & hierarchy upload using LSMW???

former_member232581
Active Participant
0 Kudos

Hi

I am trying to upload Merchandise category and hierarcy using LSMW (BAPI/IDOC method only).

For merhcandise category

I used message type W_WGRP and it is helping me in changing or reclassification of articles. But I am not able to create new merchandise category with this. I used structure E1BPE1WGR01  with "function" field with value "005, LSMW is working fine idocs are created successfully but no new Merc Cat is created.

When I used same structure with "function" field with value "009" I get error message "Class XXX does not exist or or is not valid on this date".

For Merchandise Catrgory Hierarchy

I used idoc CLSMAS but getting error message "Keyword missing for class XXX"

has anybody uploded entire hierarchy structure using LSMW ?

1 ACCEPTED SOLUTION

rathina_kani
Explorer
0 Kudos

Hi,

Im also facing the same problem. I tried even with Function value '004', either it is not updating or throwing this error.

Appreciate if anyone helps.

Thanks,

Kani

View solution in original post

22 REPLIES 22

rathina_kani
Explorer
0 Kudos

Hi,

Im also facing the same problem. I tried even with Function value '004', either it is not updating or throwing this error.

Appreciate if anyone helps.

Thanks,

Kani

0 Kudos

Hi Rathina

I am not sure if problem is solved or not but I am able to create Merch Category.

Instead of creating new MC using W_WGRP, I created it using CLSMAS  only  and then used W_WGRP to assign data to new MC.

After I ran LSMW with W_WGRP I was able to see it in WG22.

So the problem with MC seems to be resolved.

Now about MC Hierarchy,

I created it using CLSMAS , but can't access it using CLWM and getting error message "object cannot be maintained with class transactions"?????

0 Kudos

Sorry to say, but your problem is not resolved.

In IS-Retail, a merchandise category must first be created as a class (CLSMAS) and then also as a merchandise category (W_WGRP).  Yes, you must process two IDoc per merchandise category, and in that order.

To understand how to load data using LSMW, the best approach to watch what the system does naturally.  In this case, use T-Code WGSE to send the merchandise category hierarchy via ALE from one system-client to another.  For understanding, you needn't configure the entire ALE scenario, just the outbound portion.  Then watch the outbound IDocs be created; there's your example!

For merchandise category hierarchy (including merchandise categories), there are four message types that will be sent: W_WGRP, CHRMAS, CLFMAS, and CLSMAS. 

IDoc Serialization using message types (serialization groups) is used when several different message types are dependent on each other, as is the case here. For example, if a merchandise category is assigned to a merchandise category hierarchy level, the merchandise category hierarchy level must first exist.  How you use LSMW and IDocs is informed by the sequence.

To understand the IDoc sequence for creating the merchandise category hierarchy (including merchandise categories), use T-Code BD44 to view the Serialization Group GRP_W_WGRP includes the 4 desired message types in sequence:

CHRMAS04 Distr. of Characteristics with Dependencies and Long Texts

CLFMAS02 Master object classification

CLSMAS04 Classes with Long Texts, Document Links, and E1UPSLINK

W_WGRP01 Distribution of material groups

CHRMAS04 is only relevant of Characteristics are being assigned to merchandise categories.  Let us leave Characteristics aside for now.

Step 1:  Create Merchandise Category Hierarchy Nodes

Step 2:  Merchandise Categories - Create as a Class

Step 3:  Merchandise Categories - Change as a Retail MC

Step 4:  Merchandise Categories - Assign Category Hierarchy Nodes each other, and assign MC class to MCH node.

For this, use these messages:

Step 1:  CLSMAS04

Step 2:  CLSMAS04

Step 3:  W_WGRP01

Step 4:  CLFMAS02

- Paul

----------------------------

Paul R. Gendreau, Jr.

SAP Retail

 

0 Kudos

Thanks for very detailed explanation. It helped me put together bits and peices of information that I have in consolidated form.

But I think I'll need some more support from you on this.

Step 1:  Create Merchandise Category Hierarchy Nodes

I created new hierarchy nodes using CLSMAS04. But when tring to access them using CLWM getting error "object cannot be maintained with class transactions" Also I am not able to find field to pupulate description for the hierarchy in any of the structure. I tried using E1KLATM-TXTBZ, but no joy?


Step 2:  Merchandise Categories - Create as a Class, Done successfully

Step 3:  Merchandise Categories - Change as a Retail MC Done successfully

Step 4:  Merchandise Categories - Assign Category Hierarchy Nodes each other, and assign MC class to MCH node. will try next


Thanks in advance for your help with this.



Thanks

Vibhor Kulshrestha

0 Kudos

Hi Vibhor,

One small question. You have mentioned as below:


Instead of creating new MC using W_WGRP, I created it using CLSMAS  only  and then used W_WGRP to assign data to new MC.


For this, have you created two LSMWs ??

Thanks & Regards,

Kani.

0 Kudos

Yes, I already created two LSMW objects with W_WGRP & CLSMAS  with teh notion that I'll use first to create MC and later for MCH.

So I used CLSMAS  to create MC and MCH both and then used W_WGRP to generate master data for MC.

Please check detailed explation by Paul Gendreau.

Though I am still getting lots of issues and LSMW is creating objects but not able to check MCH using CLWM transaction.

0 Kudos

Hello Vibhor:

With all due respect, you have chosen not to consider the most valuable advice given, which is wisdom for all master data, not just those elements of Merchandise Category Hierarchy. Perhaps it sounds difficult or time consuming, but in the long run this approach is very much a savings of time. 

In this case, set up the ALE and then use T-Code WSGE to send the hierarchy.  The outbound IDocs will be created in the system and all is made clear for you with an accurate and system created example.  It's a waste of time to guess 🙂

With regard to:  Step 1:  Create Merchandise Category Hierarchy Nodes

Know that the descriptions of Hierarchy Levels and Merchandise Categories are stored in the classification system, not only in table T023.

To maintain the class description, populate E1SWORM-KSCHL.

E1SWORM-MSGFN = '004'.

E1SWORM-SPRAS = 'E'.

E1SWORM-KSCHL = POPULATE WITH THE CLASS DESCRIPTION

E1SWORM-SPRAS_ISO = 'EN'.

Also populate E1KLAHM (Master class basic data).

E1KLAHM-MSGFN = '004'.

E1KLAHM-KLART = '026'.

E1KLAHM-CLASS = POPULATE WITH THE CLASS NUMBER

E1KLAHM-STATU = '1'.

E1KLAHM-PRAUS = 'X'.

E1KLAHM-VERSI = '00'.

E1KLAHM-WWSKZ = '0'.

Note WWSKZ  - Set this to 0 to indicate that this class is a MCH Level

Note WWSKZ  - Set this to 1 to indicate that this class is a Merchandise Category

Finally, don't forget to populate required segment E1DATEM.

E1DATEM-MSGFN = '004'.

E1DATEM-KEY_DATE = SYST-DATUM.

- Paul

----------------------------

Paul R. Gendreau, Jr.

SAP Retail


0 Kudos

Thanks Paul Gendreau

Your advise has helped me in understanding idoc structure and values. I used WGSE and I was able to relate field mapping using that.

I'll change my LSMW and will test this again. Thanks for your support.

paul_gendreau
Contributor
0 Kudos

Check BD64 and make sure you have included all the message types or they may not be created when executing WGSE:

CHRMAS04 Distr. of Characteristics with Dependencies and Long Texts

CLFMAS02 Master object classification

CLSMAS04 Classes with Long Texts, Document Links, and E1UPSLINK

W_WGRP01 Distribution of material groups

If you have included the above in the distribution profile, then WGSE will always send the complete MCH as an example.

0 Kudos

Hi Paul,

I have created MC and MCH Level using CLSMAS04

Converted to MC to Retail MC using W_WGRP01

But when i try to assign the other hierarchy level (which is already assigned in CLW1) to MC , im unable to do it. I tried with both W_WGRP01 and CLFMAS02.

My req is to create MC and assign MCH level to it.

Thanks,

Kani

rathina_kani
Explorer
0 Kudos

Hi Vibhor,

Any luck in assigning MCH level to MC ?

Thanks,

Kani

0 Kudos

Hi Rathina

Yes, I have used CLFMAS to assign nodes of MC to MCH. With the help of valuable inputs from Paul Gendreau I have created complete LSMW package for below Merchandise category and hierarchy operations.

Create -       MC & MCH (Using CLSMAS & W_WGRP)

Assigne -     MC to MCH & MCH to MCH (using CLSMAS)

                   MC to site (Using DEBMAS)

Reclassify-   Articles (Using W_WGRP)

Change-       MC and MCH data (using CLSMAS & W_WGRP )

Let me know if you need help with any of them.

Thanks

Vibhor K.

0 Kudos

Hi Vibhor,

Thanks for you quick and prompt reply.

My req is

1. to create MCH level and class - done through CLSMAS04 (Tcode CLWM).

2. Maintain MCH - done through BDC program (Tcode: CLW1) .

3. Creating MC (Tcode: WG21)

     3.1 Converted the already created MC in step 1 using W_WGRP01.

     3.2 Assign Hierarchy Level to MC.

Im getting stuck in 3.2. But when i try to assign the other hierarchy level (which is already assigned in CLW1) to MC , im unable to do it. I tried with both W_WGRP01 and CLFMAS02.

Thanks,

Kani

0 Kudos

Hi Rathina

Below is summary how I prepared my LSMW. Hope it would help you.

Source Field I used:

E1OCLFM            C(050)    Object (Lower Level)

CLASS                 C(018)    Class (Higer Level)

Structure relation

E1OCLFM <<<< SOURCE Source

     E1KSSKM   <<<< SOURCE Source

     E1DATEM   <<<< SOURCE Source

Mapping

E1OCLFM

          MSGFN --> Fixed Value "005"

          OBJEK-->E1OCLFM(Lower Level)

          KLART  --> Fixed value "026"

          MAFID --> Fixed value "K"

          OBJECT_TABLE  --> Fixed value "Mara"

E1KSSKM

          MSGFN --> Fixed Value "005"

          CLASS-->CLASS(Higer Level)

          STATU --> Fixed value "1"


E1DATEM

          MSGFN --> Fixed Value "005"   

          KEY_DATE --> Code "E1DATEM-KEY_DATE = SY-DATUM." (To pick current date)


So in your source file E1OCLFM will be your MC and CLASS will be your MCH. It has worked for me without any issue.


Thanks

Vibhor K.

0 Kudos

Thank you soooooooooooooooooooooooo much Vibhor. It has cleared my problem.

MC is getting added with MCH Level.

Thanks,

Rathina Kani.

0 Kudos

Hi Vibhor,

To add text/description to MCH Level, you can do like this. For me it worked.

E1SWORM -  Master Class Keywords

E1SWORM-MSGFN  = '009'.

E1SWORM-SPRAS   = 'E'.

IF ZMER_HIER-KSCHL IS NOT INITIAL.

            E1SWORM-KSCHL = ZMER_HIER-KSCHL.

ELSE.

  * To create description, pass here

          E1SWORM-KSCHL = ZMER_HIER-KLBEZ.

ENDIF.

E1SWORM-SPRAS_ISO ='EN'.

If we simply pass value to E1KLATM-TXTBZ does not work.


Thanks,

Kani.

Former Member
0 Kudos

Hi all

i want to use  CLFMAS to assign Characterisitcis profile to MC, i found KSSK couldn't insert new record. just changed the existed assignment only. do you know how to handle it?

E1OCLFM-MSGFN='005'

E1OCLFM-OBTAB='KLAH'

E1OCLFM-OBJEK=CHARACERISTICS PROFILE

E1OCLFM-KLART='026'

E1OCLFM-MAFID='K'

E1KSSKM-MSGFN='005'

E1KSSKM-CLASS=Merchandise category

E1DATEM-MSGFN='005'

E1DATEM-KEY_DATE=SYST-DATUM

0 Kudos

Hello Sing Yu:

E1OCLFM-OBTAB = 'MARA'

E1OCLFM-OBJECT_TABLE = 'MARA'

- Paul

--------------------------

Paul R. Gendreau, Jr.

SAP Retail

0 Kudos

Hi All,

I was able to use all these Idocs to create Merchandise Category. But even after successfully running Idocs and able to see the levels and category using t-code WGUS, the data is not visible in T023 table. Am i missing something ? Please help.

0 Kudos

Did you ran W_WGRP after CLSMAS for Merchandise category? It is mandatory as CLSMAS create KLAH entries and W_WGRP creates T023.

0 Kudos

Yes, I did. FYI, i was able to create it but in the below sequence -

1. CLSMAS - Create classes for both MC & MCH

2. CLFMAS - Assign Hierarchy Nodes to each other and assign MC also to MCH nodes.

3. W_WGRP - Change MC classes to retail MC.

When i swapped 2 and 3,i was not able to view data in T023 table. With above sequence , i was able to see the data in T023.

paul_gendreau
Contributor
0 Kudos

Take note that the process to load Merchandise Categories and Hierarchy requires 4 IDocs, which must be processed in this sequence:

1 CHRMAS Distr. of Characteristics with Dependencies and Long Texts

2 CLSMAS Classes with Long Texts, Document Links, and E1UPSLINK

3 W_WGRP Distribution of material groups

4 CLFMAS Master object classification

A Retail Merchandise Category is both defined as a Class (Table KLAH, in step # 2) and a Merchandise Category (Table T023, and Step # 3). This is transparent when using Transaction WG21, but it explains why two steps are required for creating a Merchandise Category via IDoc.