Skip to Content
Author's profile photo Deepika Chandrasekar

Parallel Approval Process in Workflow using Block

This Document is about how paralel approval process can be done in Workflow.

Scenario:

Some cases for one approval we

need send separate approval task to many approvers. If all the Approvers approves then only the next step should be processesed in workflow.

Process:

In Workflow We have blockstep type through which we can achieve this parallel approval process.

Step1.Block Step Type

We need to create Step using Step type Block.

BLOCK_1.jpg

Step 2:

In Control Tab we need to choose Block type as ParForEach

Then we need to choose Multi line element in Parallel Processing

/wp-content/uploads/2014/01/block_2_354438.jpg

STEP 3:Determine Approver

Choose Activity step type and pass _ZAPPROVER_LINE to the work item container
it can be used to determine Approver

End Condition we can give in which condition this loop should stop All the pending tasks will be cancelled

/wp-content/uploads/2014/01/block_7_354442.jpg

/wp-content/uploads/2014/01/block_4_354447.jpg

/wp-content/uploads/2014/01/block_5_354448.jpg

STEP4: User Decision –

Approval task for Approvers
Choose Step Type User Decision for Approval Task
In Expression select Approver Elemet which has Approver User Id’s

/wp-content/uploads/2014/01/block_3_354452.jpg

STEP 5:

According to User Decision Next step can be Processed.

Regards,

Deepika.

Assigned Tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Syam Babu
      Syam Babu

      Great Stuff.

      Author's profile photo Deepika Chandrasekar
      Deepika Chandrasekar
      Blog Post Author

      Thanks 🙂

      Author's profile photo Harish Kumar
      Harish Kumar

      good effort Deepika..

      Keep sharing 🙂

      Regards,

      Harish Kumar

      Author's profile photo Deepika Chandrasekar
      Deepika Chandrasekar
      Blog Post Author

      Thank You Harish 🙂

      Author's profile photo Rashmi ranjan behera
      Rashmi ranjan behera

      Hi please guide as i have to impliment a workflow.My scenario is i have to change a particular user status when 2 approver will approve it.That is i have 3 status like A,B,C.When the user will change the status to "B" workflow should get initiated and after the approval from both the person the status should get changed to C.Please guide me

      Author's profile photo Deepika Chandrasekar
      Deepika Chandrasekar
      Blog Post Author

      Hi,

      You can have event for status change, in that event you can check the status = 'B' trigger Workflow manually using

      I hope you know how to create Workflow.. if else please check this link

      Workflow Scenario - ABAP Development - SCN Wiki

      CALL FUNCTION 'SWE_EVENT_CREATE'

            EXPORTING

              objtype           = 'BUS2000111'

              objkey            = key

              event             = lv_event"event name

            TABLES

              event_container   = lt_event_cont

            EXCEPTIONS

              objtype_not_found = 1

              OTHERS            = 2.

          IF sy-subrc = 0.

            COMMIT WORK.

          ENDIF.

      Then in Block you need to add user decision step type and in block -> multiline element have two approvers and use that variable element_line as expression in user decision . follow the steps for end conditions like if one approver rejects it keep flag and end the block.

      Take the result from user decision from element result and change the staus according to decision in activity step type.

      Regards,

      Deepika.

      Author's profile photo Rashmi ranjan behera
      Rashmi ranjan behera

      Thanks a lot,i am new to it.Currently i am reading the links u have provided

      Author's profile photo ajeet choudhary
      ajeet choudhary

      Hi Rashmi,

      In your case if sequential approval is not prefered you can make use of block as discussed above for parallel approval of workflow and change the status when you get both the approval.

      You can also refere below link:

      http://scn.sap.com/docs/DOC-42404

      and

      Author's profile photo Rashmi ranjan behera
      Rashmi ranjan behera

      Hi

      thanks for Ur reply,i don't have much knowledge about it.can you please clarify me what is the difference between sequential workflow and block workflow.My requirement is that it should simultaneously go to both approvers.Is it possible in block ?please explain me as i am new to SAP

      Thanks in advance

      Author's profile photo ajeet choudhary
      ajeet choudhary

      yes, it is very much possible through block.Block in workflow is generally used when we have to send work item for approval to amy person simultaneously whereas in sequential approval goes one by one. Hope it helps.

      Please refer Pactical workflow for SAP book for starting workflow development,

      rgards

      Ajit

      Author's profile photo Former Member
      Former Member

      Good Content Deepika...

      Keep it up... 🙂

      Regards,

      Ragav

      Author's profile photo sasi namburi
      sasi namburi

      Good document, keep it up 🙂

      Regards,

      Sasi

      Author's profile photo Prateek Agarwal
      Prateek Agarwal

      Hi Deepika,

      Great Blog!!...:)

      Could you please let me know in case of parallel processing, when one of the two agents reject the request it is going to the requester, but when it resubmits it goes only to that agent who rejects it previously, how can this be achieved?

      Regards

      Prateek

      Author's profile photo Former Member
      Former Member

      Hi ,

      How are you getting value into ZAAPROVERID?

      and in the step 3 , how value is flowing from _ZAPPROVER_LINE to ZAPPROVER?

      can you please elaborate on this?

      Author's profile photo Former Member
      Former Member

      Hi Deepika,

      Nice Work!

      I am facing one issue in the end block section/Ending the workflow.  As in my case, there are 3 levels of approvals.

      Incase of approvals, the work item goes from one level to another correctly.

      But in case of Reject at any of the levels the workflow should stop and come out of the workflow.

      However, it is still in the 'IN PROCESS' stage and the workflow is not ended.

      Please provide your input.

      Regards

      Swamy

       

      Author's profile photo Mike Pokraka
      Mike Pokraka

      Hello Deepika,

      The last one in step 3 should be a binding from &ZAPPROVER_LINES(&_WF_PARFOREACH_INDEX&)& to send a line to each block instance. Binding &ZAPPROVER_LINES& will bind the entire table.

      As I assume you wouldn’t write a blog without a working example, I think you probably just inserted the wrong screenshot. Could you maybe update it?

      Regards,
      Mike