Configuration of Leave Request Workflow For ESS
Configuration of Leave Request Workflow For ESS
Select the task type Workflow template and enter the workflow number in the task number. Click on Copy task.
Assign the object to the required package and the request. Now open the custom workflow definition created above.
Now go to Basic data Agent assignment for task (see the screenshot below):
Now ensure that the agent assignment for all the steps in the workflow is as per your requirement. If not, you can modify the same to meet your requirements. (Please take a copy of the standard tasks as well, if they are to be modified). Configuration Settings: The configuration settings are to make the standard SAP leave application to trigger the custom workflow application for the leave requests instead of standard workflow. Please note that the configuration settings are covered only from a Workflow perspective and not elaborative.
Go to transaction PTARQ.
Now double-click the leave request types for which we need to trigger the custom workflow.
Now to have the workflow to process the leave request, check the check box as highlighted in the above screenshot. When the checkbox is highlighted, following fields appear:
Click on Save. Testing: To test the application, we need to create a leave request from the portal. Alternatively, we can use the transaction PTARQ to create a leave application. Click on Test Application in the transaction PTARQ.
Enter the Employee number (PERNR) and click on the tab Create Request
Enter the Infotype number 2001, the sub-type (leave type), Date and other information as required.
Save your leave request. Tip: Please note that the work item generated by this workflow, for approving the leave request, cannot be directly executed from the SAP inbox. SAP issues the following message when we try to execute the work item from R/3 (Following is the only code in the method attached to the task):
For testing purpose, you can use the function module PT_ARQ_REQUEST_EXECUTE to approve the leave request and to complete the work item.