UpdateCurrentComponentCosts

Update Current Component Costs

Minor Business Rule

Object Name: B3100560

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description
This business function will Create/Update Current Component Costs in F3102 Variance Master file.
It will also accumulate the Material and Scrap Costs in order to obtain Parent Material Costs.


1.1Purpose

This is to be used to Create/Update the Current Costs for the Components in the WO Variance file.

1.2Setup Notes and Prerequisites

The Input Data for the business function is obtained from the Parts List Record (F3111). The 
Operation Quantity and the Scrap Quantity are obtained from the Copy Parts List From BOM (B3100550).


1.3Special Logic


2.Technical Specifications

2.4Processing
The following actions have to be performed by the Business Function.
1. Calculate the Total Standard Component rate from the Cost Component Table (F30026).

Wk TCSL = 0.
Load th following fields for the Cost Component Table

ITM = Input CPITMMCU = Input CMCULOCN = Blanks

LOTN = Blanks LEDG   ='07' 

Do Until End of file

Read a row from the F30026 table using the above partial keys

If row found

Wk TCSL = Wk TCSL + IECSL

Endif

End

2. Convert the Operation Quantity from Primary to Input UM for loading units to the Variance table

Get Item Master (F4101) using Input CPIT as the key.
Get Line Type using Input LNTY from F40205.

If LFIVI = 'Y'/'D'

Wk UM = IMUOM1

Else

Wk UM = Input UM.

Endif

Wk CNVF = 1.0.

If Input UM <> Wk UM

Get Item Balance (F4102) using Input CPIT and Input CMCU as the keys.

Get Item Location (F41021) using Input CPIT, CMCU, LOCN, LOTN.

Wk LOTN = Blanks.

If LIPBIN <> 'P'

Wk LOTN = LILOTN

Endif

Get Conversion Factor Using Business Function (B4100520) From Wk UM to Input UM.

If No Errors

Wk CNVF = Output from B4100520.

Endif

Endif. 

Wk CCCU = Wk CNVF * Input SOQS


3. Calculate the Component Cost and Scrap Costs

Wk CCCA = Wk TCSL * Input SOQS
Wk SCCCA = Wk TCSL * Input SOCN

4. Create or Update the Variance record for the Component 

Read the Variance table(F3102) using  Input DOCO and CPIT as the key.
If the row is found

IGCCCU =  IGCCCU + Wk CCCU

IGCCCA = IGCCCA + Wk CCCA.

IGUOM = Input UM

Update F3102

Else

IGCCCU = Wk CCCU

IGCCCA = Wk CCCA

IGUOM = Input UM

IGPART = 'C'

IGDOCO = Input DOCO

IGITM  = Input ITM

IGLITM = Input LITM

IGAITM = Input AITM

Load Audit information

IGPID = Input PID

Write F3102 row.

Endif

5. Accumulate the Total Costs in Order to determine Parent Material Costs and Output it. 

Output Cost CCCA = Output Cost CCCA + Wk CCCA.
Output Scrap CCCA = Output Scrap CCCA + Wk SCCCA. 



^

Data Structure

D3100560 - Update Current Component Costs

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

mnShortItemNumberCPITMATH_NUMERICNONENONE

The short identifier for the component item number.

szLongItemNumberCPILcharNONENONE

The system provides three separate item numbers. They are:    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. The system has an extensive cross-reference search capability (see XRT). You 
can define numerous cross references to alternate part numbers to accomodate substitute item numbers, replacements, bar codes, customer 
numbers, or supplier numbers.

szAlphaItemNumberCPIAcharNONENONE

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 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. 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 (e.g. substitute item numbers, replacements, bar codes, 
customer numbers, or supplier numbers).

szBranchCMCUcharNONENONE

A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several 
subordinate departments or jobs. For example, assume that the component branch is named MMCU. The structure of MMCU might be as follows:    
Branch/Plant - (MMCU)       Dept A - (MCU)       Dept B - (MCU)       Job 123 - (MCU)

szCompLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szCompLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

mnOperationQtyInPrimarySOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnScrapQtyInPrimarySOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

szCompUnitOfMeasureUMcharNONENONE

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.

szLineTypeLNTYcharNONENONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

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.

mnCurrentCostsCCCAMATH_NUMERICNONENONE

The current amount to produce a given amount of product.

mnCurrentScrapCostsCCCAMATH_NUMERICNONENONE

The current amount to produce a given amount of product.

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.

Related Functions

B4000460 Free Ptr To Data Structure
B4000520 Get Item UoM Conversion Factor
B9800100 Get Audit Information
X4101 Validate and Retrieve Item Master
XF41021 Update F41021 Locations

Related Tables

F30026 Item Cost Component Add-Ons
F3102 Production Cost
F40205 Line Type Control Constants File
F4101 Item Master
F4102 Item Branch File
F41021 Item Location File