CopyBillOfMaterialData

Copy Bill Of Material Data

Major Business Rule

Object Name: B4100460

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function retrieves the Bill of Material table (F3002) for the item and branch specified and 

returns the item number, order quantity and unit of measure for the bill of material.


Setup Notes and Prerequisites

The Branch (MMCU), Item Number (ITM), Transaction Date (TRDJ) and Transaction Quantity (TRQT) fields 

are required input parameters.  

 

Special Logic

This function is called multiple times to read all records in the Bill of Material table for the Item 

and Branch requested.


Technical Specification


Parameters


Data Item     Data Structure Description     I/O     Required     Notes

MMCU          Branch                          I          Y

ITM           Short Item Number               I          Y

TRDJ          Transaction Date                I          Y

UITM          Primary Item Number             O          Y

TRQT          Transaction Quantity            B          Y

UOM           Transaction Unit of Measure     O          Y

HUSER         User                            B          N

HREQUEST      Request                         B          N

EV01          Last Record Read                O          N        Internal use - will need to know

when the last record was read so

                                                                  that all records are written to the

                                                                  grid.


Related Tables

F3002 - Bill of Material


Related Business Functions

GetLineTypeConstants - B4000260

VerifyAndGetBillofMaterial - B3000510


Processing

This function calls the business function Verify And Get Bill of Material (B3000510) to retrieve the 

F3002 with TBM = 'M', and the Item and Branch fields passed in.  The Effective From Date (EFFF), 

Effective Thru Date (EFFT), Line Type (LNTY), Item Number (ITM), Component Branch (CMCU), Quantity (QNTY), 

Unit of Measure (UM), Batch Quantity (BQTY) and Fixed or Variable Quantity (FORQ) fields are returned. 

 


Once the last record is read, the Last Record Read parameter is set to a '1'.


If the Transaction Date is less than the Effective Date or the Transaction Date is greater than the 

Thru Effective Date, and error is issued.


The business function Get Line Type Constants (B4000260) is called to retrieve the line type record 

for the Line Type returned from the Bill of Material table.  If the Inventory Interface flag (IVI) is 

an 'N', an error is returned.


If no errors exist, the business function Get Item Branch Information (B4100310) is called to 

retrieve the stocking type (STKT) for the Item and Branch.  If the Stocking Type is not equal to 'O' 

(Phantom), the quantity is determined.


Order Quantity calculation:


The Transaction Quantity (TRQT) passed in is multiplied by the Standard Required Quantity (QNTY from 

the F3002).  


If the Fixed or Variable Quantity (FORQ from the F3002) = 'F' or the FORQ = '%'

AND the Batch Quantity Units (BQTY from the F3002) NE zeros, The Transaction Quantity returned 

is the Standard Required Quantity (QNTY).  

else

The Transaction Quantity returned is the result of the Transaction Quantity mulitplied by 

the Standard Required Quantity. 






Data Structure

D4100460 - Copy Bill Of Material Data

Parameters
Data Item
     Data Structure Description     I/O     Required     Notes
MMCU          Branch                          I          Y
ITM           Short Item Number               I          Y

TRDJ          Transaction Date                I          Y

UITM          Primary Item Number             O          Y

TRQT          Transaction Quantity            B          Y

UOM           Transaction Unit of Measure     O          Y

HUSER         User                            B          N

HREQUEST      Request                         B          N

EV01          Last Record Read                O          N        Internal use - will need to know

when the last record was read so

                                                                  that all records are written to the

                                                                  grid.



^

Parameter NameData ItemData TypeReq/OptI/O/Both
szBranchMMCUcharNONENONE

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.

mnItemNumberITMMATH_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

jdTransactionDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

szPrimaryItemNumberUITMcharNONENONE

A number that the system assigns to an item. It can be in short, long, or third item number format.

mnTransactionQuantityTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

szTransactionUOMUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

idRequestGENLNGIDNONENONE

General purpose ID variable.

cLastRecordReadEV01charNONENONE

Parameters
Data Item
     Data Structure Description     I/O     Required     Notes
EV01          Last Record Read                O          N        Internal use - will need to know
ab  ab  ab  ab  ab  ab  ab  ab  ab  ab  ab when the last record was read so

                                                                  that all records are written to the

                                                                  grid.



^

Related Functions

B4000260 Line Type - Activity Rules
B4001040 Get Item Master Description UOM
B4100210 Check Item Branch
B4100310 Get Item Branch Info

Related Tables

F3002 Bill of Material Master File