SAP MDG · WORKFLOWS

How do I configure an SAP MDG follow-up / successor Change Request after activation?

Configure a synchronous system-method step in MDG Rule-Based Workflow, assign a Service Name, and implement BAdI `USMD_SSW_SYSTEM_METHOD_CALLER` so the activation step creates and starts a successor Change Request via `CL_USMD_GOV_API`.

Configure a synchronous system-method step in MDG Rule-Based Workflow, assign a Service Name, and implement BAdI `USMD_SSW_SYSTEM_METHOD_CALLER` so the activation step creates and starts a successor Change Request via `CL_USMD_GOV_API`.

In SAP MDG, a follow-up or successor Change Request is typically created by adding a synchronous system-method step to Rule-Based Workflow and routing it through BAdI `USMD_SSW_SYSTEM_METHOD_CALLER`. The Service Name in BRF+ must match the BAdI filter, and the implementation should read the source CR, map it to the target CR type, create the successor request with `CL_USMD_GOV_API`, populate the target entity, save it, and start its workflow.

Process flow

  1. Copy the source CR type to the target follow-up CR type.
  2. Copy or adapt the workflow steps for the custom CR type.
  3. Define the Service Name for the automatic step.
  4. Maintain the BRF+ decision tables for the new CR type.
  5. Set the non-user-agent step to Process Pattern `02`.
  6. Create the BAdI implementation for `USMD_SSW_SYSTEM_METHOD_CALLER` in `SE18` / `SE19`.
  7. Set the BAdI filter value to the same Service Name used in BRF+.
  8. Implement the source-CR read, target-CR create, entity write, save, and `start_workflow` logic in ABAP.

Referenced tables

ObjectPurpose
USMD120CCR status / rejection reason table used by the workflow framework.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example: utilize_BAdI_rule_based_workflow_create_followup_change_request.abap

Exact relevant implementation excerpt from the knowledge document set.

