SAP MDG · WORKFLOWS

How do I implement an MDG system-method caller class for a rule-based workflow service?

Create a public final class that implements IF_BADI_INTERFACE and IF_USMD_SSW_SYST_METHOD_CALLER, then place the workflow logic in the interface methods required by the MDG system-method caller framework. The supplied source is only the class shell, so the concrete method implementation must follow the service signature in your system release.

Create a public final class that implements IF_BADI_INTERFACE and IF_USMD_SSW_SYST_METHOD_CALLER, then place the workflow logic in the interface methods required by the MDG system-method caller framework. The supplied source is only the class shell, so the concrete method implementation must follow the service signature in your system release.

`ZCL_ENH_SUP_SRE_SYS_METHOD` is the customer class skeleton for an MDG system-method caller. It is declared `PUBLIC FINAL CREATE PUBLIC` and implements `IF_BADI_INTERFACE` plus `IF_USMD_SSW_SYST_METHOD_CALLER`. To make it functional, you must implement the interface method(s) expected by the system-method caller BAdI in your release and put the service logic there.

Process flow

  1. Create the class `ZCL_ENH_SUP_SRE_SYS_METHOD` as `PUBLIC FINAL CREATE PUBLIC`.
  2. Implement `IF_BADI_INTERFACE` and `IF_USMD_SSW_SYST_METHOD_CALLER`.
  3. Open the interface in your system and implement the required callback method(s).
  4. Place the actual automatic-step logic inside the callback method(s) or a private helper method.
  5. Maintain the MDG workflow decision table row so the automatic step points to the service name used by the workflow.
  6. Activate the class and test the service call from the workflow runtime.

Referenced tables

ObjectPurpose
DT_SINGLE_VAL_<CR>Determines the next step, status, and condition alias for a change request.
DT_USER_AGT_GRP_<CR>Maps condition aliases to dialog agent groups and step types.
DT_NON_USER_AGT_GRP_<CR>Maps condition aliases to automatic-step agent groups, process pattern, and service name.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example

Exact relevant implementation excerpt from the knowledge document.

1class ZCL_ENH_SUP_SRE_SYS_METHOD definition 2 public 3 final 4 create public . 5 6public section. 7 8 interfaces IF_BADI_INTERFACE . 9 interfaces IF_USMD_SSW_SYST_METHOD_CALLER . 10protected section. 11private section. 12ENDCLASS. 13 14 15 16CLASS ZCL_ENH_SUP_SRE_SYS_METHOD IMPLEMENTATION. 17ENDCLASS.

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • What interfaces does a custom MDG system-method caller class implement?
  • How do I create a class for an MDG system method service call?
  • How should I start implementing a class like ZCL_ENH_SUP_SRE_SYS_METHOD?

Possible questions

  • How do I implement an MDG system-method caller class for a rule-based workflow service?
  • What interfaces does a custom MDG system-method caller class implement?
  • How do I create a class for an MDG system method service call?
  • How should I start implementing a class like ZCL_ENH_SUP_SRE_SYS_METHOD?
  • How does MDG workflow call a custom system method?

Keywords

ZCL_ENH_SUP_SRE_SYS_METHODIF_BADI_INTERFACEIF_USMD_SSW_SYST_METHOD_CALLERMDG rule-based workflowsystem method callerBRF+ decision tablesUSMD_SSW_SYSTEM_METHOD_CALLER