Skip to Content

Document return for change step in Workflow using Web dynpro ABAP


I am building a Workflow wherein an approver can either, approve, reject or return the change request. I am comfortable with the approve and the reject step but not sure on how to take care of the Return step.

I have three approvers in a single request and each user can return the document to make the change. So ideally when a user returns a document, the document link should go back to the initiator's UWL and the initiator should be able to make the changes and send it back for approval. Can you please help on how to do it. I am using Web dynpro abap for my development.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 07, 2018 at 12:27 PM


    Ideally, you should setup your workflow approval in a loop.

    Decision step can be inside a loop step. Have a container variable as a loop counter with an initial value as zero (type int which allows minus values) .

    Inside each loop, increment the counter as the first step, get the agents of the current level, send the decision to the users. Loop end condition should be Loop counter >= Max levels

    If approved, do your processing of the current level approval (like sending an email) and then let the loop go to next iteration (next level) or end (depending of the counter value).

    If rejected, do the current level rejection steps - like sending an email or something else depending on your business process. Then decrement the loop counter by 2 so that when it goes for next iteration it goes back one level (remember that at the beginning of the loop we are incrementing the loop counter) .

    Say rejection happens at level N, you decrement by 2 , loop back and the first step is incrementing the counter by 1, so the level would be N-1

    Here you will have to add a condition as the second step inside the loop (after the increment of the counter) inside the condition check if the loop counter is 0 or N(this is for the case where the rejection happens at level 1 or N+1).-- in the TRUE Branch of the condition, send a work item to the initiator. After the initiator Work item is processed, remember to increment the loop counter so that it gets the level 1 or N+1 agents (in the next step after the condition) and then goes for approval for level 1 or N+1.

    For additional details read the following SAPHELP page:

    Unit 12: Integrating the UNTIL Loop for Reapproval

    Best Regards
    Add comment
    10|10000 characters needed characters exceeded