MRPWriteWorkOrderQtyIntoCache

MRP, Write Work Order Qty Into Cache

Minor Business Rule

Object Name: B3400440

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This business function will get read the Work Order table (F4801) and Load the Open Quantity 

Calculated in the Item Quantity Cache in the Primary unit of measure. It will also cache the selected Work 

Order records in the in the Work Order Cache in the Primary UOM.


1.1Purpose

This function is used to obtain data from the F4801 table for the MRP Planning Program R3482 and 

R3483. The function will return error codes necessary. 


1.2Setup Notes and Prerequisites

It is assumed that the Work Order cache does not have residual data on the same item and branch.


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 F4801, F34004, F3411 tables

If Input $$PROC = '1' then Open the F3111 table and the F34UI005 tables.

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

If Input Receipt Routing flag = '1'

Open F43092

If Error in Opening F43092

Input Rec Rtg Flag = ' '.

Endif

Endif


Wk Output Work Order Flag = '0'
Exit Flag = '0'

2. Load the Work Order Data in the Arrays

If Input Consolidation Method = '1' then


Wk Cache Branch = Input Date Branch

Else


Wk Cache Branch = Input Branch

End iF

Switch (Input Number of Past Due Periods $PDUE)

Case 0

If Input Forecast Consumption Flag($$FCP) = '1'

Wk From Date = Input $$FBDT

Else

Wk From Date = Input $$BEG

End If

Select Records from F4801 Using WAITM=Input Item, WAMMCU=Input Branch and Wk 
From Date <= WADRQJ <= Input Last Date

Case 1

If Input Forecast Consumption Flag($$FCP) = '1'

Select Records from F4801 Using WAITM=Input Item, WAMMCU=Input Branch and 
Input $$FBDT <= WADRQJ <= Input Last Date

Else

Select Records from F4801 Using WAITM=Input Item, WAMMCU=Input Branch and 
WADRQJ <= Input Last Date

End If

Case 2

Select Records from F4801 Using WAITM=Input Item, WAMMCU=Input Branch and 
WADRQJ <= Input Last Date

End Switch

Wk Exit Flag = '0'

While Wk Exit flag <> '1'

Fetch from F4801

If Fetch Failed

Break

Endif

If WADRQJ = 0

Continue

Endif

Call B3401300 in 'GET' mode to fetch record from Inclusion Rules cache, using 
WADCTO, LNTY=' ', WASRST(Right Justified).

If Cache Code Error <> '0' (Not Found)

Continue

Endif

Wk Quantity = WAUORG - WASOQS- WASOCN

Wk Conv Factor = 1.

If  WAUOM <> Input UOM1 Or Input SVOT1Y = 'Y'

Get Wk Conv factor from WAUOM to Input UOM1 using B4000520

Endif

Wk Quantity = Wk Quantity * Wk Conv Factor

Wk Ratio Quantity = WAUORG * Wk Conv Factor

If Wk Quantity < 0

Wk Quantity = 0

Endif

Wk Rec Rtg Qty = 0

If  Rec Rout Code WARTG = 'Y' and Input Rec Rtg flag = '1'

Wk Index = 1

While Wk Index <= 5

Wk UPIB = Blanks

Case Wk Index = 1

Wk UPIB = 'PREQ'

Case Wk Index = 2 and Input Trans flag <> '1'

Wk UPIB = 'QTTR'

Case Wk Index = 3 and Input Inspect flag <> '1'

Wk UPIB = 'QTIN'

Case Wk Index = 4 and Input Other1 flag <> '1'

Wk UPIB = 'QTO1'

Case Wk Index = 5 and Input Other2 flag <> '1'

Wk UPIB = 'QTO2'

End Case

If Wk UPIB <> Blanks

While Wk Exit flag 1 <> '1'

Read the F43092 rows using WARTG, Wk UPIB, WADOCO, 

WADCTO as keys

If not found

Break

Endif

Wk Quantity 1 = PXQTYO

If PXUOM <> Input UOM1 Or Input SVOT1Y = 'Y'

Convert Wk Quantity 1 from PXUOM to Input 

UOM1 using B4000520

Endif

