1.Functional Description
1.1Purpose
To calculate the "optional add on computations" for a cost type. This business function will return
the factors and rates used, along with the new calculated amount - simulated manufactured cost.
1.2Setup Notes and Prerequisites
The setup notes and prerequisites contains information that needs to be provided to the application
developer to successfully use attach the business function. Important prerequisite Business Functions
that need to be run and any additional relevant information (what event points, limitations, data
structure peculiarities) should be detailed.
Use bullet points
1.3Special Logic
This section should be used when additional logic is used in the Business Function for application
specific functionality or exceptional situations.
2.Technical Specifications
2.4Processing
If function called in mode '2'
destroy linked list FC and linked list RC.
end function processing
Process Factor Code and Factor first.
1.0 Get DS XSF - Factor value:
the BF in DS XSF- Factor and you skip processing 2.0.
1.b. if DS XSFC - Factor Code is not blank, process 2.0.
2.0 Determine where to get DS XSF - factor, based on what is in DS XSFC - factor code:
*B2). If this is the case, you must separate the '*' or '&' from the rest of the field. (i.e.
*B2 becomes '*' and 'B2') and you will process either 2.b or 2.c, if this is not the case you can
skip to 2.e. The portion that does not have the '&' or '*' becomes the COST to use for the
fetch in 2.b, or 2.c but leave DS XSFC as it was.
2/1.b if mode is a '1' do the following:
If first character of DS XSFC is a '*' or '&'
look up the COST in the linked list CT passed in
(linked list CT structure contains COST)
if the COST is found in the linked list
(linked list AM structure contains COST, XSMC, XSCR)
(linked list AR strucutre contains COST, XSMC, XSCR)
if the first character of DS XSFC is '*
get XSMC amount from linked list AM for COST
move XSMC amount from linked list AM into DS XSF - Factor
else
get XSCR amount from linked list AR for COST
move XSCR amount from linked list AR into DS XSF - Factor
end
end
2/1.c if mode is a '1'
if first character of DS XSFC is not a '*' and not a '#'
look up DS XSFC in linked list FC
(linked list FC structure contains DS XSFC, DS XSF)
if DS XSFC is found in the linked list, set DS XSF - factor
to XSF from the list.
end
Fetch factor from Generic Rate table F00191, with '30'
SY, 'CF' RT, and DS XSFC
Set DS XSF- Factor to the RATE column from F00191
table
Set a work flag to indicate that a fetch was made to
this table
If the fetch failed the DS XSF - factor is set to
zeros
end
end
If mode not equal '1'
Fetch factor from Cost Components table F30026, with DS ITM, DS MMCU, blanks in LOCN, blanks in
LOTN, COST, DS LEDG. After the record is fetched, set DS XSF - Factor = the "net added" XSMC
column of the record just fetched.
2/2.c If first character of DS XSFC is a '#':
Fetch factor from Cost Components table F30026, with DS ITM, DS MMCU, blanks in LOCN, blanks in
LOTN, COST, DS LEDG. After the record is fetched, set DS XSF - Factor = the "total" XSCR
column of the record just fetched.
2/2.e If first character of DS XSFC is not a '*' or '#', or if forced through 2/2.d:
Fetch factor from Generic Rate table F00191, with '30' SY, 'CF' RT, and DS XSFC. Set DS XSF-
Factor to the RATE column from F00191 table. Set a work flag to indicate that a fetch was made
to this table. If the fetch failed the DS XSF - factor is left to what was passed in and error
will be processed in returns section.
end processing mode not equal to '1'
1.0 Get DS XSR - Rate value:
in DS XSR- Rate and you skip processing 2.0.
1.b. if DS XSRC - Rate Code is not blank, process 2.0.
2.0 Determine where to get DS XSR - rate, based on what is in DS XSRC - rate code:
*B2). If this is the case, you must separate the '*' or '#' from the rest of the field. (i.e. *B2
becomes '*' and 'B2'). and you will process either 2.b or 2.c, if this is not the case you can
skip to 2.e. The portion that does not have the '#' or '*' becomes the COST to use for the fetch
in 2.b, or 2.c but leave DS XSRC as it was.
2/1.b if mode is a '1' do the following:
If first character of DS XSRC is a '*' or '#'
look up the COST in the linked list CT passed in
(linked list CT structure contains COST)
if the COST if found in the linked list
(linked list AM structure contains COST, XSMC, XSCR)
(linked list AR strucutre contains COST, XSMC, XSCR)
if the first character of DS XSRC is '*
get XSMC amount from linked list AM for COST
move XSMC amount from linked list AM into DS XSR - Rate
else
get XSCR amount from linked list AR for COST
move SXCR amount from linked list AR into DS XSR - Rate
end
end
2/1.c if mode is a '1'
if first character of DS XSRC is not a '*' and not a '#'
look up DS XSRC in linked list RC
(linked list FC structure contains DS XSRC, DS XSR)
if DS XSRC is found in the linked list, set DS XSR- rate
to XSR from the list.
end
Fetch rate from Generic Rate table F00191, with '30'
SY, 'CR' RT, and DS XSRC
Set DS XSR- Rate to the RATE column from F00191 table
Set a work flag to indicate that a fetch was made to
this table
If the fetch failed the DS XSR - rate is set to zeros
end
end
If mode not equal '1'
Fetch factor from Cost Components table F30026, with DS ITM, DS MMCU, blanks in LOCN, blanks in
LOTN, COST, DS LEDG. After the record is fetched, set DS XSR - rate = the "net added" XSMC
column of the record just fetched.
2/2.c If first character of DS XSRC is a '#':
Fetch factor from Cost Components table F30026, with DS ITM, DS MMCU, blanks in LOCN, blanks in
LOTN, COST, DS LEDG. After the record is fetched, set DS XSR - rate = the "total" XSCR column
of the record just fetched.
Fetch rate from Generic Rate table F00191, with '30' SY, 'CR' RT, and DS XSRC. Set DS XSR -
Rate to the RATE from F00191 table. Set a work flag to indicate that a fetch was made to this
table. If the fetch failed the DS XSR - rate is left to what was passed in and error will be
processed in returns section.
end mode processing not equal '1'
if mode equal '1' then do not do the following extra check and always process 3.0
Process 3.0 only if all fetches have been successful. If any unsuccessful fetches, then set
appropriate errors as specified in the returns section.
3.0 Calculate: Amount - Simulated Manufactured Cost:
If DS XSF - Factor NE zeros
OR DS XSR - Rate NE zeros
Retrievals:
Generic Rate Types F00191:
System CodeSY
User Defined CodeRT
Factor or Rate CodeKY
Cost Components File F30026:
Item number shortITM
Cost CenterMMCU
LocationLOCN
Lot numberLOTN
Cost MethodLEDG
Cost TypeCOST
Returns:
1.) Return the DS XSFC - factor code. If the fetch to F00191 table failed,
SetGBRError '1043' and error on factor code field.
2.) Return the DS XSF - factor used.
3.) Return the DS XSRC - rate code. If the fetch to F00191 table failed, SetGBRError '1043'
and error on rate code field.
4.) Return the DS XSR - rate used.
5.) Return Amount - simulated Manufactured cost.
D3000390 - Calculate Optional Add on Computations
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 | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
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
| ||||
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
| ||||
mnFactorSim | XSF | MATH_NUMERIC | NONE | NONE |
A generic factor used to calculate data for standard cost component extras. | ||||
szRateCodeSim | XSRC | char | NONE | NONE |
A user defined code (system 30, type CR) used to retrieve rate information from the Generic Rate table (F00191). This value is used in
| ||||
mnRateSim | XSR | MATH_NUMERIC | NONE | NONE |
A generic rate used to calculate extra costs, such as electricity and taxes. | ||||
mnAmountSimManufactured | XSMC | MATH_NUMERIC | NONE | NONE |
Used to calculate cost during the simulation process. | ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorCode | 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
| ||||
szFactorCodeSim | XSFC | char | NONE | NONE |
A user defined code (system 30, type CF) used to retrieve factor information from the Generic Rate table (F00191). This value is used in
| ||||
szWorkCenter | MCU | char | OPT | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
mnJobnumber | JOBS | MATH_NUMERIC | OPT | NONE |
The job number (work station ID) which executed the particular job. |
B9800088 Retrieve and Format User Defined Codes | ||||
B9800500 F0019 Get Generic Rates Type |
F00191 Generic Message/Rates | ||||
F30026 Item Cost Component Add-Ons |