RetEESVHDBA_GenTE

Retrieve EE SVH DBA Info from Cache & Gener T

Major Business Rule

Object Name: N0500036

Parent DLL: CFND

Location: Client/Server

Language: NER

(Note: make this window as wide as possible to read the Parameters Table clearly)

Business Function Specification


Data Structure:D0500036A


Source Name:N0500036


Function Name:Retrieve EE SVH DBA Info from Cache & Generate Time-Entry Recds


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 retrieve SVH DBA information attached to an employee with ACO (Available 

Carryover) = "Y". Information includes total time available, beginning balance, time added, time taken, and 

time accrued but not yet available, all during a specific year. The time reported is the total time from 

all DBA's with the same SVH code. The function also will return the next available SVH code found for 

this employee, if it exists.


If requested, a time-entry record will be created in F06116, Employee Transaction Detail File. 

Time-entry will be performed for each DBA. If more than one pay type is associated to a DBA, time entry will 

be charged against the last pay type used in F06146, Employee Transaction History Summary file. If no 

pay type records exist in F06146, then the last pay type linked to that DBA in F069036, Payroll 

Transaction Cross Reference file, will be used.


This function may be called to retrieve information from DBA's having a specific SVH code, for 

example, "S" (sick). If the requested SVH code is left blank, then the function will return the next 

available SVH code and the record sequence in cache where this code starts. It will be up to the user to 

re-call it to retrieve the required information.


1.2Setup Notes and Prerequisites


The cache has to be created and populated using B0700020, Process EE PDBA Cache, prior to calling 

this function.  The cache must be set-up with DISO (cTransactionTypeTimePay in D0700020B) = "A", because 

the cache is sorted by DISO/SVH/PDBA. The same date used to create the cache must be used in this 

function for jdDateOfInquiry.


To retrieve all SVH data, the first call to this function needs to be with cSVHTypeToRetrieve = 

 or , and mnRecordNo_Start = 0. The function will return the record number of the first 

non-blank SVH and place the code in cNextSVHTypeInCache, and its record number in cache in 

mnRecordNoOfNextSVH. The function can then be called successively to retrieve SVH information.


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/OReqrdNotes

-----------------------------------------------------------------

PIDszCacheIDIxThe cache ID for the cache

to be read; returned by 

B0700020


MATH06mnRecordNo_StartIxRecord number in cache where

searching begins


AN8mnAddressNumberIxAddress Book Number


EV01cSVHTypeToRetrieveIxSVH code

S = Sick

V = Vacation

H = Holiday

Other codes as permitted in the set-up of SVH also are acceptable

  = will return the first record with a non-blank SVH code 

and its record number in cache in cNextSVHTypeInCache and 

mnRecordNoOfNextSVH


DTjdDateOfInquiryIxDate of inquiry.


EV01cCalendar_FiscalAnnivFlag01Ix0 = 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 F06116 is 

updated


MATH06mnErrorCodeReturnedOxError Code:

0 = no errors

1 = requested SVH not found. A record with another SVH code was

found as identified in cNextSVHTypeInCache and 

mnRecordNoOfNextSVH

2 = no PDBA records with non-blank SVH records found in cache.

101 - 199 = error codes 01 - 99 from B0500027, Get number of 

records in Employee PDBA Cache

201 - 299 = error codes 01 - 99 from B0500027, Get Employee SVH 

PDBA from Cache

301 - 399 = error codes 01 - 99 from N0500037, Calculate DBA 

Available Hours and Generate Time-Entry Record 


EV01cNextSVHTypeInCacheONext accrual type in the cache:

S = Sick

V = Vacation

H = Holiday

Other codes as permitted in the set-up of SVH

 if end-of-cache is reached


MATH06mnRecordNoOfNextSVHORecord number in cache where 

next SVH is; zero if end-of-

cache is reached


EV01cMultiplePayTypeFlag01OWarning for multiple pay types

0 = one Pay Type found in F069036 referenced by any PDBA

1 = more than one Pay Type reeferenced by a PDBA

Note: The PDBA causing this warning is not reported. 

It is up to the user to find out which one it is. 


