PositionBudgetEditServer

Position Budget Edit Server

Minor Business Rule

Object Name: N0800050

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

This NER will check to see a new position can be added without exceeding the position's budget for salary, FTE, hours, or headcount.  The output 

parameters are error flags for each budgeted amount.  A zero is returned if a budgeted amount is not exceeded; a one (1) is returned if a budgeted amount is 

exceeded and HR Constants dictates a soft error; return a two (2) if a budgeted amount is exceeded and HR Constants dictates a hard error.


Setup Notes


All input parameters are required.


Technical Specifications


None.


Parameters


Data Item Data Structure DescriptionI/ORequiredTable             Notes

HMCU    HomeBusinessUnit                IYes                F060118

POS                PositionId                              IYes          F060118

AN8        EmployeeNumber                                IYes              F060118

SAL        Salary                                      IYes          F060118

FTE         FullTimeEquivalent                  IYes          F060118

IH            HoursPerStandardYear            IYes          F060118

PTDT      PayStopDate                         IYes          F060118

EFTO      EffectiveOnDate                   IYes

ERRC                      SalaryError                            O

ERRC      FTEError                                O

ERRC      HoursError                             O

ERRC       HeadcountError                    O



Related Tables 


Table PrefixTable Description

F08040JTHR Constants

F08101HPPosition Control Master

F08111HQPosition Budget Detail



Processing 


Initialize process flag to 0.


Read the HR Constants record.


If any of the Position Budget Edit flags (PBF1, PBF2, PBF3, PBF4) from HR Constants are not equal to blank or null then 


Set process flag to 1.

End if

If process flag = 1 then


Call Fiscal Year Begin and End date server (N0800030) to get current fiscal year and fiscal year begin & end dates.


Convert fiscal year from N0800030 to a numeric value.


Read the Position Master (F08101) record for the current fiscal year.


If the EffectiveOnDate is less then position start date or greater then position stop date or record does not exist then

Set process flag to 0.
End if

If process flag = 1 then


Initialize accumulator variables for salary, hours, FTE, and headcount.


Call Position Control Projected Amounts server (N0800033) to calculate projected amounts for position, home business unit, and fiscal 

year.  Return the projected amounts into the total accumulator fields so the extra step of adding the amounts to the accumulators is alleviated. 


Read Position Budget Detail (F08111) record for position, home business unit, employee number, and employee action (blank).


If file i/o is successful then 

        A position detail record with active status was included in the projected totals

        for the position, home business unit, and fiscal year.  This record will be

        modified by the Position Control Monitor (N0800045) and it's status will 

        change to 'A' for adjustment.  Call the Projected Amounts server (N0800033)

        for the active record and subtract the returned amounts out of the projected

        totals.  Call the Projected Amounts server (N0800033) again using the same

        information except for end date (equal to one day before new effective day)

        and status = 'A'.  This is mimicing what will happen when the Position Control

        Monitor is run.  Add the amounts for the adjustment record to the total 

        projected amounts.

End if


Call the Projected Amounts server (N0800033) using the employee information

from the parameters.  This will only return projected amounts based on the single

employee and the current annual salary, hours worked per year, and FTE.


Add the projected amounts to the total projected amounts.


Determine if the employee was included in the total headcount amount returned

by the initial call to the Projected Amounts server (N0800033).  Loop through

Position Detail records (F08111) to see if they would have met the criteria used in

the Projected Amounts server (N0800033) to include the employee in the

headcount total.  If no Position Detail records meet the criteria, then increment total

projected headcount by 1 (one).


If Position Budget Edit flag (PBF1) from HR Constants (F08040) is not blank or null then

If accumulated projected salary amount is greater then budget amount from Position Master (F08101) then
If PBF1 = 1 then
Set output flag for salary error to 1
Else
Set output flag for salary error to 2
End if
Else
Set output flag for salary error to 0
End if
End if

If Position Budget Edit flag (PBF2) from HR Constants (F08040) is not blank or null then

If accumulated projected FTE amount is greater then budget amount from Position Master (F08101) then
If PBF1 = 2 then
Set output flag for FTE error to 1
Else
Set output flag for FTE error to 2
End if
Else
Set output flag for FTE error to 0
End if
End if

If Position Budget Edit flag (PBF3) from HR Constants (F08040) is not blank or null then

If accumulated projected hours amount is greater then budget amount from Position Master (F08101) then
If PBF3 = 1 then
Set output flag for hours error to 1
Else
Set output flag for hours error to 2
End if
Else
Set output flag for hours error to 0
End if
End if

