1.Functional Description
1.1Purpose
This function will calculate costs for cost types A1 & A2. The function will be called to calculate
the costs for only one at a time. The bucket that these costs are to be accumulated in will be
returned as well as the cost. Other cost types can be calculated as well as long as they are assigned to
either cost bucket '1' or '2'.
1.2Setup Notes and Prerequisites
The following are parameters that need to be retrieved or values that need to be determined before
calling the function:
The Accounting Cost Quantity for the Parent Item and Branch from F4102.
The mode of processing. '1' for build arrays and '2' to free memory.
Send in Frozen/Simulated mode. '1' for Frozen and '0' for Simulated.
The Cost Bucket for the Cost Type may to be sent in. If it is not, the function will return the
Cost Bucket for the Cost Type sent in.
1.3Special Logic
If this business function is called, ultimately it should be called a final time to clean up the
memory.
2.Technical Specifications
2.4Processing
A.If Mode = '1' (First time to load arrays)
If DS CostBucket is blank
Find Cost Bucket for DS COST and save in DS EV02.
If Cost Type is not A1 or A2, then Cost Bucket should be '1' or '2'
Using the values from the F3003 record, find the F3002 record for the same item, Branch, and
Type of Routing (use for Type of Bill). Use ACQ sent in as the Batch Quantity. If no record
exists, look for a record with a zero Batch Quantity. Return the Batch Quantity used in
DS BQTY and Unit of Measure as Input in DS UOM.
Process as follows for all BOM records with same Item, Branch, Type of Bill, and Batch
Quantity:
1. Process records if IXCOBY is NE 'I' or IXSBNT EQ zeros.
2. If an As of Date is sent in, check to see if the as of date falls between IXEFFF and
IXEFFT.
'3' Get Location, Lot, and Primary Bin from F41021.
4. Initialize costworkfield to zero
5. Get F4105 with IXITM, and IXCMCU. Retrieve IBSTKT. Call X0005 GetUDC to determine
the item's stocking type.
6. Get Net Added cost from F30026 Item Cost Components file, if not found, then use
F4105 Cost Ledger for costs.
IECOST, and DS LEDG to IELEDG
Fetch to F30026 with key previously set
If DS FROZEN = '1' use IESTDC, else use IEXSMC for costworkfield.
If IMCLEV = 1use IXITM
If IMCLEV = 2use IXITM
IXCMCU
If IMCLEV = 3use IXTM
IXCMCU
LILOCN
LILOTN
use
(Component Item) and IXMMCU (Branch) from F4102 (Item Branch File).
6. Call Calculate Component Quantity (B3000580) (result $$QNTY).
7. Accumulate $$QNTY in array (@CC). Also save IXOPSQ in array (@CO).
Determine Component Scrap Quantity
8. If IXSCRP NE zeros and $$QNTY NE zeros
divide IXSCRP by 100 and multiply times $$QNTY.
save result in $$QNTY.
9. If IXFORQ EQ 'V' or EQ ' ' or EQ '%' and IXBQTY NE zeros
multiply $$QNTY times DS TRQT
Accumulate this result in an array (@CS).
At this point three arrays have been loaded:
@CO-Contains the BOM records OPSQ #'s in order that they were read.
@CC-Each BOM record quantity calculated.
@CS-Each BOM record scrap quantity calculated.
B. If DS COST = A1 or A2
1. If the bucket for cost type A1 LE '2'
the total of all of the elements of array @CO will be the cost retruned.
2. If the bucket for cost type A2 LE '2'
the total of all of the elements of array @CS will be the cost returned.
C. If DS COST = A1 or A2
1. If the bucket for cost type A1 GT '2'
Look up in @CO for the first element equal to IROPSQ
While the elements are equal to IROPSQ
Add the same element @CC to a work field QNTY.
Add 1 to array index.
Return cost.
2. If the bucket for cost type A2 GT '2'
Look up in @CO for the first element equal to IROPSQ
While the elements are equal to IROPSQ
Add the same element @CS to a work field QNTY.
Add 1 to array index.
Return cost.
D. If DS COST NE A1 or A2 and Cost Bucket = '1' or '2'
1. Retrieve record from F30026 (Item Cost Component Add-ons) using the following key:
IRKIT = IEITM
IRMMCU = IEMMCU
BLANKS = IELOCN
BLANKS = IELOTN
DS LEDG = IELEDG
DS COST = IECOST
2. If record is found
If EV01 = '1' multiply IESTDC times DS TRQT
If EV01 NE '1' multiply IESTDC times DS TRQT
Return calculated cost and cost bucket.
D3000650 - Calculate First Op Cost Buckets
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
idRoutingMasterPtr | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
mnAccountingCostQty | ACQ | MATH_NUMERIC | NONE | NONE |
An amount that the system uses in the Cost Rollup program to determine the allocation of setup costs. The system totals the setup costs
| ||||
jdAsOfDate | ASDE1 | JDEDATE | NONE | NONE |
The date used for effectivity checking. Enter a specific date to display documents (orders, bills of material, routings, as applicable) that are
| ||||
szCostMethod | LEDG | char | NONE | NONE |
A user defined code (40/CM) that specifies the basis for calculating item costs. Cost methods 01 through 19 are reserved for J.D. Edwards
| ||||
cMode | MODE | char | NONE | NONE |
The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed. | ||||
szCostType | COST | char | NONE | NONE |
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
| ||||
cFrozen | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnRequestedQuantity | TRQT | MATH_NUMERIC | NONE | NONE |
A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and
| ||||
cBucket | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnReturnedCost | B1EV1 | MATH_NUMERIC | NONE | NONE |
Work Amount field for the Manufacturing System. | ||||
mnBOMBatchQuantityUsed | BQTY | MATH_NUMERIC | NONE | NONE |
The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components
| ||||
cSuppressErrorMessage | EV03 | char | NONE | NONE |
A radio button that specifies the level at which trace/track result is to be displayed. Select the Detail to display all transactions except IB, IX,
| ||||
szErrorMessageID | DTAI | char | NONE | NONE |
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
| ||||
szUnitOfMeasure | UOM | char | NONE | NONE |
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box). | ||||
szStandardUOMConversion | TFLA | char | NONE | NONE |
Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:
blank Use the item-specific
| ||||
szPOCostMethod | LEDG | char | NONE | NONE |
A user defined code (40/CM) that specifies the basis for calculating item costs. Cost methods 01 through 19 are reserved for J.D. Edwards
| ||||
szParentPrimaryUOM | UOM | char | NONE | NONE |
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box). | ||||
mnItemNumberOriginal | KIT | MATH_NUMERIC | OPT | NONE |
The system provides for three separate item numbers.
1. Item Number (short) - An eight-digit, computer assigned, completely
| ||||
idFirstOpListPtr | GENLNG | ID | OPT | NONE |
General purpose ID variable. |
B3000580 Calculate Component Quantity | ||||
B4000520 Get Item UoM Conversion Factor |
F3002 Bill of Material Master File | ||||
F30026 Item Cost Component Add-Ons | ||||
F3003 Routing Master File | ||||
F4101 Item Master | ||||
F4102 Item Branch File | ||||
F41021 Item Location File | ||||
F4105 Item Cost File |