1.Functional Description
1.1Purpose
costs for the parent and those costs will be returned in cost buckets #B1-B6. "Total - cost
rollup" costs will be calculated and returned in cost buckets #TB1-#TB6. The costs are calculated by
multiplying the cost in the Cost Component file F30026 by the transaction quantity requested for
the parent.
2.Technical Specifications
2.4Processing
1.0 Loop until no more records matching the key - Read Cost Component records F30026 by kit, mmcu,
blank location, blank lot, and ledg. This will give you a F30026pointer (if the fetch is
unsuccessful, return zeros into the cost buckets as indicated by step 5.0).
Process for each cost component record read
2.0 Get cost bucket information:
2.a. Put the F30026pointer COST just read from the cost components file into KY, '30' into SY,
and 'CB' into RT. Use Get UDC X0005 business function and get description 1 (DL01).
2a1. Test the description just retrieved. If it is Less Than 0 or Greater To 6 stop
processing the cost component record just read, (meaning skip the following steps and return to step 1.0
starting the loop all over again.). You will use the description 1 just retrieved for the following
if statements, therefore, you might want to save the description into a work field. In this document
I will refer to it as $C.
3.0 Process this step according to the value in $C. This step is accumulating the costs x qty fro
each cost bucket.
If COST NE 'B2'
or DS VC01A mode = ' '
If $C = 1
if VC01A = '1'
#B1 = (F30026pointer STDC * $TRQT) + #B1
#TB1= (F30026pointer CSL * $TRQT) + #TB1
if VC01A = ' '
#B1 = (F30026pointer XSMC * $TRQT) + #B1
#TB1 = (F30026pointer XSCR * $TRQT) + #TB1
If $C = 2
if VC01A = '1'
#B2 = (F30026pointer STDC * $TRQT) + #B2
#TB2= (F30026pointer CSL * $TRQT) + #TB2
if VC01A = ' '
#B2 = (F30026pointer XSMC * $TRQT) + #B2
#TB2 = (F30026pointer XSCR * $TRQT) + #TB2
If $C = 3
if VC01A = '1'
#B3 = (F30026pointer STDC * $TRQT) + #B3
#TB3= (F30026pointer CSL * $TRQT) + #TB3
if VC01A = ' '
#B3 = (F30026pointer XSMC * $TRQT) + #B3
#TB3 = (F30026pointer XSCR * $TRQT) + #TB3
If $C = 4
if VC01A = '1'
#B4 = (F30026pointer STDC * $TRQT) + #B4
#TB4= (F30026pointer CSL * $TRQT) + #TB4
if VC01A = ' '
#B4 = (F30026pointer XSMC * $TRQT) + #B4
#TB4 = (F30026pointer XSCR * $TRQT) + #TB4
If $C =5
if VC01A = '1'
#B5 = (F30026pointer STDC * $TRQT) + #B5
#TB5= (F30026pointer CSL * $TRQT) + #TB5
if VC01A = ' '
#B5 = (F30026pointer XSMC * $TRQT) + #B5
#TB5 = (F30026pointer XSCR * $TRQT) + #TB5
Do this, no matter what the value of $C is:
if VC01A = '1'
#B6 = (F30026pointer STDC * $TRQT) + #B6
#TB6= (F30026pointer CSL * $TRQT) + #TB6
if VC01A = ' '
#B6 = (F30026pointer XSMC * $TRQT) + #B6
#TB6 = (F30026pointer XSCR * $TRQT) + #TB6
End
If COST = 'B2'
And DS VC01A mode = '1'
please note $B2MFG and $B2CST are simply work fields used on the AS/400, you may want to use your own
work fields.
if VC01A = '1'
$B2MFG = STDC
$B2CST = CSL - STDC
if VC01A = ''
$B2MFG = XSMC
$B2CST = XSCR - XSMC
If $C = 1
#B1 = ($B2MFG * DS ACQ) + #B1
#TB1 = ($B2MFG * DS ACQ) + #TB1
#TB1 = ($B2CST * $TRQT) + #TB1
If $C = 2
#B2 = ($B2MFG * DS ACQ) + #B2
#TB2 = ($B2MFG * DS ACQ) + #TB2
#TB2 = ($B2CST * $TRQT) + #TB2
If $C = 3
#B3 = ($B2MFG * DS ACQ) + #B3
#TB3 = ($B2MFG * DS ACQ) + #TB3
#TB3 = ($B2CST * $TRQT) + #TB3
If $C = 4
#B4 = ($B2MFG * DS ACQ) + #B4
#TB4 = ($B2MFG * DS ACQ) + #TB4
#TB4 = ($B2CST * $TRQT) + #TB4
If $C = 5
#B5 = ($B2MFG * DS ACQ) + #B5
#TB5 = ($B2MFG * DS ACQ) + #TB5
#TB5 = ($B2CST * $TRQT) + #TB5
Do this, no matter what the value of $C is:
#B6 = ($B2MFG * DS ACQ) + #B6
#TB6 = ($B2MFG * DS ACQ) + #TB6
#TB6 = ($B2CST * $TRQT) + #TB6
End
4.0 Return to 1.0 until all cost component records have been processed.
5.0 When all cost component records have been processed, return the totals in the appropriate return
fields.
(#B1)==>Cost Bucket 1XSMC
(#B2)==>Cost Bucket 2XSMC
(#B3)==>Cost Bucket 3XSMC
(#B4)==>Cost Bucket 4XSMC
(#B5)==>Cost Bucket 5XSMC
(#B6)==>Cost Bucket 6XSMC
(#TB1)==>Total Cost Bucket 1XSMC
(#TB2)==>Total Cost Bucket 2XSMC
(#TB3)==>Total Cost Bucket 3XSMC
(#TB4)==>Total Cost Bucket 4XSMC
(#TB5)==>Total Cost Bucket 5XSMC
(#TB6)==>Total Cost Bucket 6XSMC
Retrievals:
Cost Components File F30026:
Item number shortITM
Cost CenterMMCU
LocationLOCN
Lot numberLOTN
Cost MethodLEDG
Cost TypeCOST
D3000320 - Calculate Cost Bucket Costed Bill
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szCostCenter | MMCU | char | NONE | NONE |
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
| ||||
mnItemNumberShort | KIT | MATH_NUMERIC | NONE | NONE |
The system provides for three separate item numbers.
1. Item Number (short) - An eight-digit, computer assigned, completely
| ||||
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
| ||||
cFrozenSimulatedMode | VC01A | char | NONE | NONE |
This is a generic field used for video constants display. | ||||
mnTransactionQuantity | TRQT | MATH_NUMERIC | NONE | NONE |
A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and
| ||||
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
| ||||
mnCostBucket1 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnCostBucket2 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnCostBucket3 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnCostBucket4 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnCostBucket5 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnCostBucket6 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnTotalCostBucket1 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnTotalCostBucket2 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnTotalCostBucket3 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnTotalCostBucket4 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnTotalCostBucket5 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
mnTotalCostBucket6 | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
cMode | VC01A | char | NONE | NONE |
This is a generic field used for video constants display. | ||||
cBaseFixedCostsOn | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
B4000460 Free Ptr To Data Structure | ||||
X0005 Get User Defined Codes |
F30026 Item Cost Component Add-Ons |