CalculateScheduleDates

Calculate Schedule Dates

Minor Business Rule

Object Name: B3400720

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function will Forward or Backward Schedule from the Input Date on the Stocking Type 'M' 

for Manufactured Item and 'P' for Purchased Item and calculate the Output Date. If the Item is 

Purchased it will use the Calendar days otherwise it will schedule based on work days in the Calendar table 

(F0007).


1.2Setup Notes and Prerequisites

• This function is used to calculate the Output Date based on the Stocking Type, Input Days, and Input 
Date.


1.3Special Logic

None.


2.Technical Specifications

Initialize variables and defaults:

Output Date = 0.

If Schedule Type = blank then

Schedule Type = 'B'

If Leadtime Level = null then

Leadtime Level = 0

If Stocking Type = blanks then

Stocking Type = 'P'

Work Leadtime = Leadtime Level


Calculate Output Date:

If Stocking Type = 'P' then

If Input Schedule Type = 'B' then

Output Date = Output Date - Work Leadtime

Else

Output Date = Output Date + Work Leadtime

If Stocking Type = 'M' then

Call Forward/Backward Schedule Date (B3100300) with Branch, Input Date, 

ScheduleType, and Work Leadtime to get Output Date.

If the Output Date is zeros then

Load the Years workfield (6 numeric) with the Input Days (LTLV) 

divided by 365.

Move the remainder to Input Days.

Multiply the Years workfield by 1000.

Load the Output Date with the Input Date plus the Years workfield.

Add the Input Days to the Output Date.


If any errors exit program with error message '3143'.



Data Structure

D3400720 - Calculate Schedule Dates

Parameter NameData ItemData TypeReq/OptI/O/Both
szBranchMCUcharNONENONE

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.

cStockingTypeSTKTcharNONENONE

A user defined code (41/I) that indicates how you stock an item, for example, as finished goods or as raw materials. The following stocking 
types are hard-coded and you should not change them:    0   Phantom item    B Bulk floor stock    C Configured item    E Emergency/corrective 
maintenance    F Feature    K Kit parent item    N Nonstock  The first character of Description 2 in the user defined code table indicates if the item 
is purchased (P) or manufactured (M).

jdInputDateDATE01JDEDATENONENONE

Event point for JDE Date.

cScheduleTypeEV01charNONENONE

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

mnInputDaysLTLVMATH_NUMERICNONENONE

A value that represents the leadtime for an item at its assigned level in the production process, as defined on Plant Manufacturing Data. 
The system uses this value to calculate the start dates for work orders using fixed leadtimes. Level leadtime is different for purchased and 
manufactured items: Purchased - The number of calendar days required for the item to arrive at your branch/plant after the supplier receives your 
purchase order. Manufactured - The number of workdays required to complete the fabrication or assembly of an item after all the 
components are available. You can enter level leadtime manually on Manufacturing Values Entry, or you can use the Leadtime Rollup program to 
calculate it. To calculate level leadtime using the Leadtime Rollup program, you must first enter a quantity in the Manufacturing Leadtime Quantity 
field in the Item Branch table (F4102).

cSuppressErrorMessageEV01charNONENONE

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

jdOutputDateDATE02JDEDATENONENONE

Event point for JDE Date.

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.

Related Functions

B3100300 Forward Backward Schedule Dates

Related Tables

None