In the response profile (transaction CRMD_SERV_SLA) you have the option to define response times based on a combination of priority and categories from the multilevel categorization.
In this blog I will not describe the complete customizing settings for SLA determination but I want to focus on a specific problem when you use the combination of priority and multilevel categorization in your response profile:
In standard CRM re-determination of the SLA times is only triggered on change of the priority field. So even if you have setup different response times per category, changing the category on your service request does not trigger a re-determination of the response time.
Example:Let’s assume you have setup the following response profile (simplified):
When you create a service request with priority 1 and category ‘Software’, the system will determine the correct response time of 4 hours.
Situation 1: If you change the priority from 1 to 2 the system will re-determine the response time, 8 hours. So far so good.
Situation 2: If you change the category from ‘Software’ to ‘Mechanical’ the system will NOT re-determine the response time and the response time will stay 4 hours instead of 1 hour. This is NOT OK.
Lucky for you it’s relatively easy to solve this:
Step 1: Create Function Module
First create a new function module that will re-calculate the dates when the categorization is changed.
Go to transaction SE37 and create a new “Z” space function module, e.g.: “ZCRM_SRQM_CHECK_SLA_UPDATE_EC”.
Create the following import parameters:
You can use the following source code (just copy and paste):
CALL FUNCTION 'CRM_SERVICE_CALC_TIME'
iv_header_guid = iv_header_guid
abort = 1
OTHERS = 2.
IF sy-subrc <> 0.
Step 2: Maintain table CRM_FUNC_ASSIGN
To be able to select the new function module in Step 3, you need to create an entry in table CRMV_FUNC_ASSIGN via transaction SM30.
Step 3: Register Event
After you created the Z function module, you need to create an event callback entry so that this function module will be called whenever the categorization changes.
Go to transaction CRMV_EVENT and select transaction category BUS2000116. Press ‘Callback for Cat./Obj./Event’.
Create a new entry for your function module 'ZCRM_SRQM_CHECK_SLA_UPDATE_EC’.
Implement the above steps and the recalculation of the response times should work fine!