Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from JG-SAPHR on Jan 8 at 7:06 AM Hi Further, in the ZPRS pcr, you may need to check if the emp's today's working hrs are not nil. This is because it has been seen that VARST uses a switch which is set only if IT 2001 or 2002 is entered. Hence you can do as below: Note NEXTR is to be used to go to next line where required and it is not indicated here. PCR ZPRS SCOND=F IF initialise as absent D VARSTP2001 Absent? * -yes N HRS=S -no; attendance hrs not nil? Y D HRS?0 Y * Y > SCOND=T IF - -yes, empl present Alternative to all of above including dws start/end storing, etc : a) Create a user op'n &CHKDWS to compare yesterday's DWS with today's DWS; if it is same, set HRS=1 else to zero. You can copy the ABAP code part of op'n VARST which reads the DWS and also obtain the previous day's DWS. b) Use a PCR to do as below. Use ACTIO to call the PCR in the schema. PCR ZCHK D VARSTP2001 Absent? * -yes N HRS=S -no; attendance hrs not nil? Y D HRS?0 Y * Y > &CHKDWS -Empl present; compare DWS today with yesterday Y > D HRS?0 -DWS same? Y > * Y > > HRS=1 ADDZLmmmm -yes;create meal allw. Regards, JG
| | | ---------------Original Message--------------- From: HR Functional Sent: Saturday, January 07, 2012 12:08 PM Subject: Check DWS for Two Working Days and Generate the Allowance Hi experts, I have a requirement to check a daily work schedule and generate an allowance. If employee works for a DWS continuously for 2 days then, generate a meal allowance. Can experts guide me how do I count 2 working days to check DWS? Thanks in advance, G | | Reply to this email to post your response. __.____._ | _.____.__ |