cancel
Showing results for 
Search instead for 
Did you mean: 

Query regarding Catalog , code groups and codes

Former Member
0 Kudos
191

In our transactions.

there are catalogs defined

under that code groups

under code groups codes are there, but these have levels.

when I was given a child level code I need to get the parent code for this. Can some body help in finding the parent or higher level code for a given code.

jaffer vali shaik

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I could resolve the issue.

Former Member
0 Kudos

Hi Friends,

I have to update the result field in the Status scetion for the transaction code CRMD_ORDER.For this i am using FM CRMD_ORDER_MAINTAIN.

In this i need to fill the service_os table.

The result field is a combination of 3 fields.

1. Catalog

2. Code group.

3. Code.

I have the catalog & code with me. How do i find the respective code group for it.

Thanks

Kapil.

Former Member
0 Kudos

Hi

The sequence flows like this

Transaction type --> Subject profile -->Code group profile >Code Groups>Codes

The entire parent child relationship is identified on ID's

For Eg: Reason field is to be filled in CRMC (Complaint doc) XXYY ZZ (Code) comes in the drop down

It means XX - Catalog

YY - Code Group

ZZ - Codes

Hope this information helps

Please Reward if it does

Cheers!!

Raj

Former Member
0 Kudos

Hi Jaffer,

Try to go through the function module given below. This FM is used to fetch category details of service tickets. It uses various level of relationship which is used by Category Modelor.

FUNCTION Z_CRM_ORDER_GET_CATEGORY_V1.

*"----


""Interface local:

*" IMPORTING

*" REFERENCE(P_GUID) TYPE CRMT_OBJECT_GUID

*" EXPORTING

*" REFERENCE(CATEGORIA5) TYPE CHAR50

*" REFERENCE(CATEGORIA4) TYPE CHAR50

*" REFERENCE(CATEGORIA3) TYPE CHAR50

*" REFERENCE(CATEGORIA2) TYPE CHAR50

*" REFERENCE(CATEGORIA1) TYPE CHAR50

*"----


DATA:

it_guid type crmt_object_guid_tab,

IT_HEADER TYPE CRMT_ORDERADM_H_WRKT,

ls_guid_bapi like line of it_guid,

LS_IT_HEADER LIKE LINE OF IT_HEADER,

it_SERVICE_OS TYPE CRMT_SRV_OSSET_WRKT,

lt_SERVICE_OS TYPE line of CRMT_SRV_OSSET_WRKT,

lt_requested_objects type crmt_object_name_tab.

data: c type i.

DATA: OBJ_GUID_1 TYPE CRM_ERMS_CAT_GUID.

DATA: TREE_GUID1 TYPE CRM_ERMS_CAT_GUID.

DATA: CAT_GUID1 TYPE CRM_ERMS_CAT_GUID.

DATA: CAT_GUID2 TYPE CRM_ERMS_CAT_GUID.

DATA: CAT_GUID3 TYPE CRM_ERMS_CAT_GUID.

DATA: CAT_GUID4 TYPE CRM_ERMS_CAT_GUID.

DATA: CAT_GUID5 TYPE CRM_ERMS_CAT_GUID.

DATA: LS_SERV LIKE LINE OF it_Service_os .

DATA: LOSSET TYPE CRMT_SRV_OSSET_WRKT1.

DATA: LS_OSSET LIKE LINE OF LOSSET.

DATA: LSUBJECT TYPE CRMT_SRV_SUBJECT_WRKT.

DATA: L_SUBJECT LIKE LINE OF LSUBJECT.

DATA: GUID_EXT TYPE CRM_ERMS_CAT_OB_EXTKEY.

DATA: IT_CAT TYPE CRMT_ERMS_CAT_CA_BUF_TAB .

DATA: IT_CATL LIKE LINE OF IT_CAT.

DATA: IT_CAT_LAN TYPE CRMT_ERMS_CAT_CA_LANG_TAB.

DATA: IT_CATL_LAN LIKE LINE OF IT_CAT_LAN.

DATA: ASPQuery TYPE CRMT_ERMS_CAT_AS_QUERY.

DATA: GUID_EXT_aux TYPE STRING.

DATA: len type i.

INCLUDE crm_object_names_con.

ls_guid_bapi = p_guid.

insert ls_guid_BAPI into table It_guid.

INSERT gc_object_name-service_os INTO TABLE lt_requested_objects.

CALL FUNCTION 'CRM_ORDER_READ'

EXPORTING

IT_HEADER_GUID = IT_GUID

IMPORTING

ET_SERVICE_OS = it_Service_os.

LOOP AT it_Service_os INTO LS_SERV.

IF LS_SERV-REF_KIND = 'A'.

MOVE LS_SERV-OSSET TO LOSSET.

LOOP AT LOSSET INTO LS_OSSET.

