MRPCalculatePlanAndScheduleOrder

MRP, Calculate, Plan and Schedule Orders

Minor Business Rule

Object Name: B3400500

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This Business function will Plan and Schedule Orders  and generate Messages , Time Series and Pegging 

records for a given Item and Branch based on the Input parameters.


 1.1Purpose

This function is main function of  R3482 and R3483 MRP Planning Program. Based on the Requirements 

and Orders in the MRP Item Quantity Cache, the function will generate and schedule orders for a given 

Item/Branch combination.


 1.2Setup Notes and Prerequisites

The Manufacturing Data from the Item Balance table must be obtained and all other data must be loaded 

in the MRP Bucketless Date Cache and MRP Item Quantity Cache. Please note that this is the final 

process in planning and care must be taken while making changes in the code. 


1.3Special Logic

None


2.Technical Specifications

The following actions have to be performed by the Business Function


1.Open Tables and Initialize Data

Open tables F3411, F34UI006, F35UI001 and F3002

If Error in Opening the Tables, Exit the function with an Error code = '1'

Create the following Arrays an initialize them to zeros

@DT[$$PND] - Bucketless Date Array

@IT[$$PND]  - Requirements Array

@OR[$$PND] - Order Array

@RT[$$PND] - Rate Array

@LQ[$$PND] - Lot Expired Quantity

@LQU[$$PND] - Lot Qty Unadjusted

@PO[$$PND] - Purchase Order Qty

@WO[$$PND] - Work Order Qty

@PL[$$PND] - Planned Order Qty

@FQ[$$PND] - Temp Array for Forecast Qtys

@SQ[$$PND] - Temp Array for Sales Qtys


@NET =[$$PND]- Quantity Available
@CO =[$$PND]- Co/By Requirements Array

P =[$$PND]- Fearture Percent  Array



IF REPLAN = 1 Then

$X = 1

While not end of File 

Read F34UI005 with JOBS,CTID,SVMCU,SVITM, ( TP = PWO or PRS or PPQ or  

), order

by JOBS, CTID, SVMCU, SVITM and Dates.

While Date from Table > @DT[$X]
X++

End While

@IT[X] = @IT[X] + F5NQ01

EndWhile

EndIF


Load the Arrays 


Wk Exit flag = ' '

Wk Index $X = 0

Wk Qty = 0


*Load @FP and @DT 

Call B3401270 in mode '1' to get the first date record using Input Date Branch.

If Cache Code Error <> '0' then

Wk Exit Flag = '1'

Exit Business Function with Errors.

End If

While Wk Exit Flag <> '1'

If $X > $PND then Exit While Loop.

$X++

@DT[$X] = Date (DRQJ) from Cache.


@FP[$X] = FTRP ( Feature Percent ) from Cache

Call B3401270 in mode '6' to get the next date record using Input Branch.
If Cache Code Error <> '0' then

Exit Flag = '1'

End If
End While


Wk Exit Flag = ' '

* Load Qtys. 


/* Look for 'BAU' qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'BAU'(2 keys).

While Cache Error Code = '0'

Wk Beg Qty += Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 

'BAU'(2 keys).

End While

/* Look for 'PLQ' (planned order) qtys */

If Input $$COBY = '1' And Input $$CONS = '2'

$X = 1
Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 

'PLQ'(2 keys).

While Cache Error Code = '0'
While @DT[$X] < Date from Cache

$X++

End While 

@IT[$X] += Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'PLQ'(2 

keys).

End While
End If

/* Look for 'FQ'(adjusted forecast stys)  qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'FQ'(2 keys).

While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@FQ[$X] += Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'FQ'(2 keys).

End While
/* Look for 'SO' (adjusted sales orders) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'SO'(2 keys).

While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@SQ[$X] += Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 

'SO'(2 keys).

End While
/* Look for 'FPQ'(firm pegging qtys) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'FPQ'(2 keys).

While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@IT[$X]  = @IT[$X] - Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 

'FPQ'(2 keys).

End While
/* Look for 'FPL'(firm PL qtys) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'FPL'(2 keys).

While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@IT[$X]  = @IT[$X] - Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 

'FPL'(2 keys).

End While
/* Look for 'PPQ'(Planning Pegging qtys) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'PPQ'(2 keys).

While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@IT[$X]  = @IT[$X] - Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 

'PPQ'(2 keys).

End While
/* Look for 'ID'(Interplant Demand) qtys */

If Input $$CONS = '2'

$X = 1
Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'ID'(2 keys).

While Cache Error Code = '0'

While @DT[$X] < Date from Cache
$X++

End While 
@IT[$X]  = @IT[$X] - Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, 
and 'ID'(2 keys).

End While
End If
/* Look for 'POU'(unadjusted PO) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'POU'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache

@PO[$X] = @PO[$X] + Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 

'POU'(2 keys).

End While
/* Look for 'WOU'(unadjusted WO) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'WOU'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

@OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache
@WO[$X] = @WO[$X] + Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'WOU'(2 keys).

End While
/* Look for 'RS'(adjusted Rate) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'RS'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

 @OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache
@RT[$X] = @RT[$X] + Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'RS'(2 keys).

End While
/* Look for 'IR'(in-receipt routing) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'IR'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

 @OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache
Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'IR'(2 keys).

End While
If Input $LEXP = '1'

/* Look for 'LXU'(unadjusted lot expired) qtys */
$X = 1
Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'LXU'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache
$X++

End While 
@LQU[$X]  = @LQU[$X] + Quantity(NQ01) from Cache
Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 
'LXU'(2 keys).

End While

For $X = 1 to $$PND

If Input $$FCP = '1'

If @FQ[$X] >= @SQ[$X] then
@IT[$X] = @IT[$X] - @FQ[$X]

Else

@IT[$X] = @IT[$X] - @SQ[$X]

End If

Else

@IT[$X] = @IT[$X] - @FQ[$X] - @SQ[$X]

End If

If Input $$COBY = '1' then
@CO[$X] = @IT[$X]

End If

* Adjust Lot Quantity if $LEXP = '1'


If Input $LEXP = '1' then
Wk Qty = 0

Wk Qty = Wk Qty + @LQU[$X] + @IT[$X]
If Wk Qty > 0 
@LQ[$X] = Wk Qty

Wk Qty = 0

End If
End If

End For


Free @SQ and @FQ.


2. Write Lead Time is Zero Message

If SVSTKT <> '0' or  $$PHAN = '1'

If (SVSTKT = 'F' and SVLTLV = 0 ) or (SVMRPP = 'V' and SVLTPU = 0)

If $@A = '1' and  Input Lead Time Zero DSC1 <> Blanks

Write F3411 with MMMSGT('A'), MMUKID(Input UKID), MMDSC1(Input 

DSC1),MMITM(Inp Item), MMMCU(Inp Branch), MMHCLD ('A').

Input F3411 UKID = Input F3411 UKID + 1

Output $$MRPD = '2'

Endif

Endif

Endif


3. Plan and Schedule Orders by Processing the Arrays

Wk Adj Balance $$ADJB = Wk Beg Qty

 For Wk Index $X = 1 to $$PND , Do the following

If $X < $PND

Wk Next Date = @DT[$X + 1]

Else

Wk Next Date = @DT[$X] + 1

End


                  IF $COBY = 1 Then

                        $$OHN  = $ADJB             

                        $$DEOR = @IT[$X] - @CO[$X] 

                        $$OHN  =  $$OHN + @CO[$X] - @RT[$X] 

IF $$OHN > 0 
                               $$ADJB =  $$ADJB + @IT[$X]

                  Else

                               $$REG = (Round to 0 Decimal) $$OHN * @FP[$X]

                              IF $$OHN <> 0

                                   @NET[X]  = $$OHN 

                              EndIF  

                              $$REG = $REG + @RT[$X] + $$DEOR

                             $$ADJB = $$REG

                  EndIF     

                 Else         

      $$ADJB = $$ADJB + @IT[$X] 

     EndIF     

     $$ADJB = $$ADJB + @OR[$X]


4 Load Output Data in User Index and Close all Tables

For $X = 1 to $PND

If @PQ[$X] > 0 then

Call B3401290 in mode '1'using Input MCU, @DT[$X], and 'PO'

If Cache Code Error = '0' then

Add @PQ[$X] to qty and call B3401290 in mode '3' to update.

Else

Call B341290 in mode '2' to add

End If

End If

If @WO[$X] > 0 then
Call B3401290 in mode '1'using Input MCU, @DT[$X], and 'WO'

If Cache Code Error = '0' then

Add @WO[$X] to qty and call B3401290 in mode '3' to update 

quantity.

Else

Call B341290 in mode '2' to add

End If

End If

If @PL[$X] > 0 then
Call B3401290 in mode '1'using Input MCU, @DT[$X], and 'PLQ'

If Cache Code Error = '0' then

Add @PL[$X] to qty and call B3401290 in mode '3' to update 

quantity.

Else

Call B341290 in mode '2' to add

End If

End If

 If @LQ[$X] > 0 then
Call B3401290 in mode '1'using Input MCU, @DT[$X], and 'LEX'

If Cache Code 


Er'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'05'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a'1a

Data Structure

D3400500 - MRP, Calculate, Plan and Schedule Orders

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

szComputerIDCTIDcharNONENONE

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.

mnShortItemNumberITMMATH_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

cLeadTimeTypeMRPPcharNONENONE

A code that determines whether the system uses fixed or variable leadtimes. This code works in conjunction with the value from either the 
Level Leadtime field or the Leadtime Per Unit field. Valid codes are:    F Fixed leadtime - The system calculates work order start dates using the 
value from the Leadtime Level field.    V Variable leadtime - The system calculates work order start dates using the value from the Leadtime 
Per Unit field.

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

mnLeadTimePerUnitLTPUMATH_NUMERICNONENONE

The total number of hours required to build one unit as specified on the routing. This value is factored by the time basis code. You can enter 
this value manually or you can have the system calculate it when you run the Leadtime Rollup program. The system overwrites this value 
when you run the Leadtime Rollup program. The system uses this field to calculate start dates for work orders when you use variable leadtimes.

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

mnSetupLaborHoursSETLMATH_NUMERICNONENONE

The standard setup hours that you expect to incur in the normal completion of this item. This value is not affected by crew size.

mnQueueHoursQUEDMATH_NUMERICNONENONE

The total hours that an order is expected to be in queue at work centers and moving between work centers. The system stores this value in 
the Item Branch table (F4102). You can calculate this value using the Leadtime Rollup program or you can enter it manually. When you run the 
Leadtime Rollup program, the system overrides manual entries and populates the table with calculated values.

c2ndStockingTypeSTKTcharNONENONE

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

cPlanningCodeMPSTcharNONENONE

A code that indicates how Master Production Schedule (MPS), Material Requirements Planning (MRP), or Distribution Requirements 
Planning (DRP) processes this item. Valid codes are:    0   Not Planned by MPS, MRP, or DRP    1   Planned by MPS or DRP    2   Planned by MRP    
3   Planned by MRP with additional independent forecast    4   Planned by MPS, Parent in Planning Bill    5   Planned by MPS, Component in 
Planning Bill  These codes are hard coded.

cOrderPolicyCodeOPCcharNONENONE

A code that specifies the rules for inventory reordering in the Requirements Planning and Procurement systems. Valid values are: 0 Reorder 
point (Not planned by MPS/MRP/DRP) 1    Lot-for-lot or as required 2    Fixed order quantity 3 Economic order quantity (EOQ) 4 Periods of 
supply 5 Rate scheduled item Note: These values are hard-coded.

mnOrderPolicyValueOPVMATH_NUMERICNONENONE

A value that the system uses in conjunction with the order policy code to represent one of the following:      o  When you select order policy 
code 2 (fixed order quantity), this value represents the fixed order quantity. o  When you select order policy 4 (periods of supply), this value 
represents the number of days of net requirements that the system uses to determine order size.      o  When you select order policy code 5 (rate 
scheduled item), this value represents the desired inventory level. When the ending available quantity is less than the desired inventory level, 
then the system issues an "increase rate to" message. When the ending available quantity is greater than the desired inventory level, then 
the system issues a "decrease rate to" message.

mnMinOrderQuantityRQMNMATH_NUMERICNONENONE

The minimum order quantity for an item. You can base the quantity on factors other than usage, such as perishability, storage capacity, and 
so forth.

mnTimeBasisRateRATEMATH_NUMERICNONENONE

A code used to define rate information in the General Rate/Message Records table (F00191).

cShrinkFactorSRKFcharNONENONE

A value that determines whether the shrink factor you enter for this item is a percentage or a fixed quantity. Valid values are:    %   
Percentage of order or requested quantity    F Fixed amount to be added to quantity 

mnShrinkageSRNKMATH_NUMERICNONENONE

A fixed quantity or percentage that the system uses to determine inventory shrinkage for an item. The system increases the planned order 
quantity by this amount in MPS/MRP/DRP generation. The shrink factor method you specify for the item determines whether the shrink factor 
is a percentage or a fixed quantity. If you are entering a percentage, enter 5% as 5.00 and 50% as 50.00.

mnQtyOrderMultiplesMULTMATH_NUMERICNONENONE

A multiple for rounding up planned order quantities in MPS/MRP. The system rounds up the planned order quantity to the nearest multiple 
you enter in this field.

mnWorkHoursPerDayWRHRMATH_NUMERICNONENONE

The number of work hours that the manufacturing plant operates per day.

szPrimaryUOMUOM1charNONENONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

cPhantomFlagEV01charNONENONE

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

cWarningMsgFlagEV02charNONENONE

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

cDecreaseMsgFlagEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

cIncreaseMsgFlagEV04charNONENONE

PeopleSoft event point processing flag 04.

szLeadTimeZeroMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szDecreaseFPOMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szCancelFPOMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szDeferInDamperMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szDeferFPOMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

cLotExpirationFlagEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

cWorkOrderFlagEV04charNONENONE

PeopleSoft event point processing flag 04.

cPurchOrderFlagEV05charNONENONE

A flag that indicates whether automatic spell check is turned on.

cGenerationTypeEV06charNONENONE

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

jdFrozenDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdMessageDateDATE02JDEDATENONENONE

Event point for JDE Date.

szWorkOrderStatusSRSTcharNONENONE

A user defined code (00/SS) that describes the status of a work order, rate schedule, or engineering change order. Any status change from 
90 through 99  triggers the system to automatically update the completion date.

mnDeferDamperDaysDEFDMATH_NUMERICNONENONE

mnExpediteDamperDaysEXPDMATH_NUMERICNONENONE

iMfgSafetyLeadTimeINT02integerNONENONE

Number of Days in the Past to Query for Quote Requests Received. 

iPurchSafetyLeadTimeINT03integerNONENONE

Event point for Integer.

iNumBucketlessDatesINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

iNumBucketDatesINT02integerNONENONE

Number of Days in the Past to Query for Quote Requests Received. 

cSuppressErrorMessageEV01charNONENONE

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

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

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.

mnF3411UniqueIDUKIDMATH_NUMERICNONENONE

This field is a unique number used to identify a record in a file.

cMRPMessageFlagMRPDcharNONENONE

This code may be used as an additional field to select Item information to print on reports.  Once values are loaded into this field, The 
DREAM Writer may be set up to select these values. Valid values are:    blank Items NOT processed by the generation.    1       Items processed by 
the generation WITHOUT outstanding messages.    2       Items processed by the generation WITH outstanding messages.

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

jdStartDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdBeginningDateDATE02JDEDATENONENONE

Event point for JDE Date.

jdEndDateDATE03JDEDATENONENONE

Event point for JDE Date.

szExpediteInDamperMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szExpediteFPOMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szIncreaseFPOMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

mnFromPotencyFRMPMATH_NUMERICNONENONE

A number that indicates the minimum potency or percentage of active ingredients acceptable for an item. The system displays a warning 
message if you try to purchase or issue items that do not meet the minimum acceptable potency. The system does not allow you to sell items 
that do not meet the minimum acceptable potency.

mnThruPotencyTHRPMATH_NUMERICNONENONE

A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item. The system displays a 
warning message if you try to purchase or issue items that have a potency that exceeds the maximum potency acceptable. The system does 
not allow you to sell items that have a potency that exceeds the maximum potency acceptable.

szFromGradeFRGDcharNONENONE

A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item. The system displays a warning message if 
you try to purchase or issue items with grades that do not meet the minimum grade acceptable. The system does not allow you to sell items 
with grades that do not meet the minimum acceptable level.

szThruGradeTHGDcharNONENONE

A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item. The system displays a warning message if 
you try to purchase or issue items with grades that exceed the maximum grade acceptable. The system does not allow you to sell items with 
grades that exceed the maximum grade acceptable.

mnVendorNumberVENDMATH_NUMERICNONENONE

The address book number of the preferred provider of this item.

szPlanQtyExceedsMOQMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szPlanQtyExceedsFOQMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szLotExpiredMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szPurchOrderDocTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szWorkOrderDocTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

mnMaxOrderQuantityRQMXMATH_NUMERICNONENONE

The maximum order quantity for an item. You can base the quantity on factors other than usage, such as perishability, storage capacity, 
and so forth.

cProcessFlagEV05charNONENONE

A flag that indicates whether automatic spell check is turned on.

cStockNonStockFlagSNScharNONENONE

A code that determines whether the system performs rounding for planning purposes. Valid values are:    R Round either up or down to the 
nearest whole number.    U Round up to the nearest whole number.    Blank Do not round. Example of value R: If the calculated requirements for 
an item are 4.6, the system rounds the quantity required to 5.0. If the calculated requirements are 4.4, the system rounds the quantity required 
to 4.0. Example of value U: If the calculated requirements for an item are greater than 4.0 and less than or equal to 5.0, the system rounds the 
quantity required to 5.0.

cCostLevelCLEVcharNONENONE

A code that indicates whether the system maintains one overall inventory cost for the item, a different cost for each branch/plant, or a 
different cost for each location and lot within a branch/plant. The system maintains inventory costs in the Inventory Cost table (F4105). Valid codes 
are:    1   Item level    2   Item/Branch level    3   Item/Branch/Location level

mnF3412UniqueIDUKIDMATH_NUMERICNONENONE

This field is a unique number used to identify a record in a file.

mnSafetyStocksSAFEMATH_NUMERICNONENONE

The quantity of stock kept on hand to cover high-side variations in demand.

cMultiLevelFlagEV02charNONENONE

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

szReqStartBeforeStartMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szManualAdjustNecessaryMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

cDateErrorFlagEV01charNONENONE

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

szDateErrorMsgDescDSC1charNONENONE

Brief information about an item; a remark or an explanation.

szStandardUOMConversionTFLAcharNONENONE

Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:    blank Use the item-specific 
unit of measure    1       Bypass the item-specific unit of measure and use the standard unit of measure

mnStandardPotencySTDPMATH_NUMERICNONENONE

The percentage of active ingredients normally found in an item.

cPotencyControlOT1YcharNONENONE

A code that indicates whether you control the item by potency.

szJobNumberAsStringJOBcharNONENONE

Job Number

cCoByProductFlagEV01charNONENONE

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

cConsolidationMethodEV01charNONENONE

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

cMakeMfgItemsInOriginEV01charNONENONE

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

cProcessEachBranchEV02charNONENONE

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

szTransferDocTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szDateBranchMCUcharNONENONE

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.

cForecastConsumptionFlagEV02charNONENONE

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

cReplanFlagEV01charNONENONE

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

szCategoryCodePRPXcharNONENONE

A user defined code (system 41, type P4) under which you can organize logically related items. You can simplify the master planning 
process by concentrating on only the top 10% of the inventory value. This is similar to using the ABC Analysis, except that you can use this code to 
allow exceptions to ABC rules. Generally, you should only include items with high inventory investment in Master Planning. Excess stock can 
be carried for inventory items with little financial impact.

mnReorderQuantityROQIMATH_NUMERICNONENONE

The estimated reorder quantity for an item. You can enter this quantity if there is not enough sales history available for the system to 
accurately calculate a reorder quantity.

szRateOrderTypeDCTOcharOPTNONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

cMnWkDyHrMWDHcharOPTNONE

A code that determines the frequency of the schedule. Valid values are:    1   Monthly    2   Weekly    3   Daily    4   Per Shift (for future use)

cExtendRateEV01charOPTNONE

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

mnUniqueKeyIDOffsetMATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

mnLotEffectiveDefaultDaysLEDDMATH_NUMERICOPTNONE

The number of days that an item must remain in inventory before the system considers the item to be available for sales and manufacturing 
commitments. To calculate the lot effective date, the system adds the number that you enter in this field to the based on date that appears in 
the Lot Master table (F4108).

mnPurchasingEffectiveDaysPEFDMATH_NUMERICOPTNONE

The number of days after a purchased item isreceived that a lot becomes available. The system uses this number when calculating and 
displaying the effective date field in the Purchase Orders program (P4310) and the PO Receipts program (P4312).

cProjectPlanningEV01charOPTNONE

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

cProjectSpecificItemEV01charOPTNONE

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

Related Functions

B3400450 MRP, Write Lower Level Pegging Records from BOM
B3400540 MRP, Calculate Schedule Dates for Planning
B3401270 Cache, Process MRP Bucketless Dates
B3401280 Cache, Process MRP Co/By Products
B3401290 Cache, Process MRP Item Quantities
B3401300 Cache, Process MRP Inclusion Rules
B3401310 Cache, Process MRP Work Orders
B3401320 Cache, Process MRP Purchase Orders
B3401340 MRP, Return Work Days
B3401540 Cache, Process MRP Batch Bills
B3500030 MRP, Get Supply Branch
B3500040 MRP, Calculate Available Transfer Qty from Cache
B4000520 Get Item UoM Conversion Factor
B4001120 Calculate EOQ and ROP
B9800100 Get Audit Information
B9800420 Get Data Dictionary Definition
XF4105 Item Cost I/O

Related Tables

F3002 Bill of Material Master File
F3411 MPS/MRP/DRP Message File
F3413 MPS/MRP/DRP Summary File
F34UI005 MRP Orders/Requirements User Index-Process Item
F34UI006 MRP Co/By Product Net Quantity User Index
F35UI001 MPS/MRP Planning - Multiple Plant User Index
F4211 Sales Order Detail File
9in"> @OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache

@WO[$X] = @WO[$X] + Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'WOU'(2 keys).

End While
/* Look for 'RS'(adjusted Rate) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'RS'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

 @OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache
@RT[$X] = @RT[$X] + Quantity(NQ01) from Cache

Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'RS'(2 keys).

End While
/* Look for 'IR'(in-receipt routing) qtys */

$X = 1

Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'IR'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache

$X++

End While 

 @OR[$X]  = @OR[$X] + Quantity(NQ01) from Cache
Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 'IR'(2 keys).

End While
If Input $LEXP = '1'

/* Look for 'LXU'(unadjusted lot expired) qtys */
$X = 1
Call B3401290 in mode '1', sequential fetch, with JOB, Input Branch, and 'LXU'(2 keys).
While Cache Error Code = '0'

While @DT[$X] < Date from Cache
$X++

End While 
@LQU[$X]  = @LQU[$X] + Quantity(NQ01) from Cache
Call B3401290 in mode '6', sequential fetch, with JOB, Input Branch, and 
'LXU'(2 keys).

End While

For $X = 1 to $$PND

If Input $$FCP = '1'

If @FQ[$X] >= @SQ[$X] then
@IT[$X] = @IT[$X] - @FQ[$X]

Else

@IT[$X] = @IT[$X] - @SQ[$X]

End If

Else

@IT[$X] = @IT[$X] - @FQ[$X] - @SQ[$X]

End If

If Input $$COBY = '1' then
@CO[$X] = @IT[$X]

End If

* Adjust Lot Quantity if $LEXP = '1'


If Input $LEXP = '1' then
Wk Qty = 0

Wk Qty = Wk Qty + @LQU[$X] + @IT[$X]
If Wk Qty > 0 
@LQ[$X] = Wk Qty

Wk Qty = 0

End If
End If

End For


Free @SQ and @FQ.


2. Write Lead Time is Zero Message

If SVSTKT <> '0' or  $$PHAN = '1'

If (SVSTKT = 'F' and SVLTLV = 0 ) or (SVMRPP = 'V' and SVLTPU = 0)

If $@A = '1' and  Input Lead Time Zero DSC1 <> Blanks

Write F3411 with MMMSGT('A'), MMUKID(Input UKID), MMDSC1(Input 

DSC1),MMITM(Inp Item), MMMCU(Inp Branch), MMHCLD ('A').