If Position Budget Edit flag (PBF4) from HR Constants (F08040) is not blank or null then

If accumulated projected headcount amount is greater then budget amount from Position Master (F08101) then
If PBF1 = 4 then
Set output flag for headcount error to 1
Else
Set output flag for headcount error to 2
End if
Else
Set output flag for headcount error to 0
End if
End if
End if
End if


Data Structure

DN0800050 - Position Budget Edit Server - Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szHomeBusinessUnitHMCUcharREQINPUT

The number of the business unit in which the employee generally resides.

szPositionIDPOScharREQINPUT

A code that you use for budgetary (position) control purposes. The position ID consists of:   o  Position (position code and its description)     
o  Fiscal year     o  Home business unit  For example, you can identify position A0-1 as Accounting Manager for fiscal year 2005-2006, for 
home business unit 41. You might choose to set up positions so that the position IDs are the same as the corresponding job IDs. Within a home 
business unit, positions appear in the alphanumeric sequence of their position IDs. For example, position A0-1 appears before position A0-2.

mnEmployeeNumberAN8MATH_NUMERICREQINPUT

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

mnSalarySALMATH_NUMERICREQINPUT

The amount that an employee is paid in one year, assuming that the employee is paid every pay period of the year. For WorldSoftware: For 
the employee's primary job, the system stores the annual salary in the Employee Master Information table (F060116) and the Employee 
Jobs table (F060118). For secondary jobs, the system stores the annual salary only in the Employee Jobs table (F060118). Depending on how 
the value that is entered in the Display Salary (Annual/Effective) field in the HR History Constants table (F08040), this field displays one of the 
following:   o  Annual salary. For salaried employees who are not linked with a contract calendar, the user enters the amount or the system 
retrieves the amount from the Pay Grade/Salary Range Table (F082001). For employees who are linked with a contract calendar, the system 
calculates this amount using the following formula: (((current salary minus salary paid before change) divided by number of periods to pay) 
multiplied by pay frequency).   o  Effective salary. For employees whose jobs are linked with a contract calendar, the system recalculates the 
effective salary when you enter a mid-calendar salary adjustment. After you enter a mid-calendar adjustment, the effective salary equals the 
salary that is paid to the employee from the time of the adjustment through the end of the contract. The system calculates this amount using 
the following formula: ((annual salary divided by pay frequency) times periods to pay). 

mnFullTimeEquivalentsFTEMATH_NUMERICREQINPUT

The full-time equivalent (FTE) amount. This figure is the portion of a full-time worker that an employee represents within the business unit. 
For example, an employee who works 20 hours per week would represent .50 (1/2 FTE). This number cannot be greater than 1 for any 
employee.

mnHoursPerStandardYearIHMATH_NUMERICREQINPUT

The number of work hours in the year. When you do not set your payroll company constants to use the Pay Grade Step table as the 
pay-rate source, the system uses this number to compute the hourly rate when you supply the annual salary (or to compute the annual salary when 
you supply the hourly rate). When you set your constants to use the Pay Grade Step table as the pay rate source, the system uses the 
following sequence to search for the standard number of hours that it uses to calculate the salary or hourly rate per pay period:     o Employee entry 
forms (this field)     o Pay Grade Step table (hours per day multiplied by days per year)     o Payroll company constants for the employee's 
company     o Payroll company constants for the default company (company 00000)     o Data dictionary     o System default value of 2080 
standard hours per year

jdPayStopDatePTDTJDEDATEOPTINPUT

The date when an employee should no longer be included in a payroll cycle or the date when an employee stops participating in the 
company's benefit plans. You can use this date for terminated employees, seasonal employees, or employees who work only part of the year 
(such as a teacher who works only nine months of the year). See also data item PSDT. This date may also be the date that a deduction, benefit, 
or accrual instruction stops.

jdEffectiveOnDateEFTOJDEDATEOPTINPUT

A future date when all changes will take effect or the date when the changes went into effect. If you do not enter a date in this field, the system 
uses the current date as the effective date.

cSalaryErrorERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

cFTEErrorERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

cHoursErrorERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

cHeadcountErrorERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szFiscalYear9FYOWcharOPTINPUT

A four-digit number that identifies the fiscal year. You can enter a number in this field or leave the field blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. For 
example, a fiscal year begins October 1, 2005, and ends September 30, 2006. The end of the first period is October 31, 2005. Specify the 
year 2005 rather than 2006.

Related Functions

None

Related Tables

None