S/4 HANA – Clock in clock out correction for customers who use Time Management solution
Description : Clock in/ out correction service under employee self service has a facility to use the workflow but there is no workflow available that can be readily used. SAP advises to copy the standard leave workflow (WS12300111) and use the same. There is an approval program available (Transaction PTCOR -> Approve Document) for administrator. Using the same program we will be creating an approval workflow.
You follow below simple steps to create similar functionality in the S4 HANA 2.0 system in case you are using positive time management or you have a need to correct clock in and out times post entry.
- Create a custom transaction calling report program RPTCORAPP and selection screen 1000.(ZPT_APPROVE)
- Create another custom transaction(Z_APPROVE_CLINOUT) with following code.
- Call transaction ZPT_APPROVE AND SKIP FIRST SCREEN.
- Using transaction sw01 create an object. call the above transaction in the object created in step.
- Create a custom task with the above object and method (STEP 3) (There will be no parameter passed between the task container and the workflow as we are calling a transaction only)
- Create Copy of WS12300111 using transaction SWDD.
- Delete the step Process Request by Employee (TS12300116) from copied workflow.
- In the copied workflow in the Approval process instead of standard approval task use the custom task created in step 4.
- Activate the customized workflow which will generate a new ID starting WSXXXXXXXX.
- Under spro config please follow the link Personnel Management -> Employee Self-Services-> Service Specific Settings-> working time ->Clock in\out Corrections-> Processing Processes -> Define Processing Processes
Under workflow template select the checkbox Use SAP Business Workflow.
Provide the number of Custom Workflow activated in Step 9 in the following fields.
WF ID New Clock-In/Out Entries
WF ID for Deletion of Entries
WF ID: Changed Clock-In/Out Entries
Complete all the configuration that is provided in SPRO under clock in clock out correction.
Once you are done with this process then on entering the clock in/ out time the workflow will be received by the next agent defined in the rule / expression that is used in workflow.
The output will work according to the report (RPTCORAPP) if in case there is any need to make change then a copy of the classes can be created that are used in the approval report and customization can be achieved.
SAP in fiori provides a my time event service. (https://help.sap.com/fiori_bs2013/helpdata/en/19/e4f554b9b1b56ce10000000a44176d/frameset.htm)
This blog doesn’t intend to provide any enhancement on the my time event service so be wise before adopting.