DeleteForecastRecordsFromBOM

MRP, Delete Forecast Records from BOM

Minor Business Rule

Object Name: B3400570

Parent DLL: CMFG

Location: Client/Server

Language: C

Data Structure

D3400570 - MRP, Delete Forecast Records 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.

szForecastTypeTYPFcharNONENONE

A user defined code (34/DF) that indicates one of the following:     o The forecasting method used to calculate the numbers displayed about 
the item     o The actual historical information about the item 

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.

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.

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.

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.

cCoByProductFlagCOBYcharNONENONE

A code that distinguishes standard components or ingredients from co-products,by-products, and intermediates. Co-products are 
(concurrent) end items as the result of a process. By-products are items that can be produced at any step of a process, but were not planned. 
Intermediate products are items defined as a result of a step but are automatically consumed in the following step. Generally, intermediates are 
nonstock items and are only defined steps with a pay-point for reporting purposes. Standard components (Discrete Manufacturing) or ingredients 
(Process Manufacturing) are consumed during the production process. Valid values are:    C Co-products    B By-products    I Intermediate 
products    Blank Standard components or ingredients

mnJobnumberJOBSMATH_NUMERICOPTNONE

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

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
F3460 Forecast File
F34UI004 MPS Net Change User Index
MRPDeleteForecastRecordsfromBOM

MRPDeleteForecastRecordsfromBOM

MRP, Delete Forecast Records from BOM

Minor Business Rule

Object Name: B3400570

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.  If the BOM is found, it will delete all 

the Forecast records of the Input Type for all the components in the Bill of Materials. 


1.1Purpose

This function is used to delete forecast records in the MPS Planning run and is used in P3482.


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.

ONLY R3482 should use 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  and F3460 tables 

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 No of Record = 0

Do While Wk Exit flag <> '1'

Read F3002 using COBY(=' '), Item, Branch and TBM = 'M' as partial keys

If not found

If Input $@A = '1' and Input Description <> Blanks and Wk No of 

Records = 0

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

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

Input UKID = Input UKID + 1

Output $$MRPD = '2'

Endif

Break

Endif

Wk No of Records = 1

Delete the F3460 records using IXCPIT and IXCMCU and Input $$MTYF as Partial 

keys

Enddo


3. Close Tables and Exit function

Close all Open tables and Exit the function 



Data Structure

D3400570 - MRP, Delete Forecast Records 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.

szForecastTypeTYPFcharNONENONE

A user defined code (34/DF) that indicates one of the following:     o The forecasting method used to calculate the numbers displayed about 
the item     o The actual historical information about the item 

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.

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.

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.

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.

cCoByProductFlagCOBYcharNONENONE

A code that distinguishes standard components or ingredients from co-products,by-products, and intermediates. Co-products are 
(concurrent) end items as the result of a process. By-products are items that can be produced at any step of a process, but were not planned. 
Intermediate products are items defined as a result of a step but are automatically consumed in the following step. Generally, intermediates are 
nonstock items and are only defined steps with a pay-point for reporting purposes. Standard components (Discrete Manufacturing) or ingredients 
(Process Manufacturing) are consumed during the production process. Valid values are:    C Co-products    B By-products    I Intermediate 
products    Blank Standard components or ingredients

mnJobnumberJOBSMATH_NUMERICOPTNONE

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

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
F3460 Forecast File
F34UI004 MPS Net Change User Index