TRTCOST processing: TRTCOST
APQTYDES: Modification of the calculated quantity when calculating all BOM level
Use this entry point to adjust the calculated quantity when calculating all BOM levels, or to assign another quantity than the one assigned as standard.
The variable to be entered is GQTY.
Context and operating mode
Transaction
There is no transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located in a recursive subprogram that browse the BOM tree structure.
The specific/custom processing will need to be performed in the same way as for the standard lines. It will retrieve one of the quantities returned by the calculation subprogram called just before:
If GSCAMAJ = 1
If LQTNA <> 0
GQTY = LQTNA
Else
GQTY = LQTN
Endif
Else
If LQTBA <> 0
GQTY = LQTBA
Else
GQTY = LQTB
Endif
Endif
Available variables and masks
Variable or mask |
Definition |
Decimal LQTB |
Gross quantity (taking into account the % of rejects) |
Decimal LQTBA |
Rounded gross quantity |
Decimal LQTN |
Net quantity |
Decimal LQTNA |
Rounded net quantity |
GSCAMAJ |
Value of the SCAMAJ parameter (1=No ; 2=Yes) |
Char ERR_TRA (132) |
Error text for the log file |
The GPE variable is used to modify the standard behavior. When this variable is set to 0 (default value), the components without quantity and not valued in the BOM or with a cost defined as "Entered" are not recorded in the MATCSTW table.
In order to record them, the GPE variable should be set to 1.
When the component does not have a known BOM ([F:ITB]BOMEXIFLG<>2), the recursive call can still be forced by setting GPE to 2.
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
BOM |
YES |
BOM header |
BOMD |
YES |
BOM links |
ITCNAT (v130) |
NO |
Nature-cost detail |
ITCNATW (v 130) [INWW] |
NO |
Natures-cost detail (temporary) |
ITMBOM |
NO |
Product BOM (lowest level code) |
ITMCOST |
NO |
Product cost |
ITMCOSTW [ICWW] |
NO |
Product cost (buffer) |
ITMMASTER |
YES |
Component product |
ITMFACILIT |
NO |
Product-site |
OVERHEAD |
NO |
Overheads |
ROUOPE |
NO |
Routing operation |
ROUTING |
NO |
Routing header |
TABFOR |
NO |
Formulas |
WORKCOST |
NO |
Valuation dimension |
WORKSTATIO |
NO |
Work station |
APECRMAW: Write the product during the calculation of BOM levels
This entry point is used to intercept the calculation of the BOM levels.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located at the end of the sub-program that writes a record in the MATCSTW [MAW] table during the calculation of all the levels of the BOM.
Available variables and masks
Variable or mask |
Definition |
Decimal LQTB |
Gross quantity (taking into account the % of rejects) |
Decimal LQTBA |
Rounded gross quantity |
Decimal LQTN |
Net quantity |
Decimal LQTNA |
Rounded net quantity |
GSCAMAJ |
Value of the SCAMAJ parameter (1=No ; 2=Yes) |
Char ERR_TRA (132) |
Error text for the log file |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
BOM |
YES |
BOM header |
BOMD |
YES |
BOM links |
ITCNAT (v130) |
NON |
Nature-cost detail |
ITCNATW (v 130) [INWW] |
NON |
Natures-cost detail (temporary) |
ITMBOM |
YES |
Product BOM (lowest level code) |
ITMCOST |
NON |
Product cost |
ITMCOSTW [ICWW] |
NON |
Product cost (buffer) |
ITMMASTER |
YES |
Component product |
ITMFACILIT |
YES |
Product-site |
OVERHEAD |
NON |
Overheads |
ROUOPE |
NON |
Routing operation |
ROUTING |
NON |
Routing header |
TABFOR |
NON |
Formulas |
WORKCOST |
NON |
Valuation dimension |
WORKSTATIO |
NON |
Work station |
BEFWRIIWC: Before writing the cost of an operation
This entry point is used to intercept the writing of a record in ITCWST.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the writing (LEXI=0) of a record in ITCWST.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether the [F:IWC] record already exists or not. |
Integer PRET |
If >0, indicates an error |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer I |
Index of the line in the [M:CST] screen of the work center being saved. |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
ITCWST |
YES |
Product-cost: work center |
ROUOPE |
NO |
Routing operation |
ROUTING |
NO |
Routing header |
WORKCOST |
NO |
Valuation dimension |
WORKSTATIO |
NO |
Work station |
BEFREWIWC: Before rewriting the cost of an operation
This entry point is used to intercept the re-writing of a record in ITCWST.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the rewriting (LEXI=1) of a record in ITCWST.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether the [F:IWC] record already exists or not. |
Integer PRET |
If >0, indicates an error |
Integer I |
Index of the line in the [M:CST] screen of the work center being saved. |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
ITCWST |
YES |
Product-cost: work center |
ROUOPE |
NON |
Routing operation |
ROUTING |
NON |
Routing header |
WORKCOST |
NON |
Valuation dimension |
WORKSTATIO |
NON |
Work station |
BEFWRIICC: Before writing the cost of a component
This entry point is used to intercept the writing of a record in ITCMAT.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the writing (LEXI=0) of a record in ITCMAT.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether the [F:ICC] record already exists or not. |
Integer PRET |
If >0, indicates an error |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer I |
Index of the line in the [M:CST] screen of the component being saved. |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
ITCMAT |
YES |
Product-cost: component |
BEFREWICC: Before rewriting the cost of a component
This entry point is used to intercept the rewriting of a record in ITCMAT.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the rewriting (LEXI=1) of a record in ITCMAT.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether the [F:ICC] record already exists or not. |
Integer PRET |
If >0, indicates an error |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer I |
Index of the line in the [M:CST] screen of the component being saved. |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
ITCMAT |
YES |
Product-cost: component |
BEFREWICN: Before writing an overhead nature
This entry point is used to intercept the writing of a record in ITCNAT.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the writing (LEXI=0) of a record in ITCNAT.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether a [F:ICN] record already exists or not. |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer PRET |
If >0, indicates an error |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
ITCNAT |
YES |
Product-cost: overhead nature |
BEFREWICN: Before rewriting an overhead nature
This entry point is used to intercept the rewriting of a record in ITCNAT.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the rewriting (LEXI=1) of a record in ITCNAT.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether a [F:ICN] record already exists or not. |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer PRET |
If >0, indicates an error |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
ITCNAT |
YES |
Product-cost: overhead nature |
BEFREWITC: Before writing the standard cost
This entry point is used to intercept the rewriting of a record in ITMCOST.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the writing (LEXI=0) of a record in ITMCOST.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether the [F:ICC] record already exists or not. |
Integer PRET |
If >0, indicates an error |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer I |
Index of the line in the [M:CST] screen of the component being saved. |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |
BEFWRIITC: Before writing the standard cost
This entry point is used to intercept the writing of a record in ITMCOST.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
There is an open log file (the ERR_TRA variable should be loaded before calling the ECR_TRACE subprogram).
Explanations
The entry point is located just before the rewriting (LEXI=1) of a record in ITMCOST.
Available variables and masks
Cost calculation
Variable or mask |
Definition |
Integer LEXI |
Specifies whether the [F:ICC] record already exists or not. |
Integer PRET |
If >0, indicates an error |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Integer I |
Index of the line in the [M:CST] screen of the component being saved. |
Cost transfer
Variable or mask |
Definition |
Integer LARRONDI |
Number of decimals to round all the values of [F:ITC] (0=no rounding) |
Open tables
In the table below, the significant content flag indicates that the content is matches the context.
Table |
Significant content |
Table title |
ITMCOST |
YES |
Product cost |