DEFTRANS
Description
This action is used in the OBJects with variants (OBJect for which several windows have been created). It is called at the start of the analysis of the OBJect windows, if at least one window is active on this OBJect.
OBJect type
Simple, Grid, Combined
Transaction
No
Use
It is used to set a global variable, which will be used in the VARIANTE action to filter the authorised windows.
It is also used to stop the process by setting OK=0 and potentially to display a message in GMESSAGE.
Example : SUBSOHA sales orders
Preparation of a filter for the entry transactions. In fact, if the user goes to sales entry by tunnel, the action DEFTRANS in the order header holds the category. As a result, it will only be proposed in entry transactions associated with this category : process to be developed in the action VARIANTE.
$DEFTRANS
# If not coming from the order management
If GFONC1 <> "GESSOH" Raz GFLAG Endif
# By default the user has access to all the transactions
GORDCAT= 4
# If tunnel, the filter is by order category
If TUNNEL = 1 & !GIMPORT
Read [SOH]SOH0=CLE1
If !fstat GORDCAT = [F:SOH]SOHCAT Endif
Endif
Return
Associated actions
DEFTRANS |
|