Objective:
To trigger workflow from Dynamic Action. We will consider a scenario in which during Org. Reassignment, based on Action Type and Reason for Action, we want to trigger mail to specific user.
Prerequisite:
1. Basic knowledge in Dynamic Action
2. Basic knowledge in Workflow
Procedure:
1. Create object type in SWO1
2. Building workflow using SWDD and linking from SWE2
3. Writing code in Dynamic Action view V_T588Z
Step 1: Create object type in SWO1
Create object type as ZZZ_JLINK1 with event Trigger and create a parameter in event as mentioned below.
Refer the below link for more details for basic idea in workflow.
http://scn.sap.com/docs/DOC-58404
Step 2: Building workflow using SWDD and linking from SWE2
Create new workflow from SWDD and create workflow container PERNR as below with properties checked for import and export.
Ensure Binding as below.
Add step for sending mail and then inside task, make sure you have container element WF_PERNR.
Mention the user and then specify subject and contents accordingly in Mail tab.
Do the linking as below in SWE2.
Step 3: Writing code in Dynamic Action view V_T588Z
Write the below code in v_T588Z for Infotype 0001. Here P refers checking the condition and we are checking MASSN for ‘02’ value and MASSG for ‘03’ value.
F refers calling subroutine. TRIGGER_WORKFLOW is the subroutine in ZZZ_JAYTEST1 program which holds the triggering part. In program, we are triggering workflow. We are using PERNR as container element which will be populated with values in workflow.
Output:
Do the action for Org. reassignment in PA40. You can see mail getting triggered in SBWP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |