MRPWritePeggingFromPartsList

MRP, Write Pegging from Parts List

Major Business Rule

Object Name: B3400460

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This business function will generate the Component requirements using the Parts List and the 
requirements for the Parent. Then it will write the requirements to the Pegging table F3412. This function is 

used to generate lower level Pegging records for MRP Planning.


1.1Purpose
This function is used to write Pegging records for Components based on the Work Order Parts List in 
Multi Level Planning, based on the Parent Item Requirements. R3483(MP-MRP uses this function as well 

for the same purpose).


1.2Setup Notes and Prerequisites
The Unique Id for F3412 must be determined by calling the function (B3100490). 

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 F4101, F4102, F3412 and F3111 tables
If Error in Opening the Tables, Exit the function with an Error code = '1'

Error Code = '2'


2. Read and Process Parts List Table

Do While Exit flag  <> '1'
Read F3111 table using  Input DOCO and COBY (= ' ' ) as Partial keys 

If not found

Break.

Endif

Error Code = '0'

Read F4101 using WMCPIT as key.

Read F4102 using WMCPIT and WMCMCU as key

If not found

Continue

Endif

Wk Quantity = WMUORG - WMQNTA

If  WMUM <> IMUOM1 or IBOT1Y = 'Y'

Convert Wk Quantity from WMUM to IMUOM1 using B4000520 passing 

WMCMCU, WMCPIT,

IBOT1Y, IBSTDP, LOTN = ' '
Endif
If (Wk Quantity > 0 and WMUORG > 0) or (Wk Quantity < 0 and WMUORG < 0)

If Input $$PROC = '1' And Input $$CONS <> '1' And Input $$CONS <> '2'

MWRORN = 'PROCESS'

Else

MWRORN = ' '

Endif

Write F3412 with MWKIT(Input KIT), MWMMCU(Input MMCU), 

MWDRQJ(WMDRQJ), MWUORG(Wk Quantity), MWITM( WMCPIT), MWMCU(WMCMCU),MWDCTO('FO'),MWDOCO(Input DOCO), 

MWRORN and  MWUKID

Input UKID = Input UKID + 1

Endif

If Input $$NETC = '1'

IBMRPC = '1'

Update F4102 for WMCPIT, WMCMCU

Endif

Enddo


3.Close Tables and Exit Routine

Close all the Tables and Release Requests



^

Data Structure

D3400460 - MRP, Write Pegging from Parts List

Parameter NameData ItemData TypeReq/OptI/O/Both
mnDocumentNoDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

mnParentItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

szParentBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

cProcessFlagEV01charNONENONE

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

cNetChangeFlagEV02charNONENONE

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

mnUniqueIDUKIDMATH_NUMERICNONENONE

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

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.

cSuppressErrorMessageEV03charNONENONE

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. 

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.

cConsolidationMethodEV01charNONENONE

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

mnUniqueKeyIDOffsetMATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

mnJobnumberAJOBSMATH_NUMERICOPTNONE

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

mnProjectNumberPRJMMATH_NUMERICOPTNONE

A number that identifies an EPM project in the system. The project must be set up in the Add/Revise Project program (P31P011).

mnDocumentOrderInvoiceDOCOMATH_NUMERICOPTNONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

cProjectPlanningEV01charOPTNONE

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

Related Functions

B4000520 Get Item UoM Conversion Factor
B9800100 Get Audit Information

Related Tables

F3111 Work Order Parts List
F3412 MPS/MRP/DRP Lower Level Requirements File
F4101 Item Master
F4102 Item Branch File