IF LS_OSSET-profile_type = 'A' AND LS_OSSET-SUBJECT_PROFILE =

'Z1SERVICE'.

MOVE LS_OSSET-SUBJECT TO LSUBJECT.

LOOP AT LSUBJECT INTO L_SUBJECT.

CONCATENATE L_SUBJECT-KATALOGART L_SUBJECT-CODEGRUPPE

INTO GUID_EXT_aux.

len = STRLEN( GUID_EXT_AUX ).

WHILE len < 10.

CONCATENATE GUID_EXT_aux '_' INTO GUID_EXT_aux.

len = STRLEN( GUID_EXT_AUX ).

ENDWHILE.

CONCATENATE GUID_EXT_AUX L_SUBJECT-CODE INTO GUID_EXT.

len = STRLEN( GUID_EXT_AUX ).

c = 1.

WHILE c < len.

REPLACE '_' WITH ' ' INTO GUID_EXT.

c = c + 1.

endwhile.

ENDLOOP.

ENDIF.

ENDLOOP.

ENDIF.

ENDLOOP.

SELECT SINGLE OBJ_GUID FROM CRMC_ERMS_CAT_OK

INTO OBJ_GUID_1

WHERE OBJ_EXTKEY = GUID_EXT.

SELECT SINGLE CAT_GUID FROM CRMC_ERMS_CAT_LN

INTO CAT_GUID5

WHERE OBJ_GUID = OBJ_GUID_1.

SELECT SINGLE ASP_GUID FROM CRMC_ERMS_CAT_CA

INTO TREE_GUID1

WHERE CAT_GUID = CAT_GUID5.

SELECT SINGLE PARE_GUID FROM CRMC_ERMS_CAT_HI

INTO CAT_GUID4

WHERE TREE_GUID = TREE_GUID1

AND NODE_GUID = CAT_GUID5.

SELECT SINGLE PARE_GUID FROM CRMC_ERMS_CAT_HI

INTO CAT_GUID3

WHERE TREE_GUID = TREE_GUID1

AND NODE_GUID = CAT_GUID4.

SELECT SINGLE PARE_GUID FROM CRMC_ERMS_CAT_HI

INTO CAT_GUID2

WHERE TREE_GUID = TREE_GUID1

AND NODE_GUID = CAT_GUID3.

SELECT SINGLE PARE_GUID FROM CRMC_ERMS_CAT_HI

INTO CAT_GUID1

WHERE TREE_GUID = TREE_GUID1

AND NODE_GUID = CAT_GUID2.

CALL FUNCTION 'CRM_ERMS_CAT_CA_READ'

EXPORTING

IV_CAT_GUID = CAT_GUID5

IV_ASP_QUERY = ASPQuery

IMPORTING

ET_CAT_LANG = IT_CAT_LAN.

LOOP AT IT_CAT_LAN INTO IT_CATL_LAN.

MOVE IT_CATL_LAN-CAT_LABL TO Categoria5.

ENDLOOP.

CALL FUNCTION 'CRM_ERMS_CAT_CA_READ'

EXPORTING

IV_CAT_GUID = CAT_GUID4

IV_ASP_QUERY = ASPQuery

IMPORTING

ET_CAT_LANG = IT_CAT_LAN.

LOOP AT IT_CAT_LAN INTO IT_CATL_LAN.

MOVE IT_CATL_LAN-CAT_LABL TO Categoria4.

ENDLOOP.

CALL FUNCTION 'CRM_ERMS_CAT_CA_READ'

EXPORTING

IV_CAT_GUID = CAT_GUID3

IV_ASP_QUERY = ASPQuery

IMPORTING

ET_CAT_LANG = IT_CAT_LAN.

LOOP AT IT_CAT_LAN INTO IT_CATL_LAN.

MOVE IT_CATL_LAN-CAT_LABL TO Categoria3.

ENDLOOP.

CALL FUNCTION 'CRM_ERMS_CAT_CA_READ'

EXPORTING

IV_CAT_GUID = CAT_GUID2

IV_ASP_QUERY = ASPQuery

IMPORTING

ET_CAT_LANG = IT_CAT_LAN.

LOOP AT IT_CAT_LAN INTO IT_CATL_LAN.

MOVE IT_CATL_LAN-CAT_LABL TO Categoria2.

ENDLOOP.

CALL FUNCTION 'CRM_ERMS_CAT_CA_READ'

EXPORTING

IV_CAT_GUID = CAT_GUID1

IV_ASP_QUERY = ASPQuery

IMPORTING

ET_CAT_LANG = IT_CAT_LAN.

LOOP AT IT_CAT_LAN INTO IT_CATL_LAN.

MOVE IT_CATL_LAN-CAT_LABL TO Categoria1.

ENDLOOP.

ENDFUNCTION.

Regards,

Amit