Wk Rec Rtg Qty= Wk Rec Rtg Qty + Wk Quantity 1

EndWhile

Endif

Add 1 to Wk Index

EndWhile

Endif

If Wk Rec Rtg Qty < 0

Wk Rec Rtg Qty = 0

Endif


If Work Order's WAUNCD <> 'Y' then

Cache the WO record in the Work Order Cache.
Call B3401310 in 'ADD' mode to cache the WO record using WADOCO, WADCTO, 

MCU= Wk Cache Branch, WASRST, WASTRT, WADRQJ, WAITM, MATH01= Wk Quantity, UORG=WAUORG *Wk 

Conv Factor, WATBM, EV01 Flag = ' '.

End If

If Wk Quantity > 0 then
Cache the WO Qty in the Item Qty Cache
Call B3401290 in 'GET' mode to fetch Item Qty cache record using Wk Cache Branch, WADRQJ and 

'WOU'.

If Cache Code Error = '0' (Record Found)
Add Wk Quantity to Quantity from Cache record, and 

call B3401290 in 'UPDATE' mode to update the cache record.

Else

Call B341290 in 'ADD' mode to add a new cache record with Wk Cache 
Branch, WADRQJ, 'WOU' and with Wk Quantity

End If
End If

If Wk Rec Rtg Quantity > 0 then

Cache the IR Qty in the Item Qty Cache
Call B3401290 in 'GET' mode to fetch Item Qty cache record using Wk Cache 
Branch, WADRQJ, and 'IR'.

If Cache Code Error = '0' (Record Found)
Add Wk Rec Rtg Quantity to Quantity from Cache record, and

Call B3401290 in 'UPDATE' mode to update the cache record.

Else

Call B3401290 in 'ADD' mode to add a new cache record with Wk Cache 
Branch, WADRQJ, 'IR' and Wk Rec Rtg Quantity.

End If
End If

Call B3401270 in mode '9' to get the nearest date from the bucketless date cache which is <= 
WADRQJ and with Input Date Branch. 

If that bucketless date is found then store it in Wk Bucketless Date.


If  WAUNCD = 'Y' and WASTRT < $$MSGD and $@F = '1' and Wk Quantity > 0

Write F3411 with MMMSGT('F'), MMUKID(Input UKID),MMDOCO(WADOCO), 

MMDCTO(WADCTO), MMLNID(=0), MMKCOO(=' '), MMTRQT(Wk Quantity), MMVEND(0), MMSTRT(WASTRT), 

MMDSC1(Inp Frozen Order Desc), MMITM(Inp Item),MMMCU(Wk Cache Branch), MMDRQJ(Wk 

Bucketless Date), MMHCLD('A').

Input UKID = Input UKID + 1

Output $$MRPD = '2'

Endif

If WADRQJ < $$RGNJ and WASTRT < $$MSGD and $@T = '1' and Wk Quantity > 0

Write F3411 with MMMSGT('T'), MMUKID(Input UKID),MMDOCO(WADOCO), 

MMDCTO(WADCTO), MMLNID(0), MMKCOO(" "), MMTRQT(Wk Qty), MMVEND(0), MMSTRT(WASTRT), 

MMDSC1(Inp Past Due Desc), MMITM(Inp Item),MMMCU(Wk Cache Branch), MMDRQJ(Wk Bucketless Date), 

MMHCLD('A').

Input UKID = Input UKID + 1

Output $$MRPD = '2'

Endif

Output WO flag = '1'


If Input $$MRP = 'Y' and Input $$MANP = ' '

Call B3400460 to Create Pegging from Parts List with WADOCO, WAITM, 

WAMMCU, $$PROC, $$NETC and F3412 UKID.

Input F3412 UKID = Return UKID from B3400460

If B3400460 - Error Code = '2' (We should generate pegging records from 
BOM)If WARORN = " " Or WARORN = "0" Or (Input STKT <> 'K' And <> 'C')

If WASTRT < $$MSGD and $@A = '1' and Wk Quantity > 0 and 

Input Part List Desc <> ' '

