Process STKLIB: Stock components library
BEFWRISTJ: Before entering a stock movement
This entry point is called before the Write instruction for each stock movement.
The STOJOU [STJ] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWSTJ: Before re-entering a stock movement
This entry point is called before the Rewrite instruction for a stock movement.
The STOJOU [STJ] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called when issue prices are adjusted, for example when modifying the value of a receipt or issue movement.
Open tables
The STOJOU [STJ] table for a record that will be rewritten.
BEFWRISTO: Before entering a stock line
This entry point is called before the Write instruction for each new stock line.
The STOCK [STO] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWSTO: Before re-entering a stock line
This entry point is called before the Rewrite instruction for each stock line.
The STOCK [STO] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFWRISTL: Before entering the lot record
This entry point is called before the Write instruction for each stock lot.
The STOLOT [STL] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWSTL: Before re-entering the lot record
This entry point is called before the Rewrite instruction for each stock lot record with the [F:STL] class.
The STOLOT [STL] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFWRISTS: Before entering the serial number
Use this entry point to intervene before the entry of each serial number in the STOSER table during stock issue for products with Issue only serial number management (Before Write [STS]).
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables opened by the stock engine.
BEFREWSTS: Before re-entering the serial number
Use this entry point to intervene before the re-entry of each serial number in the STOSER table for products with serial number management, on receipt and issue (Before Rewrite [STS]).
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables opened by the stock engine.
BEFWRIQLH: Before entering a quality control header
This entry point is called before the Write instruction for each quality control header.
The STOQLYH [QLH] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWQLH: Before re-entering the quality control header
This entry point is called before the Rewrite instruction for each quality control header.
The STOQLYH [QLH] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Open tables
All the tables of the stock engine are open.
BEFWRIQLD: Before entering the quality control detail
This entry point is called before the Write instruction for each quality control detail.
The STOQLYD [QLD] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWQLD: Before re-entering the quality control detail
This entry point is called before the Rewrite instruction for each quality control detail.
The STOQLYD [QLD] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Open tables
All the tables of the stock engine are open.
VERIPTDAT: Stock allocation date control
This entry point is called before the allocation date control of a stock movement.
You can perform a specific control and prevent the standard control from running.
Context and operating mode
Transaction
There is no transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
- LDAT: Date to control
- LFCY: Site
- LPAR: Period status (1 = direct; 2 = deferred; 3 = adjustment; 4 = prohibited)
| Variable on issue | Definition |
|
GPE |
If GPE <> 0 the standard allocation date control action is not carried out. |
STODISTOT: Calculation of product-site available stock
This entry point is called after the calculation of a product-site available stock from the ITMMVT table.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
| Variable or mask | Definition |
|
AITV |
Contains the abbreviation of the ITMMVT table (product-site totals) class by default: [F:ITV]. |
|
LTYPLOC |
Location type considered: all the internal locations + the combinations using the following weights (1 = dock; 2 = customer; 4 = subcontract). Example: 5 = dock & subcontract |
|
LSTA |
Status considered (Local menu no. 2701). If 0, then status A. |
|
LSTUACTDIS |
Contains the available stock calculated by the sub-program. Example: LTYPLOC = 1 , LSTA = 1 and you want to add the stock with status Q. You need to add: LSTUACTDIS += evaluate (AITV + CTLSTO) + evaluate (AITV + PLFCTLSTO) - evaluate (AITV + CTLALL) |
BEFWRIITV: Before entering the product-site totals
This entry point is called before the Write instruction for each new product-site totals line.
The ITMMVT [ITV] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWITV: Before re-entering the product-site totals
This entry point is called before the Rewrite instruction for each product-site totals line.
The ITMMVT [ITV] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFWRIITH: Before entering the product-site total history
This entry point is called before the Write instruction for each new product-site total history line.
The ITMMVTHIS [ITH] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWITH: Before re-entering the product-site total history
This entry point is called before the Rewrite instruction for each product-site total history line.
The ITMMVTHIS [ITH] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
CALPER: Expiry date calculation
Use this entry point to perform the specific calculation of the expiry date.
It is located in the CALPER sub-program of this processing.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
- LCOD: Contains the value of the Expiry management (EXYMGTCOD) heading of the Item (ITMMASTER) table
- LREF: Expiry reference date
- LSHL: Contains the value of the Shelf life (SHL) heading of the Item (ITMMASTER) table
- LPER: Calculated expiry date
BEFWRISTP: Before entering the FIFO stock costs
This entry point is called before the Write instruction for each new FIFO stock cost line.
The STOCOST [STP] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWSTP: Before re-entering the FIFO stock costs
This entry point is called before the Rewrite instruction for each new FIFO stock cost line.
The STOCOST [STP] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
STKLIBSLO: Assigning the first sub-lot number
Use this entry point to assign the first sub-lot number with a value other than 00001 by entering the LSLO alphanumeric variable.
The new alphanumerical value must have a length complying with GLONSLO and must end with at least one numerical character.
Context and operating mode
Transaction
There is no transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
BEFDELSTP: Before deletion of the FIFO stock costs
This entry point is called before the Delete instruction for each FIFO basis element.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
- Creation, modification or deletion of a stock movement that decreases the FIFO basis quantity.
- Value modification with update of the FIFO basis.
Open tables
All the tables of the stock engine are open.
SRU_GLO: No read of the global management rule
Use this entry point to prevent the system from reading the global stock management rule.
This makes the rule definition mandatory at the product category level.
Context and operating mode
Transaction
There is no transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called in the LECSRU sub-program of this processing.
The GPE global variable must be set to 0 to prevent the system from reading the global stock management rule.
BEFWRISMP: Before entering the quality control sampling
This entry point is called before the Write instruction for each quality control sampling line.
The STOQLYSMP [SMP] table buffer is loaded and can be modified.
Context and operating mode
Transaction record
There is one transaction in progress
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called when recording the quality control for a product with sampling management.
Open tables and headings
- ITMFACILIT/ITF
- STQ1 mask
- Index I to read the table of the STQ1 mask
BEFREWSMP: Before re-entering the quality control sampling
This entry point is called before the Rewrite instruction for each re-entry of a quality control sampling.
The STOQLYSMP [SMP] table buffer is loaded and can be modified.
Context and operating mode
Transaction record
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called when recording the quality control for a product with sampling management.
Open tables and headings
- ITMFACILIT/ITF
- STQ1 mask
- Index I to read the table of the STQ1 mask
BEFWRISTA: Before entering allocations
This entry point is called before the Write instruction for each new allocation line.
The STOALL [STA] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWSTA: Before re-entering allocations
This entry point is called before the Rewrite instruction for each allocation line.
The STOALL [STA] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWITW: Before re-entering product-warehouse
This entry point is called before the Rewrite instruction for each product-warehouse line.
The ITMWRH [ITW] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called during the stock count validation stage.
Open tables
| Table | Table title |
| CUNLISDET/CUN | Stock count detail |
| ITMMASTER/ITM | Products |
| ITMFACILIT/ITF | Products-site |
| ITMMVT/ITV | Product totals |
| STOPAR/STE | Stock parameters |
CALREF: Expiry reference calculation
Use this entry point to perform a specific calculation of the expiry reference.
It is located in the CALREF sub-program of this processing.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
- LCOD: Contains the value of the Expiry management (EXYMGTCOD) heading of the Item (ITMMASTER) table
- LREF: Expiry reference date
- LSHL: Contains the value of the Shelf life (SHL) heading of the Item (ITMMASTER) table
- LUOM: Contains the value of the Time unit of shelf life (SHLUOM) heading of the Item (ITMMASTER) table
- LPER: Calculated expiry reference date
CALDLU: Use-by date calculation
Use this entry point to perform a specific calculation of the use-by date.
It is located in the CALDLU sub-program of this processing.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
- LCOD: Contains the value of the Expiry management (EXYMGTCOD) heading of the Item (ITMMASTER) table
- LREF: Expiry reference date
- LEXY: Expiry date
- LDLU: Contains the value of the Use factor (DLU) heading of the Item (ITMMASTER) table
- LPER: Calculated use-by date
CALLTI: Calculation of re-control date
Use this entry point to perform a specific calculation of the re-control date.
It is located in the CALLTI sub-program of this processing.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
- LCOD: Contains the value of the Expiry management (EXYMGTCOD) heading of the Item (ITMMASTER) table
- LREF: Re-control reference date
- LSHL: Contains the value of the Re-control shelf life (SHLLTI) heading of the Item (ITMMASTER) table
- LUOM: Contains the value of the Re-control time unit (SHLLTIUOM) heading of the Item (ITMMASTER) table
- LPER: Calculated re-control date
ORI_TRK: Managing the traceability on the tracking instead of the work order
Use this entry point to manage the traceability on the tracking instead of the work order.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called in the MAJTRK sub-program of this processing.
The sequence to write in the entry point is the following:
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
STODISPO: Calculation of product-site available stock filtered on lot, location
This entry point is called after the calculation of the product-site available stock from the Product-site totals (ITMMVT) table and stock lines.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Variables
| Variable or mask | Definition |
|
AITV |
By default, contains the abbreviation of the Product-site totals (ITMMVT) table class: [F:ITV]. |
|
LFCY |
Site |
|
LITM |
Product |
|
LLOT |
Lot no. Prefix with "*" / All the lots "*" / Blank lot only "" |
|
LLOC |
Location Prefix with "*" / All the locations "" or "*" |
|
LTYPLOC |
Location type considered: All the internal locations + the combinations using the following weights (1 = dock; 2 = customer; 4 = subcontract). Example: 5 = dock & subcontract |
|
LSTA |
Status considered (Local menu no. 2701). If 0, then status A. |
|
LOWN |
Owner (If "", then LFCY) |
|
LWRH |
Warehouse or "" |
|
LSTUACTDIS |
Contains the available stock calculated by the sub-program. |
CUSADDTRT: Launching additional processing
This entry point is called at the end of the accounting interface launching.
Context and operating mode
Transaction
There can be one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
BEFWRISLF: Before writing lot-site
This entry point is called before the Write instruction for the lot-site.
The STOLOTFCY [SLF] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFREWSLF: Before re-writing lot-site
This entry point is called before the Rewrite instruction for the lot-site.
The STOLOTFCY [SLF] table buffer is loaded and can be modified.
Context and operating mode
Transaction
There is one transaction in progress
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is systematically called.
Open tables
All the tables of the stock engine are open.
BEFDELSTO: Before deleting stocks
This entry point is called before the Delete instruction for each stock element.
Context and operating mode
Transaction
There is one transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called every time a record from the STOCK table is deleted.
Open tables
All the tables of the stock engine are open.
CTR_CUNFLG: Product control in stock count
Use this entry point to prevent the system from displaying the Product in stock count blocking message during a stock receipt.
Context and operating method
Transaction
There is no transaction in progress.
Log file
Depending on the movement type, there can be an open log file, as identified during a GTRACE test.
Different call cases
This entry point is called for each new product in stock receipt.
In standard mode, a non‑blocking message is displayed during stock receipt when the product is in stock count.
The message becomes blocking when the GPE variable is initialized by the CTR_CUNFLG entry point of this processing.
Open tables
All the tables of the stock engine are open.
UPD_UNIT: Allowing the update of the [F:TUN] class after the reading
Context and operating method
Transaction
There is no transaction in progress.
Log file
No trace file is open.
Code context
This entry point is located in the CTRQTYPCU function of this script.
You can use it to update the unit class after it is read. For example, you can set the number of decimal places to 0 and force deconditioning.
Available variables and masks
LUNIT: Packing unit
LCOEF: UC/US coefficient
LQTYSTU: US quantity to manage
Open tables
| Table | Significant content | Table title |
| TABUNIT | Yes | Table of units of measure |