MATH06mnNoOfDBARecordsProcessedONumber of DBA records processed


BHBBmnHoursAvailableOHours available

BHBBmnHoursBeginningBalanceOHours, beginning balance

BHBBmnHoursAddedThisYearOHours added this year

BHBBmnHoursTakenThisYearOHours taken this year.

BHBBmnHoursAccruedNotAvailOHours accrued but not 

available.

Note: All reported time is total time from all PDBA's with

same SVH code.


MATH06mnWarningCodeReturnedOxWarning code = code returned by 

N0500037, Calculate DBA Available Hours and Generate

Time-Entry Record


EV01cSetOWErrorFlag01IxFlag to set OneWorld errors

1 = Set OneWorld errors

anything else = do not set OneWorld errors

Notes: Error codes are always returned in mnErrorCodeReturned

For batch operations where manual intervention is not 

desired, do not set OW error



2.2Related Tables 

TableTable Description

-------------------------



2.3Related Business Functions


Source NameFunction Name

----------------------------------------

B0500027Read Employee PDBA Cache created by B0700020

N0500037Calculate DBA Available Hours and Generate Time-Entry Records



Processing 


1. Call B0500027, Get number of records in Employee PDBA Cache (Cache identified by szCacheID), and 

save value in mnNoOfRecsInCache. If an error is detected, stop processing and return.


2. If mnRecordNo_Start < 1, then mnRecordNo_Start = 1


3. Read Employee PDBA cache sequentially and locate first record where SVH = cSVHTypeToRetrieve and 

ACO = "Y". If no records are found, then search the cache starting at the first record. If a record is 

found, then return with error code 1, and cNextSVHTypeInCache = SVH and mnRecordNoOfNextSVH = record 

number where SVH was found; otherwise, return with error code 2 (cache has no SVH records).


4. Starting at the first record found, call B0500027, Get Employee SVH PDBA Codes from Cache, then 

call N0500037, Calculate DBA Available Hours and Generate Time-Entry Records. Add time retrieved from 

each call to N0500037. Stop processing when the first error is detected.


5. Return total time per required SVH.



Notes:


Data Structure

D0500036A - Retrieve EE SVH DBA Info from Cache & Gener Time-Entry Recds

Parameter NameData ItemData TypeReq/OptI/O/Both
szCacheIDPIDcharREQINPUT

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

mnRecordNo_StartMATH06MATH_NUMERICREQINPUT

Event point for Math Numeric.

mnAddressNumberAN8MATH_NUMERICREQINPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

cSVHTypeToRetrieveEV01charREQINPUT

An option that specifies the type of processing for an event.

jdDateOfInquiryDTJDEDATEREQINPUT

The date that the employee was terminated, if applicable.

cCalendar_FiscalAnnivFlag01EV01charREQINPUT

An option that specifies the type of processing for an event.

cGenerateTimeEntryFlag01EV01charREQINPUT

An option that specifies the type of processing for an event.

szProgramIDofCallingProgramPIDcharREQINPUT

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

mnErrorCodeReturnedMATH06MATH_NUMERICREQOUTPUT

Event point for Math Numeric.

cNextSVHTypeInCacheEV01charOPTOUTPUT

An option that specifies the type of processing for an event.

mnRecordNoOfNextSVHMATH06MATH_NUMERICOPTOUTPUT

Event point for Math Numeric.

cMultiplePayTypeFlag01EV01charOPTOUTPUT

An option that specifies the type of processing for an event.

mnNoOfDBARecordsProcessedMATH06MATH_NUMERICOPTOUTPUT

Event point for Math Numeric.

mnHrsAvailableBHBBMATH_NUMERICOPTOUTPUT

The balance at the beginning of the year for the number of hours associated with a PDBA.

mnHrsBeginBalanceBHBBMATH_NUMERICOPTOUTPUT

The balance at the beginning of the year for the number of hours associated with a PDBA.

mnHrsAddedBHBBMATH_NUMERICOPTOUTPUT

The balance at the beginning of the year for the number of hours associated with a PDBA.

mnHrsTakenBHBBMATH_NUMERICOPTOUTPUT

