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.
Step 2:
In Control Tab we need to choose Block type as ParForEach
Then we need to choose Multi line element in Parallel Processing
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
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
STEP 5:
According to User Decision Next step can be Processed.
Regards,
Deepika.
Great Stuff.
Thanks 🙂
good effort Deepika..
Keep sharing 🙂
Regards,
Harish Kumar
Thank You Harish 🙂
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
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.
Thanks a lot,i am new to it.Currently i am reading the links u have provided
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
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
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
Good Content Deepika...
Keep it up... 🙂
Regards,
Ragav
Good document, keep it up 🙂
Regards,
Sasi
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
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?
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
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