on 04-02-2012 4:20 PM
Hey there,
I'm trying to read a specific categorization schema within CRM Interaction Center.
Does anybody know a function module or some specific tables I can read?
Many thanks for your help in advanced.
Robert
Hello Robert,
I have a similar requirement where you able to figure it out how to read categorization schema
at interaction center?
Regards
Najm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Najm,
I'm unsure how I solved this requirement at that time. But as far as I remember the important tables were "crmc_erms_cat_as", "crmc_erms_cat_ca" etc. Just search for the tables with the prefix "crmc_erms_cat" in transaction SE11.
Definitly it makes sense to read the schema recursively as I did it in the same way.
Hope that helps a little bit.
Robert
Hi,
use the below code if its in gui,
*data declarations
DATA : lv_guid TYPE crmd_orderadm_h-guid,
lr_aspect TYPE REF TO if_crm_erms_catego_aspect,
lr_category TYPE REF TO if_crm_erms_catego_category,
lr_categories TYPE REF TO data,
ls_cat_lang TYPE crmt_erms_cat_ca_lang,
lv_cat_string TYPE string,
lt_guid TYPE crmt_object_guid_tab,
lt_subject TYPE crmt_subject_wrkt,
ls_subject TYPE crmt_subject_wrk,
BEGIN OF ls_catid,
catid TYPE crm_erms_cat_ca_id,
END OF ls_catid,
lt_catid LIKE TABLE OF ls_catid.
TYPES: ty_categories_tab_type TYPE TABLE OF REF TO if_crm_erms_catego_category.
FIELD-SYMBOLS: <fs_categories> TYPE ty_categories_tab_type.
PARAMETERS : objid TYPE crmd_orderadm_h-object_id DEFAULT '8000001570'.
SELECT SINGLE guid FROM crmd_orderadm_h INTO lv_guid WHERE object_id = objid.
CREATE DATA lr_categories TYPE ty_categories_tab_type.
CALL METHOD cl_crm_ml_category_util=>get_categoryfirst
EXPORTING
iv_ref_guid = lv_guid
iv_ref_kind = 'A'
iv_catalog_type = 'D'
IMPORTING
er_aspect = lr_aspect
er_category = lr_category.
CALL METHOD cl_crm_ml_category_util=>get_cat_pars_all
EXPORTING
ir_aspect = lr_aspect
ir_category = lr_category
IMPORTING
er_categories = lr_categories.
ASSIGN lr_categories->* TO <fs_categories>.
SORT <fs_categories>.
LOOP AT <fs_categories> INTO lr_category.
CALL METHOD lr_category->get_details
IMPORTING
ev_cat_lang = ls_cat_lang.
ls_catid-catid = ls_cat_lang-cat-cat_id.
APPEND ls_catid TO lt_catid.
CLEAR : ls_catid.
ENDLOOP
if you want to read it in UI of service request component,
* get category assigned in service request
lr_adminh ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
IF lr_adminh IS BOUND.
lr_coll = lr_adminh->get_related_entities( iv_relation_name = 'BTHeaderCategorySet' ).
ENDIF.
CHECK lr_coll IS BOUND.
lr_hdr_cat ?= lr_coll->get_current( ).
CHECK lr_hdr_cat IS BOUND.
CLEAR lr_coll.
IF lr_hdr_cat IS BOUND.
lr_coll = lr_hdr_cat->get_related_entities( iv_relation_name = 'BTCategorySchemaAll' ).
ENDIF.
CHECK lr_coll IS BOUND.
lr_cat_schma ?= lr_coll->get_current( ).
WHILE lr_cat_schma IS BOUND.
CALL METHOD lr_cat_schma->if_bol_bo_property_access~get_property_as_string
EXPORTING
iv_attr_name = 'ASP_ID'
RECEIVING
rv_result = lv_aspid.
IF lv_aspid EQ 'STC_SR_CATEGORIES'.
EXIT.
ELSE.
lr_cat_schma ?= lr_coll->get_next( ).
ENDIF.
ENDWHILE.
CLEAR lr_coll.
IF lr_cat_schma IS BOUND.
lr_coll = lr_cat_schma->get_related_entities( iv_relation_name = 'BTCategoryFirst_S' ).
ENDIF.
CHECK lr_coll IS BOUND.
lr_cat_first ?= lr_coll->get_current( ).
CHECK lr_cat_first IS BOUND.
DATA : ls_category TYPE crmst_category_btil.
CALL METHOD lr_cat_first->if_bol_bo_property_access~get_properties
IMPORTING
es_attributes = ls_category. "Category guid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.