1"! <p class="shorttext"><strong>SAP MDG Rule-Based Workflow</strong><br/> 2"! Call a synchronous system method to create a follow-up Change Request</p> 3"! 4"! <p>Source-document code reference for BAdI 5"! {@link USMD_SSW_SYSTEM_METHOD_CALLER} and method 6"! {@link IF_USMD_SSW_SYST_METHOD_CALLER~CALL_SYSTEM_METHOD}.</p> 7"! 8"! <h2>SAP objects</h2> 9"! <ul> 10"! <li>Enhancement spot: USMD_SSW_SERVICE_PROCESSOR</li> 11"! <li>BAdI: USMD_SSW_SYSTEM_METHOD_CALLER</li> 12"! <li>Interface: IF_USMD_SSW_SYST_METHOD_CALLER</li> 13"! <li>Method: IF_USMD_SSW_SYST_METHOD_CALLER~CALL_SYSTEM_METHOD</li> 14"! <li>Sample enhancement implementation: MDG_BS_MAT_CREATE_SUCCESSOR_CR</li> 15"! <li>Required SAP Note: 3199378</li> 16"! <li>Service name used by the scenario: ZCREATE_FOLLOW_UP_CR</li> 17"! <li>Process pattern: 02 - Synchronous System Method</li> 18"! </ul> 19"! 20"! <h2>Important source limitation</h2> 21"! <p>The PDF contains a screenshot of only the beginning of the copied SAP 22"! sample method. It does not print the complete sample-class source. The 23"! excerpt below therefore ends exactly where the visible screenshot ends. 24"! No missing continuation has been invented.</p> 25"! 26"! @tags SAP-MDG Rule-Based-Workflow Follow-Up-Change-Request 27"! @tags USMD_SSW_SYSTEM_METHOD_CALLER USMD_SSW_SERVICE_PROCESSOR 28"! @tags CALL_SYSTEM_METHOD ZCREATE_FOLLOW_UP_CR Process-Pattern-02 29 30*---------------------------------------------------------------------* 31* Generic and scenario-specific object names shown in the guide 32*---------------------------------------------------------------------* 33* Generic enhancement implementation : ZMY_SERVICE_CALL_SYSTEM_METHOD 34* Scenario enhancement implementation: ZBDI_CREATE_FOLLOW_UP_CR 35* 36* Generic BAdI implementation : ZMY_SERVICE_CALL_SYSTEM_METHOD 37* Scenario BAdI implementation : ZBDI_CREATE_FOLLOW_UP_CR 38* 39* Generic implementing class : ZCL_MY_SERVICE_CALL_SYS_METHOD 40* Scenario implementing class : ZCL_ZBDI_CREATE_FOLLOW_UP_CR 41* 42* Generic filter value : ZMY_SERVICE_NAME 43* Scenario filter value : ZCREATE_FOLLOW_UP_CR 44* 45* Filter : SERVICE_NAME 46* Comparator : = 47*---------------------------------------------------------------------* 48 49*---------------------------------------------------------------------* 50* Visible method parameters in the PDF 51*---------------------------------------------------------------------* 52* IV_CR_NUMBER TYPE USMD_CREQUEST 53* IV_SERVICE_NAME 54* EV_ACTION 55* ET_MESSAGE 56* CT_CONTEXT_TAB 57* CX_BO_TEMPORARY 58*---------------------------------------------------------------------* 59 60*---------------------------------------------------------------------* 61* Code excerpt visible in the PDF screenshot 62*---------------------------------------------------------------------* 63 64METHOD if_usmd_ssw_syst_method_caller~call_system_method. 65 "* Create a follow-up change request with reference to an existing, closed change request 66 67 "Use the fieldnames and types of database table USD120C for defining the local type 68 TYPES: BEGIN OF lty_crequest, 69 usmd_crequest TYPE usmd_crequest, 70 usmd_created_by TYPE xubname, 71 END OF lty_crequest. 72 DATA lt_crequest TYPE SORTED TABLE OF lty_crequest WITH UNIQUE KEY usmd_crequest. 73 74 "Clear the exporting parameter 75 CLEAR: ev_action, et_message. 76 77 CASE iv_service_name. 78 WHEN 'insert your service name (as defined via IMG) here'. 79 80 "Ensure that the reference change request number is provided 81 IF iv_cr_number IS INITIAL. 82 "Implement proper error handling here... 83 RETURN. 84 ENDIF. 85 86 "Get an instance of the External Model API 87 cl_usmd_model_ext=>get_instance( 88 EXPORTING 89 i_usmd_model = space "No data model need to be provided here 90 IMPORTING 91 eo_instance = DATA(lo_model_ext) 92 et_message = et_message ). 93 IF et_message IS NOT INITIAL. 94 "Do proper error handling 95 RETURN. 96 ENDIF. 97 98*---------------------------------------------------------------------* 99* End of source excerpt visible in the PDF. 100* The remaining CASE logic and method ending are not shown. 101*---------------------------------------------------------------------*

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

Related questions and keywords

Alternative questions

  • How do I create a successor CR in SAP MDG Rule-Based Workflow?
  • How do I trigger a follow-up Change Request from a system method step in MDG?
  • How do I implement USMD_SSW_SYSTEM_METHOD_CALLER for a successor CR?

Possible questions

  • How do I configure an SAP MDG follow-up / successor Change Request after activation?
  • How do I create a successor CR in SAP MDG Rule-Based Workflow?
  • How do I trigger a follow-up Change Request from a system method step in MDG?
  • How do I implement USMD_SSW_SYSTEM_METHOD_CALLER for a successor CR?
  • What BRF+ and BAdI settings are needed for an MDG successor CR?

Keywords

SAP MDGRule-Based Workflowfollow-up Change Requestsuccessor Change RequestUSMD_SSW_SYSTEM_METHOD_CALLERUSMD_SSW_SERVICE_PROCESSORIF_USMD_SSW_SYST_METHOD_CALLER~CALL_SYSTEM_METHODProcess Pattern 02synchronous system methodBRF+SE18MDGIMGCL_USMD_CREQUEST_APICL_USMD_GOV_APIZMDG_0G_SUCCESSOR_CRZCREATE_FOLLOW_UP_CRMAT01ZMAT01FU