CRPAccumulateDispatchGroupLoad

CRP, Accumulate Dispatch Group Load

Major Business Rule

Object Name: B3300180

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function reads Capacity Load records (F3313) for the input Work Center with the specified 
Capacity Quantity Type (CQT) and accumulates the load values into the Capacity Load Array by bucket dates.  

These quantities are accumulated for all Work Centers within a Dispatch Group so that load records can 

be created for the Dispatch Group.


1.2Setup Notes and Prerequisites

• The calling application must call B3300140, RRP, Initialize Bucket Dates, before calling this 
function.  The Bucket Date Array pointer returned by B3300140 must be passed as input to this function.

• The calling application must call B3300150 (RRP, Calculate Rated Capacity) and B3300160 (RRP, 
Calculate Loaded Capacity) 
to allocate and load the Rated and Loaded Capacity arrays.

1.3Special Logic


2.Technical Specifications

Select records from F3313 using key values CRCAPM = CapacityMode, CRMCU = WorkCenter,
CRUM = UnitOfMeasure, CRCQT = QuantityType

Do while the F3313 fetch is successful

Fetch the next F3313 record

If successful

If CRSTRT = 0 or CRSTRT = 1

CRSTRT = BucketDateArray[1]

Else

If CRSTRT = 2

CRSTRT = BucketDateArray[2]

End

End

Search for the date in BucketDateArray that is >= CRSTRT.  Set B to the index of 
the date that is found.

If the date search is successful and B > 0 and B < NumberOfPeriods

CapacityLoadArray[B] = CapacityLoadArray[B] + CRTRQT

End

End

End


^

Data Structure

D3300180 - CRP, Accumulate Dispatch Group Load

Data Item Data Structure DescriptionI/ORequiredNotes
CAPM              Capacity Mode                  IY

MCU            Work Center                        IY

UM            Unit Of Measure                  IY

CQT            Quantity Type                  IY

GENLNG            Bucket Date Array Ptr            IY      From B3300140

GENLNG      Capacity Load Array Ptr            IY      From B3300150 or B3300160

EV01            Clear Load Array                  IY      '1' = zero the Capacity Load 

Array                                                                                                  

                                                                                                      

                                   before processing 

                                                                        ' ' = do not clear the array

INT01            Number Of Periods                  IY

SUPPS            Suppress Error Message           I      '1' = Suppress runtime error 

message                                                                               handling 

                                                                        ' ' = Allow runtime error 

message

DTAI            Error Message ID                  O      " " = Success 

                                                                        "3143" = Table access error 

                                                                        "4363" = Null Pointer


^

Parameter NameData ItemData TypeReq/OptI/O/Both
cCapacityModeCAPMcharNONENONE

A code indicating which planning is being used. Valid values are:     1    Resource Requirements Planning     2    Rough Cut Capacity 
Planning     3    Capacity Requirements Planning

szWorkCenterMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szUnitOfMeasureUMcharNONENONE

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, 
cubic meter, liter, hour, and so on.

szCapacityTypeCQTcharNONENONE

A code that distinguishes different quantities generated in the Capacity Planning system.

idBucketDateArrayPtrGENLNGIDNONENONE

General purpose ID variable.

idCapacityLoadArrayPtrGENLNGIDNONENONE

General purpose ID variable.

iNumberOfPeriodsINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

cSuppressErrorMessageSUPPScharNONENONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

szErrorMessageIDDTAIcharNONENONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cClearLoadArrayEV01charNONENONE

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

szWorkcenterBranchWMCUcharOPTNONE

This is the branch/plant to which the work center belongs and must exist in the business unit master (F0006) and branch plant constants file 
(F41001).

Related Functions

None

Related Tables

F3313 Capacity Load Table