UpdateMaterialOrScrapAmount

Update Material Or Scrap Amount

Minor Business Rule

Object Name: B3100750

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function accesses a Work Order's parent item Material Cost (A1) or Scrap Cost (A2) 

record in the Work Order Cost Variance table F3102, and resets either the material cost amount or the 

scrap cost amount to the cost sent into this business function.  If a WO Cost Variance record does not 

exist for the Work Order, Parent Relationship, Item, and Cost Type, a new row is inserted into the table. 

 Current Cost amount and Current Units are usually updated, however for Kit or Configured items ('K' 

or 'C' stocking type), Standard Cost amount and Standard Units are updated.


1.2Setup Notes and Prerequisites

• Prior to execution, total material cost or scrap cost for the WO parent item should be calculated, 
usually from initially attached parts list records, and before manufacturing accounting has been 

executed, using business function B3100560-UpdateComponentCosts.  

• Stocking Type should also be sent to the function.  Stocking Type controls which cost amount and 
unit values should be updated.  If the stocking type is Kit "K" or Configured "C", standard amount 

(IGOPAT) and standard units(IGOPUN) are updated.  For all other stocking types, current amount (IGCCCA) and 

current units (IGCCCU) are updated in F3102.

• The Cost Type sent in controls which cost type to access and update in the F3102 WO Cost Variance 
table.  If Cost Type "A1" is sent in, only Material Cost "A1" is updated.  If Cost Type "A2" is sent in, 

only Scrap Cost "A2" is updated.  If both need to be updated, call the function separately for each 

cost type.  Send in the proper total cost for material or scrap amount.

• Additional data sent in includes:

User Audit Information
Parent item Unit of Measure

Work Order Number (or rate Schedule Number)

Short, second & third item numbers




1.3Special Logic

This business function updates different amounts and units depending on the data passed in:

Update Current Cost for non Kit and non Configured items (not stocking type "K" or "C"):
• 
For cost type A1:  update Material cost values for Current Amount  (IGCCCA) and Current Units 
(IGCCCU)

• For cost type  A2:  update Scrap cost values for Current Amount (IGCCCA) and Current Units 
(IGCCCU)

Update Standard Cost for Kit and Configured items (stocking type "K" or "C")
• 
For cost type A1:  update Material cost values for Standard Amount(IGOPAT) and Standard Units 
(IGOPUN)

• For cost type A2:  update Scrap cost values for Standard Amount (IGOPAT) and Standard Units 
(IGOPUN)


2.Technical Specifications


2.4Processing 


1.Access F3102 using WO Number (IGDOCO = Input DOCO)), Parent/Child Relationship (IGPART = "P"), 
Item Number (IGITM = Input ITM) and Cost Type (IGCOST = Input COST).

2.If Stocking Type (STKT) = 'K' or 'C'

Assign
IGOPAT = Input CCCA/* assign standard amount
IGOPUN = Input UORG/* assign standard units

else
Assign
IGCCCA = Input CCCA/* assign current amount
IGCCCU = Input UORG/* assign current units

end
3.If record was found 

Assign 
DTAI = blanks

IGUOM = Input UM/* Unit of Measure
Update Row F3102
else
Assign
            DTAI        =     '2488' /* No Records matching criteria were found

IGUOM Input UM
IGDOCO=Input DOCO/* Work Order Number

IGITM=Input ITM/* Short Item Number

IGPART=PART='P'/* Parent/Child Relationship

IGCOST=Input COST/* Cost Type

IGLITM=Input LITM/* Second Item

IGAITMInput AITM/* Third Item

IGUSER=Input USER/* User ID

IGJOBM=Input JOBN/* Job Number

IGUPMJ=Input UPMJ/* Date

IGTDAY=Input TDAY/* Time of Day

IGPID=Input PID/* Program ID (calling program)

Insert Row F3102
end



Data Structure

D3100750 - Update Material Or Scrap Amount

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

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

sz2ndItemNumberLITMcharNONENONE

A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to 
alternative item numbers. The three types of item numbers are: Item Number (short) An 8-digit, computer-assigned item number. 2nd Item Number A 
25-digit, user defined, alphanumeric item number. 3rd Item Number  Another 25-digit, user defined, alphanumeric item number. In addition to 
these three basic item numbers, the system provides an extensive cross-reference search capability. You can define numerous 
cross-references to alternative part numbers. For example, you can define substitute item numbers, replacements, bar codes, customer numbers, or 
supplier numbers.

sz3rdItemNumberAITMcharNONENONE

The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item 
numbers are as follows: 1.  Item Number (short) - An 8-digit, computer-assigned 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.  In addition to 
these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT). Numerous cross references to 
alternate part numbers can be user defined, such as substitute item numbers, replacements, bar codes, customer numbers, or supplier 
numbers.

szCostTypeCOSTcharNONENONE

A code that designates each element of cost for an item. Examples of the cost object types are:   o  A1  Purchased raw material   o  B1  
Direct labor routing rollup   o  B2  Setup labor routing rollup   o  C1  Variable burden routing rollup   o  C2  Fixed burden routing rollup   o  Dx  Outside 
operation routing rollup   o  Xx  Extra add-ons, such as electricity and water  The optional add-on computations usually operate with the type 
Xx extra add-ons. This cost structure allows you to use an unlimited number of cost components to calculate alternative cost rollups. The 
system then associates these cost components with one of six user defined summary cost buckets.

mnCurrentAmountCCCAMATH_NUMERICNONENONE

The current amount to produce a given amount of product.

mnUnitsOrderedUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

szUnitOfMeasureUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

szUserIDUSERcharNONENONE

The code that identifies a user profile.

szJobNumberJOBNcharNONENONE

The code that identifies the work station ID that executed a particular job.

jdSystemDateUPMJJDEDATENONENONE

The date that specifies the last update to the file record.

mnTimeOfDayTDAYMATH_NUMERICNONENONE

The computer clock in hours:minutes:seconds.

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.

cSuppressErrorMessageEV01charNONENONE

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

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.

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

Related Functions

None

Related Tables

F3102 Production Cost