(Note: Make this window as wide as possible to clearly view the Parameter table)
Business Function Specification
Source Name:N0500037
Data Structure:D0500037A
Function Name:Calculate DBA Available Hours and Generate Time-Entry Record
System Code: 05A
Designer:David Scott
Programmer:Falah Thamir
Function Category
Function Use
Revisions Log
Date:21 May, 1998
Modifications by:Falah Thamir
SAR Number:1958608
Description:Creation
1.Functional Description
1.1Purpose
This function will return SVH beginning balance, time added, time taken, and
time accrued but not yet available, all in hours, during the requested calendar
year under the requested PDBA. If requested, a Time-Entry record will be created
in F06116.
1.2Setup Notes and Prerequisites
It is assumed that the DBA passed to this function is set-up in F069116 and
has flag Available Carryover (ACO) = "Y".
When the generation of Time-Entry records is desired (cGenerateTimeEntryFlag = 1),it is recommended
that this function be called twice, once with this flag = "0",and if no errors are detected
(mnErrorCodeReturned = 0), then call it again
with cGenerateTimeEntryFlag = "1". This is because only information from
error-free records will be entered in F06116, and if errors are detected in
other records, the error-free records are not flagged to avoid re-entering them
in F06116 when this function is re-called after the errors are corrected.
1.3Special Logic
2.Technical Specifications
2.1Parameters:
Data ItemData Structure DescriptionI/ORequiredNote
-------------------------------------------------------------------
AN8mnAddressNumberIxAddress Book Number
PDBAmnPDBACodeIxPDBA Code
DTjdDateIxDate of inquiry
EV01cCalendar_Fiscal
AnniversaryFlag01Ix0 = Calendar year
accrual
1 =Fiscal/Anniversary
year accrual
Note: Fiscal/Anniversary accrual is not currently implemented; only
Calendar accruals are returned.
EV01cGenerateTimeEntryFlag01Ix0 = Do not generate
Time-entry
1 = Generate Time
Entry records in
F06116
PIDszProgramIDIxProgram ID of calling
program.
Required if cGenerateTimeEntryFlag01 = "1".
Used when records are written to F06116
MATH06mnErrorCodeReturnedOx
Error Code:
0 = no errors
1 = date not entered
2 = an accrual or a pay type PDBA
record in F069036 does not exist in F069116
3 = no Pay Types found in F069036 for PDBA = mnPDBACode
11 = Fiscal/Anniversary retrieval not yet implemented
21 = error from B0500002, Begin Document
31 = error from B0500002, Edit Line
41 = error from B0500002, End Document
EV01cMultiplePayTypeFlag01Ox0 = one Pay Type
found in F069036
referenced by any PDBA
1 = more than one Pay
Type referenced by a PDBA
in F069036
BHBBmnHoursAvailableOxHours available
BHBBmnHoursBeginningBalanceOxHours, beginning balance
BHBBmnHoursAddedThisYearOxHours added this year
BHBBmnHoursTakenThisYearOxHours taken this year.
BHBBmnHoursAccruedNotAvailOxHours accrued but not
yet available.
MATH06mnWarningCodeReturnedOx
Warning code:
1 = no records found in F06146 with PDBA = mnPDBACode
2 = warning from B0500002, Begin Document
4 = warning from B0500002, Edit Line
8 = warning from B0500002, End Document
Note: The warning codes are added;
for example, code 6 means there was a
warning from both B0500002, Begin Document
and Edit Line
2.2Related Tables
Table Table Description
-------------------------------------------
F06146Employee Transaction History Summary
F069116Payroll Transaction Constants
F069036Payroll Transaction Cross Reference
2.3Related Business Functions
Source NameFunction Name
------------------------
B0500002Time Entry
Processing
1. If date is not entered, stop processing.
2. Get the two-digit year from the date passed through the data structure. This is
the DTEY key to F06146.
3. Retrieve beginning balance and time added from all records in F06146 based
on AN8 = mnAddressNumber, PDBA = mnPDBACode, DTEY = value calculated in step 1,
and DISO = "A" (accrual type); add beginning balance and time added from all records.
If no records are found, then issue a warning.
4. Select records in F069036 based on PDBA = mnPDBACode and XTYP = "R" to get PPYT
which includes Pay Types (PDBA < 1000) which has time taken, and accrual-type DBA
(PDBA > 999) which has time accrued but not yet available. Check if PDBA exists
in F069116. If it does not exist, stop processing and return. If it exists, then
for each PDBA value retrieved from F069036, retrieve BH01 - BH12 from all records
in F06146 based on AN8 = mnAddressNumber, PDBA = PPYT, DTEY = value calculated
in step 1. Add BH01 - BH12 to calculate total time per record. Add values from all
records to get a grand total. If no records are found in F069036 then set an error.
5. Calculate time available = beginning balance + time added - time taken
6. If Time-Entry is desired (cGenerateTimeEntryFlag01 = 1) and no errors are detected,
then call B0500002, Time Entry by Individual, and report available time under last
Pay Type found in F06146. If no Pay Type records are found in F06146, then use the
last pay type found in F069036 referenced by mnPDBACode . Choosing the last Pay Type
is arbitrary; however, it is as good as choosing any other one. The
flag "cMultiplePayTypeFlag01" will be set to "1" if more than one Pay Type record
is found in F06146 that is referenced by one PDBA.
Notes:
1. Fiscal/Anniversary accrual is not yet set-up in OneWorld. Therefore, this version
will only handle calendar year accruals [F. Thamir, 13 March, 1998]
2. DBA codes are setup as follows: Codes 001 - 999 are Pay Types; codes 1000 - 9999
include accrual types
3. There may be multiple entries in F06146 per AN8 per Accrual or Pay Type per year
from different HMCO's. Note: If records are not rolled-over correctly between
different HMCO's, i.e. balances are not zeroed in the old records, then the
calculated time from this function will be wrong.
4. Multiple Pay Types may be referenced by one PDBA which is set-up in F069036 with XTYP = "R".
5. A record does not have to pre-exist in F06146. It is supposed to exist only when
there are entries (hours). For example, Pay Type records may not exist until "Time Taken" is entered.
D0500037A - Calculate DBA Available Hours and Generate Time-Entry Record
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAddressNumber | AN8 | MATH_NUMERIC | REQ | INPUT |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnPDBACode | PDBA | MATH_NUMERIC | REQ | INPUT |
A code that defines the type of pay, deduction, benefit, or accrual.
Pay types are numbered from 1 to 999. Deductions and benefits are
| ||||
jdDateOfInquiry | DT | JDEDATE | REQ | INPUT |
The date that the employee was terminated, if applicable. | ||||
cCalendarFiscalAnnivFlag01 | EV01 | char | REQ | INPUT |
An option that specifies the type of processing for an event. | ||||
cGenerateTimeEntryFlag01 | EV01 | char | REQ | INPUT |
An option that specifies the type of processing for an event. | ||||
szProgramIdofCallingProgram | PID | char | REQ | INPUT |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
mnErrorCodeReturned | MATH06 | MATH_NUMERIC | REQ | OUTPUT |
Event point for Math Numeric. | ||||
cMultiplePayTypeFlag01 | EV01 | char | REQ | OUTPUT |
An option that specifies the type of processing for an event. | ||||
mnHoursAvailable | BHBB | MATH_NUMERIC | REQ | OUTPUT |
The balance at the beginning of the year for the number of hours associated with a PDBA. | ||||
mnHoursBeginningBalance | BHBB | MATH_NUMERIC | REQ | OUTPUT |
The balance at the beginning of the year for the number of hours associated with a PDBA. | ||||
mnHoursAddedThisYear | BHBB | MATH_NUMERIC | REQ | OUTPUT |
The balance at the beginning of the year for the number of hours associated with a PDBA. | ||||
mnHoursTakenThisYear | BHBB | MATH_NUMERIC | REQ | OUTPUT |
The balance at the beginning of the year for the number of hours associated with a PDBA. | ||||
mnHoursAccruedNotAvail | BHBB | MATH_NUMERIC | REQ | OUTPUT |
The balance at the beginning of the year for the number of hours associated with a PDBA. | ||||
mnWarningCodeReturned | MATH06 | MATH_NUMERIC | REQ | OUTPUT |
Event point for Math Numeric. | ||||
mnDollarsAvailable_BW01 | BW01 | MATH_NUMERIC | OPT | OUTPUT |
The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:
A Pay types: The total
| ||||
mnDollarsBeginBalance_BW01 | BW01 | MATH_NUMERIC | OPT | OUTPUT |
The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:
A Pay types: The total
| ||||
mnDollarsTaken_BW01 | BW01 | MATH_NUMERIC | OPT | OUTPUT |
The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:
A Pay types: The total
| ||||
mnDollarsAccruedNotAvail_BW01 | BW01 | MATH_NUMERIC | OPT | OUTPUT |
The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:
A Pay types: The total
| ||||
mnDollarsAdded_BW01 | BW01 | MATH_NUMERIC | OPT | OUTPUT |
The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:
A Pay types: The total
| ||||
szFromCompany_CO | CO | char | OPT | INPUT |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
szThruCompany_CO | CO | char | OPT | INPUT |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
|
None |
None |