STKVALREG processing: STKVALREG
BEFREGITV: Before re-entering the [ITV] record upon price adjustment
This entry point is called just before the [ITV] record is entered upon price adjustment. The record already contains the new values.
Context and operating method
The following tables have been updated:
STOJOU [STJ] ; STOLOT [STL]; STOCOST [STP]; ITMMVTHIS [ITH]
Transaction
There is one transaction in progress.
Log file
There can be an open log file (GTRACE test).
Different call cases
Price adjustment is called upon purchase invoice validation, cost price calculation or subcontract adjustment (the validated subcontract invoice after the cost price calculation is taken into account).
Variables
Variable or mask |
Definition |
||
Mask SAIDECPRI [SDPD] |
|
Contains the breakdown of the amount variance that was to be absorbed |
|
Mask STKREGW [SRW] |
LOT (Char) |
Lots concerned by the adjustment |
The quadruplet is unique |
VCRTYP (Integer) |
Document type that created the receipt |
||
VCRNUM(Char) |
Document no. that created the receipt |
||
VCRLIN (Integer) |
Document line no. that created the receipt |
||
QTYSTU (Decimal) |
Transacted quantity for the given quadruplet |
||
AMTABS (Decimal) |
Amount absorbed by the quadruplet |
||
AMTNABS (Decimal) |
Amount not absorbed by the quadruplet |
||
QTYSTOLOT (Decimal) |
Lot quantity in stock |
In the case of an error requiring that the standard processing stops, set GOK to 0.
Open tables
ITMMASTER; ITMFACILIT; STOJOU; TABCOSTMET; TABCOSTMVT; STOCOST; STOLOT; ITMMVT; ITMMVTHIS
NULAMTADJ : forcing the adjustment
Use this entry point to force the adjustment of movements and of the totals tables, even if the amount to be absorbed is null, in order to modify other specific amounts.
Context and operating method
This entry point is called just after the calculation of the total amount to be absorbed.
Transaction
There is one transaction in progress.
Log file
There can be an open log file (GTRACE test).
Different call cases
Price adjustment is called upon purchase invoice validation, cost price calculation or subcontract adjustment (the validated subcontract invoice after the cost price calculation is taken into account).
Variables
Variable or mask |
Definition |
||
Mask STKREGW [SRW] |
LOT (Char) |
Lots concerned by the adjustment |
The quadruplet is unique |
VCRTYP (Integer) |
Document type that created the receipt |
||
VCRNUM(Char) |
Document no. that created the receipt |
||
VCRLIN (Integer) |
Document line no. that created the receipt |
||
QTYSTU (Decimal) |
Transacted quantity for the given quadruplet |
||
AMTABS (Decimal) |
Amount absorbed by the quadruplet |
||
AMTNABS (Decimal) |
Amount not absorbed by the quadruplet |
||
QTYSTOLOT (Decimal) |
Lot quantity in stock |
||
Mask SAIDECPRI [SDPD] |
AMTTOT (Decimal) |
Total amount to be absorbed |
|
MATCST (Sized decimal) |
Material amount (by statistical group) to be absorbed |
||
MACCST (Sized decimal) |
Machine amount (by statistical group) to be absorbed |
||
LABCST (Sized decimal) |
Labor amount (by statistical group) to be absorbed |
||
SCOTOT (Decimal) |
Subcontract amount (by statistical group) to be absorbed |
||
OVExxxCST (Decimal) |
Overheads amount (by component type) to be absorbed |
||
GPE |
Set to 1 to force the adjustment |
In the case of an error requiring that the standard processing stops, set GOK to 0.
Open tables
ITMMASTER; ITMFACILIT; STOJOU; TABCOSTMET; TABCOSTMVT; STOCOST; STOLOT; ITMMVT; ITMMVTHIS
Depending on the context, the files relating to the receipts or invoices can be open and placed.
BEFADJCPT: Taking over before the movement adjustment calculation
Use this entry point to act on the SRW mask that contains the values used to calculate the adjustments to be carry out.
It will also be possible to prevent the receipt adjustment.
Context and operating method
The entry point is called just before the price adjustment calculation.
Transaction
There is one transaction in progress.
Log file
There can be an open log file (GTRACE test).
Different call cases
Price adjustment is called upon purchase invoice validation, cost price calculation or subcontract adjustment (the validated subcontract invoice after the cost price calculation is taken into account).
Variables
Variable or mask |
Definition |
||
GPE |
Set to 0. Set to 1 to stop the adjustment without triggering an error |
||
Mask STKREGW [SRW] |
LOT (Char) |
Lots concerned by the adjustment |
The quadruplet is unique |
VCRTYP (Integer) |
Document type that created the receipt |
||
VCRNUM(Char) |
Document no. that created the receipt |
||
VCRLIN (Integer) |
Document line no. that created the receipt |
||
QTYSTU (Decimal) |
Transacted quantity for the given quadruplet |
||
AMTABS (Decimal) |
Amount absorbed by the quadruplet |
||
AMTNABS (Decimal) |
Amount not absorbed by the quadruplet |
||
QTYSTOLOT (Decimal) |
Lot quantity in stock |
||
Mask SAIDECPRI [SDPD] |
AMTTOT |
Total amount to be absorbed |
|
MATCST(x), MACCST(x)… |
Detail of the amount to be absorbed |
||
WRND_SOC |
Amount rounding = 10^-(number of decimals) |
In the case of an error requiring that the standard processing stops, set PRET to 1.
Open tables
ITMMASTER; ITMFACILIT; STOJOU; TABCOSTMET; TABCOSTMVT; STOCOST; STOLOT; ITMMVT; ITMMVTHIS
BEFREGUL: Acting on the update method of tables during an adjustment
Use this entry point to carry out a specific update of the tables concerned by the price adjustment or to choose one of the different methods proposed by the standard.
Context and operating method
The entry point is called just before the tables are updated upon price adjustment.
Transaction
There is one transaction in progress.
Log file
There can be an open log file (GTRACE test).
Different call cases
Price adjustment is called upon purchase invoice validation, cost price calculation or subcontract adjustment (the validated subcontract invoice after the cost price calculation is taken into account).
Variables
Variable or mask |
Definition |
||
Mask STKREGW [SRW] |
LOT (Char) |
Lots concerned by the adjustment |
The quadruplet is unique |
VCRTYP (Integer) |
Document type that created the receipt |
||
VCRNUM(Char) |
Document no. that created the receipt |
||
VCRLIN (Integer) |
Document line no. that created the receipt |
||
QTYSTU (Decimal) |
Transacted quantity for the given quadruplet |
||
AMTABS (Decimal) |
Amount absorbed by the quadruplet |
||
AMTNABS (Decimal) |
Amount not absorbed by the quadruplet |
||
QTYSTOLOT (Decimal) |
Lot quantity in stock |
||
LMODSTP (Integer) |
FIFO basis update method: By default, LMODSTP=4 if the product valuation method is FIFO or LIFO, otherwise LMODSTP=0 |
||
LUPDTAB (Integer) |
Tables to update: By default, LUPDTAB=1+2+4+8+16 = 31 |
In the case of an error requiring that the standard processing stops, set GOK to 0.
Open tables
ITMMASTER; ITMFACILIT; STOJOU; TABCOSTMET; TABCOSTMVT; STOCOST; STOLOT; ITMMVT; ITMMVTHIS
ORI_TRK: Entry point to manage the traceability on the tracking instead of the W
Use this entry point to manage the traceability on the tracking instead of the WO.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There can be an open log file (GTRACE test).
Different call cases
Price adjustment is called upon purchase invoice validation, cost price calculation or subcontract adjustment (the validated subcontract invoice after the cost price calculation is taken into account).
This entry point is called in the MAJ_STOTRK_REGFLG label of the STKVALREG processing. The same code must be used in this entry point and the ORI_TRK entry point of STKLIB.
#--- Sequence to be written in the entry point
If find([F:STJ]TRSTYP,5,6,19)
WTYP = [F:STJ]VCRTYP
WNUM = [F:STJ]VCRNUM
WLIN = [F:STJ]VCRLIN
WTYPORI = [F:STJ]VCRTYPORI
WNUMORI = [F:STJ]VCRNUMORI
WLINORI = [F:STJ]VCRLINORI
Endif