SAP MDG · WORKFLOWS
How do I configure SAP MDG Rule-Based Workflow to automatically create a follow-up 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 in enhancement spot USMD_SSW_SERVICE_PROCESSOR. In the material example, the guide copies MAT01 to ZMAT01FU, uses service name ZCREATE_FOLLOW_UP_CR, and routes the Non-User Agent decision table with Process Pattern 02 so the follow-up CR is created 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 in enhancement spot USMD_SSW_SERVICE_PROCESSOR. In the material example, the guide copies MAT01 to ZMAT01FU, uses service name ZCREATE_FOLLOW_UP_CR, and routes the Non-User Agent decision table with Process Pattern 02 so the follow-up CR is created after activation.
To create a follow-up change request automatically after activation in SAP MDG, use Rule-Based Workflow with a synchronous system-method step. The documented material example copies MAT01 to a custom CR type ZMAT01FU, assigns service name ZCREATE_FOLLOW_UP_CR, and implements BAdI USMD_SSW_SYSTEM_METHOD_CALLER so the follow-up CR is created when the source request reaches successful activation.
Process flow
- Copy the standard CR type to a custom follow-up CR type.
- Copy the workflow steps to the custom CR type.
- Define the service name used by the system-method step.
- Export the MAT01 BRF+ decision tables: Single Value, User Agent, and Non-User Agent.
- Adjust and import the decision tables for the custom CR type.
- Set the Non-User Agent row with Condition Alias 10, Agent Group 10, Process Pattern 02, and the service name.
- Adjust the Single Value Decision Table so the flow reaches step 99 and status 05 as documented.
- Create the BAdI implementation in SE18 for
USMD_SSW_SYSTEM_METHOD_CALLERunder enhancement spotUSMD_SSW_SERVICE_PROCESSORto implement IF_USMD_SSW_SYST_METHOD_CALLER~CALL_SYSTEM_METHOD and check IV_SERVICE_NAME/IV_CR_NUMBER as in the guide
Referenced tables
| Object | Purpose |
|---|---|
BRF+ Single Value Decision Table | Drives the next step and status; the guide says to adjust it so the workflow routes through the system-method step, including step 99 and status 05. |
BRF+ User Agent Decision Table | Maintains the dialog-agent routing for the copied workflow. |
BRF+ Non-User Agent Decision Table | Defines the automatic step with Condition Alias 10, Agent Group 10, Process Pattern 02, and Service Name ZCREATE_FOLLOW_UP_CR. |
ILLUSTRATIVE ABAP SAMPLE
Source ABAP example
Exact relevant implementation excerpt from the knowledge document.
1class ZCL_MDG_SUP_SYN_FOLLWUP_CR_CUS 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 .
10
11 class-methods SEND_EMAIL
12 importing
13 !IV_STATUS type STRING
14 !IT_VALIDATION_ERRORS type MDG_BS_BP_MSGMAP_T optional
15 !IT_RETURN type BAPIRETM optional
16 !IV_BP_GUID type BUT000-PARTNER_GUID
17 !IV_SUP_CREQ type USMD_CREQUEST
18 !IV_SUPPL_BP type BU_PARTNER
19 !IV_KUNNR type KUNNR
20 !IV_TEXT type CHAR255 .
21 class-methods UPDATE_ERP_VENDOR
22 importing
23 !IV_KUNNR type KUNNR
24 !IV_LIFNR type LIFNR
25 exporting
26 !EV_SUCCESS type BOOLEAN .
27 class-methods MDG_REFRESH_CHANGE_REQUEST
28 importing
29 !IV_PARTNER type BU_PARTNER
30 exporting
31 !EV_CREQUEST type USMD_CREQUEST
32 !EV_FAILED type BOOLE_D
33 !ET_MESSAGE type USMD_T_MESSAGE .
34protected section.
35private section.
36ENDCLASS.
37
38
39
40CLASS ZCL_MDG_SUP_SYN_FOLLWUP_CR_CUS IMPLEMENTATION.
41
42
43METHOD if_usmd_ssw_syst_method_caller~call_system_method.
44*&H ------------------------------------------------------------------*
45*&H HEADER INFORMATION
46*&H-------------------------------------------------------------------*
47*&H AUTHOR: | Jithin Inreddy
48*&H Team : | SAP MDG
49*&H Date: | 11.01.2024
50*$*$------------------------------------------------------------------*
51*&D Subcontracting Customer Creation using Supplier Data from Supplier Create
52*$*$------------------------------------------------------------------*
53*&A Start CHANGE HISTORY
54*$*$------------------------------------------------------------------*
55*&A Program changes:
56*$*$------------------------------------------------------------------*
57*&A Date |TA-No. | Programmer (Initials)
58*$*$------------------------------------------------------------------*
59*&A | |
60*$*$------------------------------------------------------------------*
61* data: lo_mdg_conv type ref to cl_usmd_conv_som_gov_api,
62* lo_som_gov_api_error type ref to cx_usmd_conv_som_gov_api,
63* lo_gov_api_error type ref to cx_usmd_gov_api,
64* lo_cons_error type ref to cx_usmd_app_context_cons_error.
65 TYPES: BEGIN OF ty_result,
66 bukrs TYPE lfb1-bukrs,
67 akont TYPE lfb1-akont,
68 ktopl TYPE t001-ktopl,
69 saknr TYPE ska1-saknr,
70 END OF ty_result.
71
72 DATA: lt_validation_errors TYPE mdg_bs_bp_msgmap_t,
73 lv_s1 TYPE string.
74 CONSTANTS: lc_model TYPE usmd_model VALUE 'BP'.
75 DATA: lr_model TYPE REF TO if_usmd_model_ext,
76 lt_entity_data TYPE usmd_ts_data_entity,
77 lv_bp_header TYPE /mdgbp/_s_bp_pp_bp_header,
78 ls_zsub_bp_header TYPE /mdgbp/_s_bp_pp_bp_header,
79 lv_bp_centrl TYPE /mdgbp/_s_bp_pp_bp_centrl,
80 lt_entity_zsub_bpcentrl TYPE TABLE OF /mdgbp/_s_bp_pp_bp_centrl,
81 ls_zsub_bp_centrl TYPE /mdgbp/_s_bp_pp_bp_centrl,
82 lt_bp_role TYPE zmdg_tt_bp_es_bp_role,
83 lt_bp_idnum TYPE zmdg_tt_bp_idnum,
84 lt_cust_bp_indstr TYPE TABLE OF /mdgbp/_s_bp_pp_bp_indstr,
85 lt_bp_cusdun TYPE zmdg_tt_bp_cusdun,
86 lt_address TYPE zmdg_tt_address,
87 ls_bp_cusgen TYPE /mdgbpx/_s_bp_pp_bp_cusgen,
88 ls_entity_bpcusgen TYPE /mdgbpx/_s_bp_pp_bp_cusgen,
89 ls_entity_bpvengen TYPE /mdgbpx/_s_bp_pp_bp_vengen,
90 lt_entity_zsub_bpvengen TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_vengen,
91 lt_bp_vengen TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_vengen,
92 ls_zsub_bpcusgen TYPE /mdgbpx/_s_bp_pp_bp_cusgen,
93 ls_entity_bpsales TYPE /mdgbpx/_s_bp_pp_bp_sales,
94 ls_cust_bpsales TYPE /mdgbpx/_s_bp_pp_bp_sales,
95 lt_bp_sales TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_sales,
96 lt_cust_bp_sales TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_sales,
97 lt_bp_custax TYPE zmdg_tt_bp_custax,
98 ls_entity_bpcentrl TYPE /mdgbp/_s_bp_pp_bp_centrl,
99 ls_entity_adpostal TYPE /mdgbp/_s_bp_pp_ad_postal,
100 ls_entity_indstr TYPE /mdgbp/_s_bp_pp_bp_indstr,
101 lt_cust_bp_cus_cc TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_compny, " zmdg_tt_bp_cus_cc,
102 ls_bp_cus_cc TYPE /mdgbpx/_s_bp_pp_bp_cus_cc,
103 lt_bp_cus_cc TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_cus_cc,
104 lt_entity_bp_compny TYPE TABLE OF /mdgbpx/_s_bp_pp_bp_compny,
105 ls_entity_bp_compny TYPE /mdgbpx/_s_bp_pp_bp_compny,
106* lt_bp_cus_cc type /mdgbpx/_s_bp_pp_bp_compny,
107 lt_adpostal_data_final TYPE TABLE OF /mdgbp/_s_bp_pp_ad_postal, "zmdg_tt_ad_postal,
108 lt_entity_zsub_ad_postal TYPE TABLE OF /mdgbp/_s_bp_pp_ad_postal, "zmdg_tt_ad_postal,
109 ls_entity_data TYPE usmd_sx_data_entity,
110 lt_knvp TYPE TABLE OF knvp,
111 ls_knvp TYPE knvp,
112 lt_kun_knvp TYPE TABLE OF knvp,
113 lt_ku2_knvp TYPE TABLE OF knvp,
114 lv_message TYPE usmd_s_message,
115 lv_cr_id TYPE usmd_crequest,
116 lo_gov_api TYPE REF TO if_usmd_gov_api,
117 lo_usmd_gov_api TYPE REF TO cx_usmd_gov_api,
118 lv_temp_key TYPE string,
119 lv_number_range TYPE inri-nrrangenr, " Number Range
120 lv_object TYPE inri-object, " Object NameThe remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How can I trigger a follow-up CR from an MDG workflow system method?
- Which BAdI and BRF+ settings are needed for successor change request creation in SAP MDG?
- How do I implement a synchronous system method in MDG Rule-Based Workflow for follow-up CR creation?
Possible questions
- How do I configure SAP MDG Rule-Based Workflow to automatically create a follow-up change request after activation?
- Which BAdI and BRF+ settings are needed for successor change request creation in SAP MDG?
- How do I implement a synchronous system method in MDG Rule-Based Workflow for follow-up CR creation?
- What service name and process pattern are used for MDG follow-up CR creation?
- Can you show ABAP code for the CALL_SYSTEM_METHOD implementation?