SAP CRM Service Request subject value determination
When a new Service Request is created, the multi-level drop down list for Service Request subject is available.
![](https://img.haomeiwen.com/i2085791/a8e3115eb2d18475.png)
![](https://img.haomeiwen.com/i2085791/6e4b7255508ff0c2.png)
Where do the value for those drop down list come from?
Here below is what I found via debugging:
get allowed category type from table CRMC_PROC_CATTYP based on transaction type:
![](https://img.haomeiwen.com/i2085791/c9118d02cce2a58a.png)
Two entries found:
![](https://img.haomeiwen.com/i2085791/03bd76b2face2285.png)
These two entries are inserted here:
![](https://img.haomeiwen.com/i2085791/cd0fd1014dc3346b.png)
![](https://img.haomeiwen.com/i2085791/73a5c905689eaa3e.png)
Then check for the given combination of Transaction type plus Catalog category, whether there is existing schema defined.
The check is done by API CL_CRM_ML_CATEGORY_UTIL=>GET_ASPECT.
![](https://img.haomeiwen.com/i2085791/250d14da4a361756.png)
I wrote a small report to check whether a schema is available for corresponding category:
REPORT zdetermine_schema.
PARAMETERS: guid TYPE crmt_object_guid OBLIGATORY DEFAULT '6C0B84B75FAB1ED7BC85AA545271F98C',
cat TYPE crmt_catalogtype OBLIGATORY DEFAULT 'C'.
DATA: lv_guid TYPE crmt_object_guid.
lv_guid = guid.
DATA: lr_aspect TYPE REF TO if_crm_erms_catego_aspect,
ls_detail TYPE crmt_erms_cat_as_buf.
CALL METHOD cl_crm_ml_category_util=>get_aspect
EXPORTING
iv_ref_guid = lv_guid
iv_ref_kind = 'A'
iv_profile_type = 'A'
iv_catalog_type = cat
IMPORTING
er_aspect = lr_aspect.
IF lr_aspect IS BOUND.
lr_aspect->get_details( IMPORTING ev_asp = ls_detail ).
WRITE:/ 'ASP id:', ls_detail-asp-asp_id.
ELSE.
WRITE:/ 'No detail data found'.
ENDIF.
In my example, no schema exists for category C:
![](https://img.haomeiwen.com/i2085791/72eef44b20cb9c8d.png)
![](https://img.haomeiwen.com/i2085791/1ccfa13429c7d34d.png)
But a schema exists for type D:
![](https://img.haomeiwen.com/i2085791/4ca6fb965822d317.png)
![](https://img.haomeiwen.com/i2085791/f85e7957dab200b5.png)
the ASP ID YBP_SERVICE comes from here:
![](https://img.haomeiwen.com/i2085791/c21549565bdb4534.png)
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
![](https://img.haomeiwen.com/i2085791/fc7ecd97deb67090.png)
网友评论