+1: so that the amount to be absorbed can be absorbed by all the basis
+2: so that the amount to be absorbed is entirely absorbed and only by the linked basis element
+4: so that the absorbed amount grid takes into account what has really been absorbed by the FIFO basis, in order to update the other tables in consistency with what was carried out on the FIFO basis.
By default, LMODSTP=4 if the product valuation method is FIFO or LIFO, otherwise LMODSTP=0
LUPDTAB (Integer)
Tables to update:
+1: STOCOST table (FIFO basis)
+2: STOLOT table (Lots)
+4: STOJOU table (Movements)
+8: ITMMVT table (Product-site totals)
+16: ITMMVTHIS table (Product-site history)
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.
ITMMASTER; ITMFACILIT; STOJOU; TABCOSTMET; TABCOSTMVT; STOCOST; STOLOT; ITMMVT; ITMMVTHIS
Use this entry point to manage the traceability on the tracking instead of the WO.
There is one transaction in progress.
There can be an open log file (GTRACE test).
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