The balance at the beginning of the year for the number of hours associated with a PDBA.

mnHrsAccruedNotAvailBHBBMATH_NUMERICOPTOUTPUT

The balance at the beginning of the year for the number of hours associated with a PDBA.

mnWarningCodeReturnedMATH06MATH_NUMERICREQOUTPUT

Event point for Math Numeric.

cSetOWErrorFlag01EV01charREQINPUT

An option that specifies the type of processing for an event.

mnDollarsAvailable_BW01BW01MATH_NUMERICOPTOUTPUT

The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:    A  Pay types: The total 
amount of earnings related to the type of pay.    B  DBAs: The total amount of the deduction, benefit, or accrual.    C  Payroll taxes: The total 
amount of gross wages, before exclusions and paid-in-excess amounts. This amount represents the total for the first month of either the payroll 
year or the calendar year, depending on the review form that you are using. Payroll-month totals are stored in the Employee Transaction History 
Summary table (F06146). Calendar-month totals are stored in the Calendar Month DBA Summary History table (F06145).

mnDollarsBeginBalance_BW01BW01MATH_NUMERICOPTOUTPUT

The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:    A  Pay types: The total 
amount of earnings related to the type of pay.    B  DBAs: The total amount of the deduction, benefit, or accrual.    C  Payroll taxes: The total 
amount of gross wages, before exclusions and paid-in-excess amounts. This amount represents the total for the first month of either the payroll 
year or the calendar year, depending on the review form that you are using. Payroll-month totals are stored in the Employee Transaction History 
Summary table (F06146). Calendar-month totals are stored in the Calendar Month DBA Summary History table (F06145).

mnDollarsAdded_BW01BW01MATH_NUMERICOPTOUTPUT

The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:    A  Pay types: The total 
amount of earnings related to the type of pay.    B  DBAs: The total amount of the deduction, benefit, or accrual.    C  Payroll taxes: The total 
amount of gross wages, before exclusions and paid-in-excess amounts. This amount represents the total for the first month of either the payroll 
year or the calendar year, depending on the review form that you are using. Payroll-month totals are stored in the Employee Transaction History 
Summary table (F06146). Calendar-month totals are stored in the Calendar Month DBA Summary History table (F06145).

mnDollarsTaken_BW01BW01MATH_NUMERICOPTOUTPUT

The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:    A  Pay types: The total 
amount of earnings related to the type of pay.    B  DBAs: The total amount of the deduction, benefit, or accrual.    C  Payroll taxes: The total 
amount of gross wages, before exclusions and paid-in-excess amounts. This amount represents the total for the first month of either the payroll 
year or the calendar year, depending on the review form that you are using. Payroll-month totals are stored in the Employee Transaction History 
Summary table (F06146). Calendar-month totals are stored in the Calendar Month DBA Summary History table (F06145).

mnDollarsAccruedNotAvail_BW01BW01MATH_NUMERICOPTOUTPUT

The gross amount of the transaction. The specific meaning, depending on the type of transaction, is as follows:    A  Pay types: The total 
amount of earnings related to the type of pay.    B  DBAs: The total amount of the deduction, benefit, or accrual.    C  Payroll taxes: The total 
amount of gross wages, before exclusions and paid-in-excess amounts. This amount represents the total for the first month of either the payroll 
year or the calendar year, depending on the review form that you are using. Payroll-month totals are stored in the Employee Transaction History 
Summary table (F06146). Calendar-month totals are stored in the Calendar Month DBA Summary History table (F06145).

mnFromDBACode_PDBAPDBAMATH_NUMERICOPTINPUT

A code that defines the type of pay, deduction, benefit, or accrual. Pay types are numbered from 1 to 999. Deductions and benefits are 
numbered from 1000 to 9999.

mnThruDBACode_PDBAPDBAMATH_NUMERICOPTINPUT

A code that defines the type of pay, deduction, benefit, or accrual. Pay types are numbered from 1 to 999. Deductions and benefits are 
numbered from 1000 to 9999.

szFromCompany_COCOcharOPTINPUT

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

szThruCompany_COCOcharOPTINPUT

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

Related Functions

None

Related Tables

None