Skip to Content
Author's profile photo Former Member

Escalation only on workdays in the MSMP workflow

I really like the concept of enhancements, as it gives the flexibility to change the behavior of the application from the standard to a custom requirement. There is a step by step WIKI about creating simple enhancements, which is helpful to get started: Enhancement Framework – Class Enhancements – Pre-exit, Post-exit and Overwrite-exit methods – Concept and Simple Scenari…

In SAP GRC Access Control 10.x releases the weekend days and public holidays are also considered setting the escalation time according to MSMP stage level settings per standard. Although it can be a requirement to restrict the escalation to working days only and this can be easily achieved by creating an enhancement. To determine the workdays the best approach is to use the factory calendar in the SAP system, see Creating Factory/Holiday Calendar. First it needs to be decided to choose an existing factory calendar or create a new one in SCAL transaction.


To enable escalation only on workdays the class CL_GRFN_MSMP_WF_TEMPLATE_BASE has to be enhanced by applying an overwrite-exit method to the method GET_ESCALATION_SETTINGS. This method calls the function module END_TIME_DETERMINE, which has the optional parameter FACTORY_CALENDAR. Copy the standard code into the overwrite-exit method and add the Factory Calendar ID, which has been chosen from SCAL transaction. Now the escalation date and time is calculated considering working days only, as maintained in the factory calendar.


METHOD iow_z_workday_escalation~get_escalation_settings.


*” Declaration of Overwrite-method, do not insert any comments here please!



*”  importing



*”  returning


*”  raising



*”    CX_GRFN_MSMP .


     DATA: ls_escalation_settings TYPE grfnmw_s_template_escalation,

           l_escalation_user      TYPE grfn_mw_wf_appr_usr.

     DATA ls_global_settings TYPE grfnmwcnglbset.

     DATA: end_date   LIKE sydatum,

           end_time   LIKE syuzeit,

           start_date LIKE sydatum,

           start_time LIKE syuzeit.

     DATA: lv_timestamp TYPE timestampl.

     ls_global_settings = cl_grfn_msmp_configuration=>get_global_settings( is_msmp_exec_contextprocess_id ).

     IF  is_stageescalation_type <> grfnw_msmp_c_escalation_typeno_escalation.

       IF ( ls_global_settingsescalation_enble EQ abap_true ).

         ls_escalation_settingsrequested_esclation_date = ls_global_settingsescalation_date.


       ls_escalation_settingsescalation_type = is_stageescalation_type.

       GET TIME STAMP FIELD lv_timestamp.

* convert to date and time

       CONVERT TIME STAMP lv_timestamp TIME ZONE  syzonlo INTO DATE start_date TIME start_time.

* calculate time



           duration               = is_stageescalation_time

           unit                   = grfnw_msmp_c_duration_unitsminutes

           factory_calendar           = ‘EU’ “Factory Calendar ID from SCAL transaction


           end_date               = end_date

           end_time               = end_time


           start_date             = start_date

           start_time             = start_time


           factory_calendar_not_found = 1

           date_out_of_calendar_range = 2

           date_not_valid             = 3

           unit_conversion_error      = 4

           si_unit_missing            = 5

           parameters_no_valid        = 6

           error_message              = 7

           OTHERS                     = 7.

       IF sysubrc = 0.

         ls_escalation_settingslatest_end_date = end_date.

         ls_escalation_settingslatest_end_time = end_time.


         RAISE EXCEPTION TYPE cx_grfn_msmp_configuration_err.



     es_escalation_settings = ls_escalation_settings.


In MSMP stage level settings I have maintained 2 days / 48 hours as escalation time to test the enhancement.


The request has been submitted on Friday. Per standard it would escalate on Sunday. Activating the described enhancement the request escalated and moved to the next stage on Tuesday, as it is recorded in the audit log.


I think who sets escalation in the workflow customizing, will also like this enhancement.

Best Regards,

Zoltan Galik

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Zoltan,

      Excellent document. Thanks a lot for sharing !!!



      Author's profile photo Rakesh Ram
      Rakesh Ram

      Hi Zoltan,

      One of the best document with regards to MSMP.

      Can rate it as 5/5.

      Thanks for sharing.


      Rakesh Ram M

      Author's profile photo Former Member
      Former Member

      Fabulous document Zoltan... Nice work !

      Author's profile photo Artem Ivashkin
      Artem Ivashkin

      Dear Zoltan,

      Is it possible to make enhancement depending on the time zone of approver?

      Example, a user from California created a request, the request selected an approver from Europe where operational day is ended. The alternative approver is placed in Japan. So the request might have been approved in the end of the day in the US by Japanese approver, but due to escalation it will be forwarded to Japanese approver after European approver (in end of the day after). The best way of this would be counting time for the escalation basing on the time zone of the current approver. In this way, the request will not run from the the European approver and US user will get the access by his operational day. Escalation will check time zone for the approver and if the time has finished for main approver in his TZ, then it will forward the request to alternative approver.

      I suppose that I made some mess in the example with US, Japan, Europe, but I hope you get the idea 🙂



      Author's profile photo Former Member
      Former Member

      great post!