1.Functional Description
1.1Purpose
Get system calendar for appropriate month and year, calculate offsets, and clear calendar slots prior
to first of month, then display the calendar. Finally, clear the slots after the last day of the
month.
Get the work day calendar for the appropriate month and year. Determine the type of day, calculate
offsets, and clear calendar slots prior to first of month. If it is not a workday, protect field and
display description for type of day. If it is a workday, display the resource units available. Next,
clear the slots after the last day of the month.
This function should allow updates to the database from the edit fields on the revision form.
This function should allow adds to the database from the edit fields on the revision form
Finally, calculate the Total Resource Units for the month.
2.Technical Specifications
2.4Processing
Edits:
if Update = 0
1.0 Retrieve the Calendar using YR and MT;
2.0 Determine number of days in that month (y);
3.0 Determine the first day of that month (Sunday, Monday, Tuesday, etc.):
4.0 Calculate the This Month Offset (MN09A), where Sunday=0, Monday=1, etc.;
5.0 Calculate Next Month Offset (MN09B) by using formula: (MN09A+y);
6.0 Do for x = 1 to y (number of days in month)
6.1 Put the day of the month (value of x) in the appropriate work field
[CAL0x+MN09A];
7.0Fetch the F30006 record using WorkCenter and Workcenter Branch as keys. These
two fields are part of the input datastructure. Read the WDCT and WDCK fields
from F30006.
7.0 Retrieve the Work Day Calendar (F0007) using MCU, YR, MT, WDCT and WDCK
with index named Branch,Year,+A.;
8.0 If no F0007 record exists, return error message (#1986) and go to end of
program;
9.0 Retrieve the Work Center Resource Units (F3007) using MMCU, MCU, UM, YR,
MT , CTRY with the index named Branch,BusinessUnit,+A;
10.0 If no F3007 record exists, initialize value of RU01 through RU35 = 0;
11.0 Initialize Total Resource Units = 0;
12.0 Do for x=1 to y (number of days in the month);
12.1 Get the type of day from F0007;
12.2 If the type of day = "W", then:
12.2.1 Get the number of resource units (RUx) from F3007,
12.2.2 Add the value to Total Resource Units,
12.2.3 Convert the value to a string, and
12.2.4 Put string to appropriate work field (i.e. WKRUx + MN09A),
12.3 Else retrieve type of day description from UDC table (F0005), and
12.3.1 Put description in appropriate workfield (i.e. WKRUx +
MN09A).
12.4 Repetitive- If this is an "all shifts record" as indicated by DS parameter
cAllShiftsRecord, display all days as if they were "W".
If Update = 1
Update F3007 record with new values from app.
Repetitive- if the current shift is not blank also update the "all shifts record" with the total
resource units from all shifts.
If Update = 3
Add skeleton record (MMCU, YR, UM, MCU,MT ,STYL,SHFT, CTRY and audit info ) to F3007 so that
the app will find a record and update its resource units. Note: the Work day calendar ( F0007 ) record
is added by the app.
Repetitive- If the current shift is not blank, checks for existence of "all shifts record", and if
not found, adds it.
If Update = 5
Delete the F3007 record based on full key (Which includes the newly added CTRY). Also subtracts
the deleted resource units from the blank "all shifts" record.
Issue:
In the future, it may be possible to remove CAL01 from this business function. The calculation may
be done in GBR once we have the ability to specify numeric values in GBR.
D300027A - Calendar Data Struct
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnCalendarLocation01 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation02 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation03 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation04 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation05 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation06 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation07 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation08 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation09 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation10 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation11 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation12 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation13 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation14 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation15 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation16 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation17 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation18 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation19 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation20 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation21 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation22 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation23 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation24 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation25 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation26 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation27 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation28 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation29 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation30 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation31 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation32 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation33 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation34 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation35 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation36 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation37 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
mnCalendarLocation38 | CAL01 | MATH_NUMERIC | NONE | NONE |
Current calendar date for this month and year. | ||||
szResourceUnitsWork01 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork02 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork03 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork04 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork05 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork06 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork07 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork08 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork09 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork10 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork11 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork12 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork13 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork14 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceunitswork15 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork16 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork17 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork18 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork19 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceunitswork20 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork21 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork22 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork23 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork24 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork25 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork26 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork27 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork28 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork29 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork30 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork31 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork32 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork33 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork34 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork35 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szResourceUnitsWork36 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szBranch | MMCU | char | NONE | NONE |
A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which
| ||||
szWorkCenter | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szUnitOfMeasure | UM | char | NONE | NONE |
A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box,
| ||||
mnCalendarYear | YR | MATH_NUMERIC | NONE | NONE |
The calendar year for this calendar. | ||||
mnCalendarMonth | MT | MATH_NUMERIC | NONE | NONE |
A number that corresponds to the month in a calendar year. | ||||
mnThisMonthOffset | MN09A | MATH_NUMERIC | NONE | NONE |
Generic Math Numeric - size 9 | ||||
mnNextMonthOffset | MN09B | MATH_NUMERIC | NONE | NONE |
Generic Math Numeric - size 9 | ||||
mnTotalResourceUnits | MN09A | MATH_NUMERIC | NONE | NONE |
Generic Math Numeric - size 9 | ||||
cUpdate | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szResourceUnitsWork37 | WKRU01 | char | NONE | NONE |
A value expressed in units, dollars, hours, floor space, etc., that is used to calculate capacity. | ||||
szCostCenterType | STYL | char | OPT | NONE |
A user defined code (00/MC) that identifies the classification of the business unit. | ||||
cShiftCode | SHFT | char | OPT | NONE |
A user defined code (00/SH) that identifies daily work shifts.
In payroll systems, you can use a shift code to add a percentage or amount to
| ||||
mnWorkCenterUtilization | WORU | MATH_NUMERIC | OPT | NONE |
A percentage that indicates how intensively a work center is being used. This value usually refers to machine use. It is the ratio of the direct
| ||||
mnWorkCenterEfficiency | WORE | MATH_NUMERIC | OPT | NONE |
A user defined value that indicates how efficiently a work center operates.
This value usually refers to staff efficiency. When you enter a
| ||||
mnWorkCenterUtilization_2 | WORU | MATH_NUMERIC | OPT | NONE |
A percentage that indicates how intensively a work center is being used. This value usually refers to machine use. It is the ratio of the direct
| ||||
mnWorkCenterEfficiency_2 | WORE | MATH_NUMERIC | OPT | NONE |
A user defined value that indicates how efficiently a work center operates.
This value usually refers to staff efficiency. When you enter a
| ||||
cAllShiftsRecord | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cErrorCondition | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cFormMode | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cBlankShiftDeletedYN | EV01 | char | OPT | OUTPUT |
An option that specifies the type of processing for an event. |
None |
F0005 User Defined Codes | ||||
F0007 Workday Calendar | ||||
F3007 Work Center Resource Units |