Trigger a workflow when PR is created

        

                        Steps to trigger workflow for PR

                        Object - BUS2105

Step-1: Goto T-code SWDD.

Step-2: Click on create workflow button (left top corner) and save the workflow.

Step-3: Select workflow container in left side and double click on click to create.



Step-4: Give element name, name, short description under D.type tab. Select import under properties tab. 


Step-5: Press enter and click on save.

Step-6: Link the object -- Goto=> Basic data=> click on start events tab.

Step-7: Select category 'BO' give object type 'BUS2105' and select event 'CREATED'.

 


Step-8: Click on binding and press enter and click on active.



Step-9: Save the workflow and back to workflow screen.



Step-10: Right click on undefined and click on create double click on user decision.

Step-11: Give title like this (PR &1 Approve/Reject). &1 replaced with parameter1.

Step-12: Take search help from parameter1. Expand container name and double click on number.

Step-13: Select workflow initiator under agents. Give decision texts and outcome name. click on ok button.


Step-14:
Workflow looks likes.

    



Step-15: Right click on approved and click on create and double click on send email.

Step-16: Select recipient type (U) and give email (You can select workflow initiator also).

Step-17: Give subject and mail body like this. You can use insert expression under editor - click on insert expression expand container and double click on pr number (This is used to take PR values).



Step-18: Click on Ok and give task name.

Step-19: check and activate the workflow.


Test the workflow.

    1. Goto T-code: ME51N.

    2. Create a PR.

        


  Approve/Reject

     1. Goto T-code: SWIA and click on execute.

     2. Select the relevant task and execute (As our scenario email triggered for approved so I 'am selected approve).

Check the email.

    1. Goto T-code: SOST.

    2. Select email and click on display.

     


********************************Thank You*****************************

Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Pf status and user command in factory method - OOPS ALV in ABAP

Add custom tab to me51n at item level in ABAP