Write F3411 with MMMSGT('A'), MMUKID(Input 
UKID),MMDOCO(WADOCO), MMDCTO(WADCTO), MMLNID(0), MMKCOO(""), MMTRQT(Wk Qty), 

MMVEND(0), MMSTRT(WASTRT), MMDSC1(Input Parts List does not Exist 

Desc), MMITM(Inp Item),MMMCU(Wk Cache Branch), MMDRQJ(Wk Bucketless Date), 

MMHCLD('A').

Input UKID = Input UKID + 1
Output $$MRPD = '2'

Endif.

Call B3400450 to Create Lower Level Pegging From BOM with 

WAITM, WAMMCU, WATBM, WADOCO, DCTO(='WO'), WASTRT, WADRQJ, WAUORG*Wk Conv Factor, 

SVUOM, SVMRPP, SVLTLV, SVLTPU, $$STKT, SVSETL, SVQUED, RATE, SVSRKF,SVSRNK, 

$$MSLT, $$PSLT, $$PROC ,F3412 UKID, F3411 UKID, Date Error Flag and Msg  

Input WRHR, Input Consolidation Method, Input Date Branch

Input F3412 UKID = Return UKID from B3400450

Input F3411 UKID = Return UKID from B3400450

Input Date Error Flag = Return Date Error Flag from 

B3400450

End If

Endif

Endif

If Input $$PROC = '1' then

Call Internal Function to Spread COBY products with WADOCO, WADCTO, 
WAITM, WAMMCU, WADRQJ, Wk Ratio Qty

End If

EndWhile

 

Close all Tables 
Exit the function with Error Code = 0


