1.Functional Description
1.1Purpose
This function spreads the input Load Hours and Setup Hours over the Released Load or Planned Load
array based on the periods between the input Start date and Requested date.
1.2Setup Notes and Prerequisites
The calling application must call B3300200 (CRP, Initialize Bucket Dates) before calling this
function. The Bucket Date Array pointer returned by this function must be passed as input.
The calling application must call B3300220 (CRP, Calculate Released Load From WO Routings) before
calling this function to allocate and initialize the Released Load, Planned Load, and Period Summary
arrays.
1.3Special Logic
2.Technical Specifications
Declare array ResourceUnitsArray of 31 math numerics
Clear the ResourceUnitArray
R = 1
Search for the date in BucketDateArray that is >= RequestedDate. Set R to the index of the date
found.
S = 1
Search for the date in BucketDateArray that is >= StartDate. Set S to the index of the date found.
If date search successful and S > 0 and S <= NumberOfPeriods
PeriodSummaryArray[S] = PeriodSummaryArray[S] + SetupHours
PeriodSummaryArray[S] = PeriodSummaryArray[S] + LoadHours
End
// If Start Date and Requested Date fall in different buckets, spread the hours across the
different periods
If S <> R
WorkDate = RequestedDate
UnitOfMeasure, WUYR = year from WorkDate, WUMT = month from WorkDate.
If record not found
S = R
Else
ResourceUnitsArray
WUWORE = WUWORE / 100
WUWORU = WUWORU / 100
RatedHours = ResourceUnitsArray[day from WorkDate]
RatedHours = RatedHours * WUWORE * WUWORU
search for RequestedDate in BucketDateArray was successful
LoadArray[R] = LoadArray[R] + RatedHours
PeriodSummaryArray[R] = PeriodSummaryArray[R] + RatedHours
Else
End
LoadHours = LoadHours - RatedHours
If day from WorkDate > 1
Subtract 1 day from WorkDate
Else
Subtract 1 day from WorkDate
WUUM = UnitOfMeasure, WUYR = year from WorkDate, WUMT = month from WorkDate.
If record not found
S = R
Else
ResourceUnitsArray
WUWORE = WUWORE / 100
WUWORU = WUWORU / 100
End
RatedHours = RatedHours * WUWORE * WUWORU
RequestedDate = WorkDate
R = 1
Search for the date in BucketDateArray that is >= RequestedDate. Set R to the index
of the date found.
If LoadHours > 0 and R = S
LoadArray[R] = LoadArray[R] + LoadHours
PeriodSummaryArray[R] = PeriodSummaryArray[R] + LoadHours
End
End
^
D3300230 - CRP, Spread Hours Over WO Period
Data Item Data Structure DescriptionI/ORequiredNotes
MCU Work Center IY
MMCU Branch IY
UM Unit Of Measure IY
DRQJ Requested Date IY
STRT Start Date IY
MATH01 Load Hours IY
MATH01 Setup Hours IY
GENLNG Bucket Date Array Ptr IY From B3300200
INT01 Number Of Periods IY
GENLNG Load Array Ptr IY From B3300220
GENLNG Period Summary Array Ptr IY From B3300220
SUPPS Suppress Error Message I '1' = Suppress runtime error
message
handling
' ' = Allow runtime error
message
handling
DTAI Error Message ID O ' ' = Success
'3143' = Table access error
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
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
| ||||
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
| ||||
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,
| ||||
jdRequestedDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
jdStartDate | STRT | JDEDATE | NONE | NONE |
The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine
| ||||
mnLoadHours | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnSetupHours | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
idBucketDateArrayPtr | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
iNumberOfPeriods | INT01 | integer | NONE | NONE |
Number of Days in Future to Query for Responses Due. | ||||
idLoadArrayPtr | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
idPeriodSummaryArrayPtr | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
cSuppressErrorMessage | SUPPS | char | NONE | NONE |
A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.
0 = allow
| ||||
szErrorMessageID | DTAI | char | NONE | NONE |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
|
None |
F3007 Work Center Resource Units |