IMP_ZONE
Description
This action is called in the entry simulation for each field that can be entered in the screens for the OBJect. They intervene after the field actions Avant_zone (before field), Initialization and Avant_saisie(after entry). The [M] class for the field contains the value before the import whilst the [F] class of the field contains the value to be imported. This action is also called on a variable at the bottom of the grid, when this variable is not specified for the screen to be imported in the OBJect dictionary.
Following this action, the field is imported in the [M] class, then the actions Contrôle (control), Après_zone (after field) and Après_modif (after modif) are carried out.
Action called from the generated process linked to each screen W0xxxx.
OBJect import
Single, Combined
This action is not called on an import without OBJect.
Use
Load the class [M] for the current field because this is not done automatically by the supervisor. ( e.g. : field whose name is different in classes [M] and [F], use of the variables GIMP(n))
On the last mandatory field and can be entered in each screen, load the [M] class for the displayed or hidden fields because there is no automatic way to import them.
Avoid the import of the current field by setting the variable OK= 0. The [F] class will not be transferred to class [M] for the field.
Avoid the execution of the action Après-modify for the current field, for which the import has been made, by setting the variable IMPMOD= 0.
Force the execution of the action Après-modif for the current field, because the import of the field in the [M] class is not carried out automatically by the supervisor, by setting the variable IMPMOD= 1.
Several variables that are useful in this action :
[L]TRTMSK : process generated in the screen
[L]IMPFIC : abbreviation for the current table
[L]IMPMSK : name of the current mask
[L]IMPZON : name of the current field in the screen
Example
Case IMPFIC
When "SOH"
Case IMPZON
When "BPCINV"
If G_GIMP5
If evalue("dim([M:"+IMPMSK+"]BPCINV)")>0
Assign ("[M:"+IMPMSK+"]BPCINV") With [F:SOH]BPCINV
IMPMOD=1
Endif
Endif
In the import of the purchase or sales orders, in the action IMPORT, the [F] class for the fields concerned are loaded from the variables GIMP(n). Because these fields are not declared as such in the template, the import in the [M] class for the field cannot take place automatically. Because it is not carried out automatically by the supervisor, the variable IMPMOD must be set to 1 to execute the Après_modif action in addition to all the other actions.
Case IMPFIC
When "SOH"
#--- Header text
If G_ENT & [M:ITC]T_CLE_CLOB(1)<>"" & GREP="C"
[M:SOH0]SOHTEX1=[M:ITC]T_CLE_CLOB(1)
Endif#--- Footer text
If G_PIE & [M:ITC]T_CLE_CLOB(2)<>"" & GREP="C"
[M:SOH0]SOHTEX2=[M:ITC]T_CLE_CLOB(2)
Endif
In the import of the purchase or sales orders, in the action IMPORT, the texts are converted into clob in order to import them, in a dedicated table. Now, in the IMP_ZONE action, it is necessary to assign the clob number for the field in the orders table in order to make the link between the order and its text.