cancel
Showing results for 
Search instead for 
Did you mean: 

Base category ID

Former Member
0 Kudos

Hi,

I'm working on auto population of Unit of measure in Product tab for Marketing Planner. I'm not able to find the base category ID.

I tried it by passing product and category GUID to COMM_HIERARCHY table which gives me ROOT_CAT_GUID. I checked this guid in COMM_CATEGORY table but it is giving me the wrong base category ID.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kunal,

Please try this way and see if you get the desired result.

Step 1: Pass HIERARCHY_GUID to table COMM_HIERARCHY and get ROOT_CAT_GUID.

Step 2: Pass ROOT_CAT_GUID value as PARENT_GUID to table COMM_CATEGORY and see what value you have in CATEGORY_ID. (OR) Pass ROOT_CAT_GUID value as CATEGORY_GUID to table COMM_CATEGORY and see what value you have in CATEGORY_ID.

Thanks.

Ajay Kiran

Former Member
0 Kudos

Hi Ajay,

Thanks for taking efforts. I already tried this but it is not giving me the required values.

can you suggest some other way?

Regards,

Kunal

Former Member
0 Kudos

Hi Kunal,

The steps mentioned by Ajoy should work. When you are searching in table COMM_CATEGORY give the root category GUID you got from COMM_HIERARCHY in CATEGORY_GUID field of table COMM_CATEGORY instead of PARENT_GUID.

You said you tried it and it is not giving required values. This could be becaues the category ID is a space. When you do a SELECT query , cheeck for sy-subrc. If sy-subrc is not initial then this means the query is failed, but when sy-subrc is zero, but the CATEGORY_ID is initial, then the CATEGORY_ID itself has a blank. I have checked in my system and for hierarchies R3PRODHIER and R3PRODSTYP, the root category ID is a space. Eventhough there is a record in COMM_HIERARCHY table, the CATEGORY_ID field is blank.

Try in your system.

Regards,

Surendra

Former Member
0 Kudos

Hi Kunal,

Could you please give the exact requirement. What information you have at the place where you are coding and what informaiton you want to retrieve out of that.

Regards,

Surendra

Former Member
0 Kudos

I'm coding in a SET_ATTRIBUTES method of a Z-BADI for marketing planner, where I'm getting the product guid, category guid, category id(R3PRODHIER) and hierarchy guid in one structure and need to check the base category id in a Z-table(MAT_FERT - R3PRODSTYP). I need to find this base category ID.