Parallel Workflow Implementation

 

Parallel Workflow Configuration & BADI Implementation

 

·       We have Vendor namely In-direct Supplier in which we have steps as below workflow diagram.

·       There are two tasks which are in parallel which is independent of each other.

·       In MDG, we have to Implement some BADI’s to handle this type of workflow.

·       Following are the step by step procedure to Configure and Implementation of BADI’s.

 

            

                                    Figure: In-direct Supplier Workflow

 

Steps to follow

1.       First, will create service name which we will mention further to filter BADI’s. For that, go to MDGIMG -> Process Modelling -> Workflow -> Rule-Based Workflow -> Define Service name for Rule-Based Workflow.

2.       After that maintain one service name as follows.

 

3.       Next, Create Change Request. Copy all attributes from another standard Supplier workflow.

 

 

4.       Maintain Steps in following path.

 

5.       Next go to RBW configuration using Transaction USMD_SSW_RULE or below path.

 

 

6.       Maintain following values in Non-User DT, User DT and Single Value DT.

 

Note: In Service Name Field, give the Service name which we have created in above step.

Note: In Merge Parameter field, give the same Service name or Create another service name for this as per the requirement.

7.       Now Implement BADI’s. We have to Implement 2 BADI’s as following. Use following Path or Directly open Transaction SE18 and open Enhancement Spot ‘USMD_SSW_SERVICE_PROCESSOR’.

 

By Right Clicking on Implementation, create one Implementation, give Service name in filter value and activate it. Here, we no need to write any code inside method of Implementation.

8.       Go to another BADI, where we need to write code. Create one Implementation give Service name in Filter value and Open

 

Write Following Code and Modify it as per requirement.

 

 

 CONSTANTS: lc_mergestep    TYPE usmd_crequest_appstep VALUE 'DG',
               lc_finalize     TYPE usmd_crequest_action VALUE '05',
               lc_sendrivision TYPE usmd_crequest_action VALUE '06',
               lc_crtype       TYPE usmd_crequest_type VALUE 'ZINISUP1'.

    CLEAR: ev_merge_action, et_message, ev_merge_step.

    CALL METHOD cl_usmd_crequest_api=>get_instance
      EXPORTING
        iv_crequest          = iv_cr_number
      IMPORTING
        re_inst_crequest_api = DATA(lo_crequest).

    lo_crequest->read_crequest(
      IMPORTING
        es_crequest   = DATA(ls_request)                 " Change Request
    ).

    IF ls_request-usmd_creq_type EQ lc_crtype.

      LOOP AT it_step_action ASSIGNING FIELD-SYMBOL(<ls_step_action>).
        IF <ls_step_action>-action = lc_sendrivision.
          ev_merge_action = lc_sendrivision.
          ev_merge_step = lc_mergestep.
          RETURN.
        ENDIF.
      ENDLOOP.

      ev_merge_action = lc_finalize.
      ev_merge_step   = lc_mergestep.

    ENDIF.

 

9.       After that Activate this BADI too and test your workflow.

Comments

Popular posts from this blog

SAP MDG Process Modelling

MDG Derivation (BADI)

MDG Validation (Using BADI)