There is no transaction in process.
There is no open log file.
This entry point is called in quote, order, delivery and invoice management.
It is called each time a new line is entered, from the standard control action of the product field (C_ITMREF de SUBSOH for instance). It is the 1st control performed on the field.
The substitution product has just been read in the [F :ITS] class.
The screen classes for the object are on line and loaded.
In the CTLSBSITM sub-program, the following variables are available:
· WITMREF (value char) : Reference of the product of origin
· DAT (value date) : Document date (for ctrl with the substitution date)
· RET (value integer) : Feedback variable
0=No substitution product
1=Substitution product but problem when reading the product ([F :ITS]
2=Substitution ok
When the EP is called, the [F :ITS] class is loaded with the substitution product.
RET is loaded. RET=2. The original product will be replaced by the substitution product.
To avoid substitution, RET should be set to 0 or 1.
If it is set to 0, everything is transparent. Nothing happens. The original product is kept.
If it is set to 1, the following error message appears: "Problem on the substitution product". mkstat is set to 2. An error remains on the Product field.
To change the substitution product, RET should be kept to 2 and [F :ITS] should be loaded with the new product.
The open tables are the tables of the object (quote, order, delivery, invoice).
Table | Significant content | Table Title | |
ITMMASTER | No | Products | |
ITMSALES | Yes | Sales product | |
|
|
|
|