Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

WS21500001 leave approval how to get second level in Worklow

0 Kudos

Dear Freinds,

I wanted to extend to second level the first level . Till now iam able to execute through ESS for first level for the WS21500001.

However of doing second level i have copied WS21500001 to custom WS900XXXXX. But i wanted to know what are the steps i have to add in the WS900xxxxx .

thanks & regards



Active Contributor
0 Kudos


We had done this kind of business process flow for leave request. Please find the screenshot below:

  1. You need to create a background activity step in which you need to identify the number of levels the leave request must be get approved and validated.
  2. You need to create a background step, in which you would collect the user action and if in case it is more than one level approval then you need to set back the status of the leave request back to new. You can find a sample coding example in the Business class CL_PT_REQ_WF_ATTRIBS method APPROVE.
  3. The entire block should be included in a loop where the exit condition for the loop would be a) if the number of levels = loop counter or Req.status = REJCTED( that means even if one level user rejects then it should be sent back to the requestor, in this case do not reset the status of the leave request back to new just let it go ).
  4. Steps 1 & 2 must be within the Loop.
  5. Probably you may have to include a condition before step 2 to validate the status of the leave request whether it is rejected or not.

I hope it helps


Pavan Bhamidipati

0 Kudos

Dear Pavan,

Thank you very much your flow logic helped me allot , i have followed the procedure you have explained above . I have one query first level working perfectly in second level i dont find any workitem after approved by 1st level manager i.e when i login in the ESS and when the second level manager wanted to approved he dont find any request waiting . So, in R/3 i can see in the T-Code SWPC ( Workflow under system crash if i select that record and say Continue Workflow then we see my work item for the second level manager to apporve.

How to solve this issue why it is always going to SWPC ??

Thanks & Regards