Spread COBY Products Internal Function(WADOCO, WADCTO, WAITM, WAMMCU, WADRQJ, Wk Ratio Qty


Read F3111 table using WADOCO(from main) and COBY = 'C' sequentially.

If Record Found then

While Not EOF F3111

If WMCMCU = WAMMCU

Wk Quantity = WMUORG - WMTRQT - WMSOCN

Call B3401280 in 'GET' mode to get coby cache record, using Wk Cache 
Branch and WMCPIT as ITM.

If Cache Code Error <> "0" (Not found)

Call B3401280 in 'ADD' mode to add the CoBy product to cache, 
using Wk Cache Branch, WMCPIT, 0 as MN29D9.

Input $$CEND ++

End If

Read from F4101 using WMCPIT to get the Primary UOM(IMUOM1) and 

IMTFLA flag.

Read from F4102 Using WMCPIT and WMCMCU to get IBSTDP, and IBOT1Y.

Wk Conv Factor = 1

If WMUM <> IMUOM1 Or IBOT1Y then

Call B400520 to get Wk Conv Factor from WMUM to IMUOM1.

End If

Wk Quantity = Wk Quantity * Wk Conv Factor.

If Wk Quantity < 0 then 

Wk Quantity = 0

End If

Wk Rec Rtg Qty = 0

If WMRTG = 'Y' and Input Rec Rtg Flag = '1'

Wk Index = 1

While Wk Index <= 5

Wk UPIB = " "

Case Wk Index = 1

Wk UPIB = "PREQ"

Case Wk Index = 2 And Input Trans Flag <> '1'

Wk UPIB = "QTTR"

Case Wk Index = 3 And Input Inspect Flag <> '1'
Wk UPIB = "QTIN"

Case Wk Index = 4 And Input Other1 Flag <> '1'
Wk UPIB = "QT01"

Case Wk Index = 5 And Input Other2 Flag <> '1'
Wk UPIB = "QT02"

End Case

If WK UPIB <> " " then

While Wk Exit Flag <> '1'

Read from F43092 using WMRTG, Wk UPIB, 

WMDOCO, WMDCTO, WMBSEQ.

If Not Found then 

Break out of while loop

End If

Wk Quantity 1 = PXQTYO

If PXUOM <> IMUOM1 Or IBOT1Y = 'Y'

Convert Wk Quantity 1 from PXUOM to 

IMUOM1 using B400520

End If

Wk Rec Rtg Qty = Wk Rec Rtg Qty + Wk Quantity 

1

End While

End If

Wk Index ++

End While

End If

If Wk Quantity > 0

Fetch from F34UI005 Using Input JOBS, CTID, Wk Cache Branch, 
WMCPIT, WADRQJ and 'PWU'.

If Fetch Failed then
Add to F34UI005 using JOBS, CTID, Wk Cache Branch, WMCPIT, WADRQJ, 
'PWU' and Wk Quantity.

Else
Add Wk Quantity to Quantity from F34UI005 and Update the 

F34UI005 record.

End If

End If

If Wk Receipt Rtg Qty > 0 then

Data Structure

D3400440 - MRP, Write Work Order Qty Into Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICNONENONE

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

szComputerIdCTIDcharNONENONE

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

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.

szDisplayUnitOfMeasureUOM1charNONENONE

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

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.

cParentStockingTypeSTKTcharNONENONE

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

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

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

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

nMfgSafetyLeadTimeINT02integerNONENONE

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

nPurSafetyLeadTimeINT03integerNONENONE

Event point for Integer.

cProcessFlagEV02charNONENONE

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

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

cTransitFlagEV01charNONENONE

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

cInspectFlagEV02charNONENONE

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

cOther1FlagEV03charNONENONE

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. 

cOther2FlagEV04charNONENONE

PeopleSoft event point processing flag 04.

jdMessageDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdRegenerationDateDATE02JDEDATENONENONE

Event point for JDE Date.

cFrozenOrderMsgFlagEV09charNONENONE

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

cPastDueOrderMsgFlagEV10charNONENONE

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

cWarningMessagesFlagEV01charNONENONE

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

cMultiLevelFlagEV01charNONENONE

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

mnF3411UniqueIDUKIDMATH_NUMERICNONENONE

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

mnF3412UniqueIDUKIDMATH_NUMERICNONENONE

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

cSuppressErrorMessageEV07charNONENONE

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

cReceiptRoutingFlagEV08charNONENONE

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.

cWorkOrderFlagEV09charNONENONE

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

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.

cMfgPartsListFlagEV02charNONENONE

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

cNetChangeFlagEV01charNONENONE

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

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.

szFrozenOrderDescDSC1charNONENONE

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

szPastDueOrderDescDSC2charNONENONE

A second, 30-character description, remark, or explanation.

szPartsListDescDSC3charNONENONE

The third line of description associated with an inventory item or order line.

cDateErrorFlagEV01charNONENONE

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

szDateErrorMsgDescDSC1charNONENONE

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

mnWorkHoursWRHRMATH_NUMERICNONENONE

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

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.

jdBeginDateEFFFJDEDATENONENONE

A date that indicates one of the following:     o When a component part goes into effect on a bill of material     o When a routing step goes into 
effect as a sequence on the routing for an item     o When a rate schedule is in effect The default is the current system date. You can enter 
future effective dates so that the system plans for upcoming changes. Items that are no longer effective in the future can still be recorded and 
recognized in Product Costing, Shop Floor Management, and Capacity Requirements Planning. The Material Requirements Planning system 
determines valid components by effectivity dates, not by the bill of material revision level. Some forms display data based on the effectivity 
dates you enter.

jdLastDateEFFTJDEDATENONENONE

A date that indicates one of the following:     o When a component part is no longer in effect on a bill of material     o When a routing step is no 
longer in effect as a sequence on the routing for an item     o When a rate schedule is no longer active The default is December 31 of the 
default year defined in the Data Dictionary for Century Change Year. You can enter future effective dates so that the system plans for upcoming 
changes. Items that are no longer effective in the future can still be recorded and recognized in Product Costing, Shop Floor Management, 
and Capacity Requirements Planning. The Material Requirements Planning system determines valid components by effectivity dates, not by 
the bill of material revision level. Some forms display data based on the effectivity dates you enter.

jdForecastBeginningDateDATE04JDEDATENONENONE

Event point for JDE Date.

cForecastConsumptionFlagEV03charNONENONE

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. 

nNumberOfPastDuePeriodsINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

nNumberElementsInCOBYArrayINT02integerNONENONE

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

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.

cConsolidationMethodEV01charNONENONE

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

szJobNumberAsStringJOBcharNONENONE

Job Number

cRoundToWholeFlagSNScharNONENONE

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.

cActualStockingTypeSTKTcharNONENONE

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

mnUniqueKeyIDOffsetMATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

cSupplyDemandExistEV01charOPTNONE

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

cBOMLoadedFlagEV01charOPTNONE

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

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

cProjectSpecificItemEV01charOPTNONE

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

cProjectPlanningEV01charOPTNONE

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

mnSequenceNumberSEQNMATH_NUMERICOPTNONE

A number used to organize the table into a logical group for online viewing and reporting.

Related Functions

B3400450 MRP, Write Lower Level Pegging Records from BOM
B3400460 MRP, Write Pegging from Parts List
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
B4000520 Get Item UoM Conversion Factor
B4000920 Get Item Branch Mfg Data
B4001040 Get Item Master Description UOM
B9800100 Get Audit Information

Related Tables

F3111 Work Order Parts List
F3411 MPS/MRP/DRP Message File
F3412 MPS/MRP/DRP Lower Level Requirements File
F34UI005 MRP Orders/Requirements User Index-Process Item
F43092 Purchase Order Receipt Routing File
F4801 Work Order Master File
bsolute; left: 0.500000in">If that bucketless date is found then store it in Wk Bucketless Date.


If  WAUNCD = 'Y' and WASTRT < $$MSGD and $@F = '1' and Wk Quantity > 0

Write F3411 with MMMSGT('F'), MMUKID(Input UKID),MMDOCO(WADOCO), 

MMDCTO(WADCTO), MMLNID(=0), MMKCOO(=' '), MMTRQT(Wk Quantity), MMVEND(0), MMSTRT(WASTRT), 

MMDSC1(Inp Frozen Order Desc), MMITM(Inp Item),MMMCU(Wk Cache Branch), MMDRQJ(Wk 

Bucketless Date), MMHCLD('A').

Input UKID = Input UKID + 1

Output $$MRPD = '2'

Endif

If WADRQJ < $$RGNJ and WASTRT < $$MSGD and $@T = '1' and Wk Quantity > 0

Write F3411 with MMMSGT('T'), MMUKID(Input UKID),MMDOCO(WADOCO), 

MMDCTO(WADCTO), MMLNID(0), MMKCOO(" "), MMTRQT(Wk Qty), MMVEND(0), MMSTRT(WASTRT), 

MMDSC1(Inp Past Due Desc), MMITM(Inp Item),MMMCU(Wk Cache Branch), MMDRQJ(Wk Bucketless Date), 

MMHCLD('A').

Input UKID = Input UKID + 1

Output $$MRPD = '2'

Endif

Output WO flag = '1'


If Input $$MRP = 'Y' and Input $$MANP = ' '

Call B3400460 to Create Pegging from Parts List with WADOCO, WAITM, 

WAMMCU, $$PROC, $$NETC and F3412 UKID.

Input F3412 UKID = Return UKID from B3400460

If B3400460 - Error Code = '2' (We should generate pegging records from 
BOM)If WARORN = " " Or WARORN = "0" Or (Input STKT <> 'K' And <> 'C')

If WASTRT < $$MSGD and $@A = '1' and Wk Quantity > 0 and 

Input Part List Desc <> ' '

Write F3411 with MMMSGT('A'), MMUKID(Input 
UKID),MMDOCO(WADOCO), MMDCTO(WADCTO), MMLNID(0), MMKCOO(""), MMTRQT(Wk Qty), 

MMVEND(0), MMSTRT(WASTRT), MMDSC1(Input Parts List does not Exist 

Desc), MMITM(Inp Item),MMMCU(Wk Cache Branch), MMDRQJ(Wk Bucketless Date), 

MMHCLD('A').

Input UKID = Input UKID + 1
Output $$MRPD = '2'

Endif.

Call B3400450 to Create Lower Level Pegging From BOM with 

WAITM, WAMMCU, WATBM, WADOCO, DCTO(='WO'), WASTRT, WADRQJ, WAUORG*Wk Conv Factor, 

SVUOM, SVMRPP, SVLTLV, SVLTPU, $$STKT, SVSETL, SVQUED, RA