F3102WriteCurrVarianceForComp

F3102 Write Curr Variance For Component

Major Business Rule

Object Name: B3100980

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function will create/update the current cost variances for components in the WO 
Variance table (F3102) for a given work order.


1.2Setup Notes and Prerequisites

None.

1.3Special Logic

None.

2.Technical Specifications

2.4Processing 
The following actions will be performed by the business function:

Wk-TSCL = 0.

If EV01 (input) = ' '

Load the following fields for the Cost Component table:  ITM = Input CPIT, MMCU - Input 

CMCU,LOCN = blanks, LOTN = blanks, LEDG = '07'.

Do until there are no more records,

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

If row found,

Wk-TCSL = Wk-TCSL + IECSL

End If.

End Do.

Else

Load the following fields for the Variance table:DOCO = Input RORN,PART ='P'.

Do until there are no more records,

Read a row from the F3102 table using the above keys.

If row found and IGOPAT <> 0 and IGOPUN <> 0,

Wk-OPAT = IGOPAT/IGOPUN

Wk-TCSL = Wk-TCSL + Wk-OPAT

End If.

End Do.

End If.


If PBIN (input) = 'P',

Wk-LOTN = LOTN (input)

Else

Wk-LOTN = blanks

End If.

Call B4000520, Get Item UoM Conversion Factor, passing the following:  IVI = 'Y', UOM = Input UM, 

UOM1 = Input UOM1, Qty = 0, MCU = CMCU (input), LOTN = Wk-LOTN, OT1Y = Input IBOT1Y, STDP - Input STDP).  

Return the conversion factor (Wk-MN29D9).  Set the conversion factor to one if an error occurs.

Wk-CCCA = UORG (input) x Wk-TCSL

Wk-QNTY = UORG / MN29D9

Load the following fields:  IGDOCO = Input DOCO and IGITM = Input CPIT

Read an F3102 row by the above keys.

If Found

Set IGOPAT, IGOPUN, IGCCCA, IGCCCU to zero.

End If

If RORN (input) <> '        ' and RORN <> 0 and STKT (input) = 'K' or if RORN (input) <> '        ' 

and RORN <> 0 and STKT (input) = 'C',

IGOPAT = IGOPAT + Wk-CCCA

IGOPUN = IGOPUN + Wk-QNTY

Else

IGCCCA = IGCCCA + Wk-CCCA

IGCCCU = IGCCCU + Wk=QNTY

End If.

CCCA (Output) = CCCA (Output) + Wk-CCCA

Wk-SCRP = Component Scrap SCRP (Input) x Wk-CSL

Scrap Percent SCRP (Output) = Scrap Percent SCRP (Output) + Wk-SCRP

Load audit information.

If found,

Update the row

Else

IGUOM = Input UM

IGPART = 'C'

IGDOCO = Input DOCO

IGITM = Input CPIT

IGLITM = Input CPIL

IGAITM = Input CPIA

Write a new row

End If.



If  any errors occur,  the function will return '1' in the Error Code field, and '0' if there are no 

errors.

^

Data Structure

D3100980 - F3102 Write Curr Variance For Component

Parameter NameData ItemData TypeReq/OptI/O/Both
cConfiguredWOFlagEV01charNONENONE

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

mnComponentShortItemCPITMATH_NUMERICNONENONE

The short identifier for the component item number.

szComponent2ndItemCPILcharNONENONE

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.

szComponent3rdItemCPIAcharNONENONE

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

szComponentBranchCMCUcharNONENONE

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)

szF4801RelatedOrderNumberRORNcharNONENONE

A number that identifies a secondary purchase order, sales order, or work order that is associated with the original order. This number is for 
informational purposes only.

cPrimaryBinPBINcharNONENONE

A code that indicates whether this is the primary or secondary location for this item within this stocking location. Valid values are:    P Primary 
storage location    S Secondary storage location  Note:  You can only have one storage area marked as primary within each branch or 
warehouse. In some cases, the system uses the primary storage area as the default.

szLotNumberLOTNcharNONENONE

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

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

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

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.

mnOperationOrderQtyUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

mnComponentScrapPercentSCRPMATH_NUMERICNONENONE

The percentage of unusable component material that is created during the manufacture of a particular parent item.  During DRP/MPS/MRP 
generation, the system increases gross requirements for the component item to compensate for the loss. Note: Shrink is the expected loss of 
parent items (and hence, components) due to the manufacturing process. Shrink and scrap are compounded to figure the total loss in the 
manufacture of a particular item. Accurate shrink and scrap factors can help to produce more accurate planning calculations. Enter percentages 
as whole numbers: 5 percent as 5.0

mnCurrentAmountCCCAMATH_NUMERICNONENONE

The current amount to produce a given amount of product.

mnScrapPercentSCRPMATH_NUMERICNONENONE

The percentage of unusable component material that is created during the manufacture of a particular parent item.  During DRP/MPS/MRP 
generation, the system increases gross requirements for the component item to compensate for the loss. Note: Shrink is the expected loss of 
parent items (and hence, components) due to the manufacturing process. Shrink and scrap are compounded to figure the total loss in the 
manufacture of a particular item. Accurate shrink and scrap factors can help to produce more accurate planning calculations. Enter percentages 
as whole numbers: 5 percent as 5.0

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.

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

szPrimaryUnitOfMeasureUOM1charNONENONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

cPotencyControlOT1YcharNONENONE

A code that indicates whether you control the item by potency.

mnStandardPotencySTDPMATH_NUMERICNONENONE

The percentage of active ingredients normally found in an item.

szF4211RelatedOrderNumberRORNcharNONENONE

A number that identifies a secondary purchase order, sales order, or work order that is associated with the original order. This number is for 
informational purposes only.

mnAcctingCostQtyACQMATH_NUMERICOPTNONE

An amount that the system uses in the Cost Rollup program to determine the allocation of setup costs. The system totals the setup costs 
and divides the sum by this quantity to determine a unit setup cost. The default is 1.

cFixedOrVariableQtyFORQcharOPTNONE

A code that indicates if the quantity per assembly for an item on the bill of material varies according to the quantity of the parent item 
produced or is fixed regardless of the parent quantity. This value also determines if the component quantity is a percent of the parent quantity. Valid 
values are:    F Fixed Quantity    V Variable Quantity (default)    %   Quantities are expressed as a percentage and must total 100%For 
fixed-quantity components, the Work Order and Material Requirements Planning systems do not extend the component's quantity per assembly 
value by the order quantity.

szOrderTypeDCTOcharOPTNONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

Related Functions

B4000520 Get Item UoM Conversion Factor
B9800100 Get Audit Information

Related Tables

F30026 Item Cost Component Add-Ons
F3102 Production Cost