MRPUpdateNetChangefromBOM

MRP, Update Net Change from BOM

Major Business Rule

Object Name: B3400560

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This business function will check if Bill of Materials (F3002) exists for an Item/Branch. If it does 

not exist, it will write a message to F3411 Message table.  Optionally, if the BOM is found, it will 

update the Net Change flag in the F4102 Item Balance table for all the components in the Bill of 

Materials.


1.1Purpose

This function is used to set on the Net Change flag in the Item Balance for all components in the BOM 

in the Planning Program P3482 in Net Change Mode. This function should NOT be called only under these 

conditions:

1) If calling from R3482 - If $$CONS = '1' And $$CON2 = '1' And $CMCU <> " " And SVSTK2 <> 
'M'.

2) If calling from R3483 - If $$CONS = '1' And SVSTK2 <> 'M' Or $$CONS = '1' And $CMCU<>" " 

And $CMCU<> SVMCU.


1.2Setup Notes and Prerequisites

The Unique Id must be Obtained before calling the function

The Message flag must be Obtained before calling this function


1.3Special Logic

None


2.Technical Specifications

The following actions have to be performed by the Business Function.

1. Open Tables and Initialize Variables

Open F3002 table 

If Input Mode <> '1'

Open F4102 table

Endif

If Input $@A = '1' and Input DSC1  <> blanks

Open F3411 table

Endif

If Error in Opening , Exit function with Error Code = '1'


2. Read BOM and Process Data

Wk Desc = Input Warning Msg Description 1
Wk Update Net Change = '1'
Fetch from F3002 Using IXCOBY=' ', IXTBM='M', IXKIT=Input Item, IXMMCU=Input Branch.

If Record Not Found then

Fetch From F3002 Using IXCOBY='C', IXTBM='M', IXKIT=Input Item, IXMMCU=Input 

Branch.

If Record Not Found then

Fetch From F3002 Using IXCOBY='B', IXTBM='M', IXKIT=Input Item, 

IXMMCU=Input Branch.

If Record Not Found then

Wk Update Net Change = '0'

Else

Wk Desc = Input Warning Msg Description 2

Wk CoBy Flag = 'B'
End If

Else

Wk Desc = Input Warning Msg Description 2

Wk CoBy Flag = 'C'
End If

If Input $@A = '1' And Input Description <> ' 'then

Write F3411 Using MMMSGT('A'), MMUKID(Input UKID), MMDSC1(Wk Desc), 
MMITM(Input Item), MMMMCU(Input Branch), MMHCLD('A')

Input F3411 Unique ID ++

Output Message Code = '2'

End If

Else

Wk CoBy Flag = ' '

End If


If Wk Update Net Change = '1' And Input $$NETC = '1'

Select F3002 Records Using IXCOBY=Wk CoBy Flag, IXTBM='M', IXKIT=Input Item, 
IXMMCU=Input Branch.

While Wk Exit Flag = '0'

Read From F3002.

If Read Failed then

Break

End If

Update F4102 record using IXITM, IXCMCU as keys with IBMRPC = '1'

End While

End If



3. Close Tables and Exit function

Close all Open tables and Exit the function 



Data Structure

D3400560 - MRP, Update Net Change from BOM

Parameter NameData ItemData TypeReq/OptI/O/Both
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.

cWarningMsgFlagEV01charNONENONE

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

szWarningMsgDescriptionDSC1charNONENONE

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

mnUniqueKeyIDUKIDMATH_NUMERICNONENONE

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

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.

cSuppressErrorMessageEV02charNONENONE

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.

cMessageCodeMRPDcharNONENONE

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.

szCoByWarningDescDSC1charNONENONE

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

cNetChangeFlagEV02charNONENONE

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

mnUniqueKeyIDOffsetMATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

Related Functions

B9800100 Get Audit Information

Related Tables

F3002 Bill of Material Master File
F3411 MPS/MRP/DRP Message File
F4102 Item Branch File