F3102WriteCurrVarianceForParent

F3102 Write Curr Variance For Parent

Major Business Rule

Object Name: B3100370

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function will create/update the current cost variances for parents 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:

Load ITM, MMCU, LOCN (=blanks), LOTN (=blanks), and LEDG (=;07') into the keys for reading the Cost 

Component table (F30026).

Do until there are no more records:

Read an F30026 row using the above keys.

If a row is found,

Obtain the first character of IECOST by performing a substring operation (EV01).

If EV01 <> 'A'

If IECOST = 'B1 '

IGCCCU = CTS1

IGCCCA = CTS4

End If.

If IECOST = 'B2 '

IGCCCU = CTS2

IGCCCA = CTS5

End If.

If IECOST = 'B3 '

IGCCCU = CTS3

IGCCCA = CTS6

End If.

If IECOST = 'B4 '

IGCCCU = CTS1

IGCCCA = WCEF

End If.

If IECOST = 'C1 ' and VOHM <> 0

IGCCCU = CTS3

IGCCCA = VOHM

End If.

If IECOST = 'C2 '

IGCCCU = CTS3

IGCCCA = FOHM

End If.

If IECOST = 'C3 ' and VOHL <> 0

IGCCCU = CTSV

IGCCCA = VOHL

End If.

If IECOST = 'C4 ' and FOHL <> 0

IGCCCU = CTSF

IGCCCA = FOHL

End If.

If EV01 <> 'B' and <> 'C'

IGCCCA = TRQT

IGCCCU = TRQT x IESTDC

IGCCCU = IGCCCU / MN29D9

End If.

IGUOM = Input UOM

Load Audit Information

Load input DOCO, ITM, and COST(=IECOST)into keys for reading the Cost 

Variance table.

Read a row from the F3102 using the above keys.

If found,

Update the row

Else

IGPART = 'P'

IGDOCO = Input DOCO

IGITM = Input ITM

IGLITM = Input LITM

IGAITM = Input AITM

IGCOST = IECOST

Write a new row.

End If.

End If.

End If.

End Do.



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

errors.


^

Data Structure

D3100370 - F3102 Write Curr Variance For Parent

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

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.

szWorkCenterMMCUcharNONENONE

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.

mnDirectHoursCTS1MATH_NUMERICNONENONE

The number of unaccounted direct labor hours associated with a specific operation for a work order.

mnSetupHoursCTS2MATH_NUMERICNONENONE

The number of unaccounted setup labor hours associated with a specific operation for a work order.

mnMachineHoursCTS3MATH_NUMERICNONENONE

The number of unaccounted machine hours associated with a specific operation for a work order.

mnDirectAmountCTS4MATH_NUMERICNONENONE

The amount of unaccounted direct labor associated with a specific operation for a work order.

mnSetupAmountCTS5MATH_NUMERICNONENONE

The amount of unaccounted setup labor associated with a specific operation for a work order.

mnMachineAmountCTS6MATH_NUMERICNONENONE

The amount of unaccounted machine dollars associated with a specific operation for a work order.

mnWorkCenterEffciencyMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnMachineVariableOHMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnMachineFixedOHMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnOverheadVariableHoursMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnLaborVariableOverheadMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnOverheadFixedHoursMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnLaborFixedOverheadMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

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

mnWOConversionFactorMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

szUnitOfMeasureUOMcharNONENONE

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

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

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.

Related Functions

B9800100 Get Audit Information

Related Tables

F30026 Item Cost Component Add-Ons
F3102 Production Cost