Last active
March 13, 2020 03:59
-
-
Save vinodronold/c5f69dafc0d9befe6652e5de5a8af316 to your computer and use it in GitHub Desktop.
Computing the total hours worked per earnings code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local PACKAGE:NumberHashtable &oHrsByErnCd = Create PACKAGE:NumberHashtable(); | |
Local Rowset &rsTSIntfc = CreateRowset(Record.Z_TSINFC_VW); | |
REM Get all the timesheets for the week | |
&rsTSIntfc.Fill(" WHERE EARNS_END_DT = %DateIn(:1) AND EMPLID = :2 ", &Timesheet.WeekEndDate, &Timesheet.EmplID); | |
For &nCnt = 1 To &rsTSIntfc.RowCount | |
&recTSIntfc = &rsTSIntfc(&nCnt).Z_TSINFC_VW; | |
REM Add the Hours to the Hashtable with ERNCD as the Key | |
&oHrsByErnCd.Add(&recTSIntfc.ERNCD.value, &recTSIntfc.TOTAL_HRS.value); | |
End-For; | |
REM We can use &oHrsByErnCd for further processing | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment