CalculateOrderLeadTime

Calculate Order Lead Time

Minor Business Rule

Object Name: B3100290

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function will calculate the Lead Time required for a given Item, Branch and Order 

Quantity.


1.2Setup Notes and Prerequisites

• None.
• 
1.3Special Logic

None.


2.Technical Specifications


2.4Processing 


Short Item and Branch must not be blanks.


1. Get Item Balance Manufacturing Data using input ITM and MCU.(Business function B4000920).

2. Get Manufacturing Constants using Input MCU as the key. If IAWRHR = 0 , IAWRHR = 8.

3. If IBMRPP = 'V' and IBLTPU <> 0

Get Time Basis UDC using 'TIMB' as Data Dictionary Item(Business Function X0005)

If no error

Wk Time Basis Ratio =  StringtoNumeric(#UDL02)

Else

Wk Time Basis Ratio =  1.

Endif.

If IBSRNK <> 0

Get the Wk Qrder Quantity with Shrinkage using MCU,ITM,UORG and UOM with Business 

function (B3100250).

Endif.

Wk Lead Time in Hours = (IBLTPU * Wk Order Qty with Shrinkage * IBTIMB)

If Wk Time Basis Ratio <> 0

Wk Lead Time in Hours = Wk Lead Time in Hours / Wk Time Basis Ratio

Endif

Wk Lead Time in Hours = Wk Lead Time in Hours + IBSETL + IBQUED.

Lead Time Days = Wk Lead Time in Hours / IAWRHR

Round the Lead Time Days to the Next Whole Number

   Else 

Lead Time Days = IBLTLV

Round the Lead Time Days to the Next Whole Number.

    Endif


The Error Code and Lead Time Days are passed back to the calling program.


Data Structure

D3100290 - Calculate Order Lead Time

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.

mnShortItemITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

mnOrderQuantityUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

szUnitOfMeasureUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

mnLeadtimeDaysLTLVMATH_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).

cErrorCodeERRCcharNONENONE

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).

cBackscheduleQueueMoveHrsFlagEV01charOPTNONE

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

Related Functions

B3100250 Calculate Shrinkage Quantity
B4000920 Get Item Branch Mfg Data
X0005 Get User Defined Codes

Related Tables

F3009 Job Shop Manufacturing Constants