编码部分:
##################################################################$ACTION
Case ACTION
When “OUVRE” : Gosub $OUVRE
When “LIENS” : Gosub $LIENS
When “CREATION” : Gosub $CREATION
When “MODIF” : Gosub $MODIF
When “DEFLIG” : Gosub $DEFLIG
When “FILTRE” : Gosub $FILTRE
When “INICRE” : Gosub $INICRE
When “INICRE_LIG” : Gosub $INICRE_LIG
When “ANNULE” : Gosub $ANNULE
When “VERIF_CRE” : Gosub $VERIF_CRE
When Default
Endcase
Return
##################################################################
### The tables declared in Object management are open to make the declarations of the resources required and for the initializations############
$OUVRE
If !clalev([F:YXD]) : Local File YVXNUMD[F:YXD] : Endif ##Details table
If !clalev([F:YVH]) : Local File YVKNUMH[F:YVH] : Endif##Header table
Gosub DECLARE From TABLEAUX ##Declare tables to TABLEAUX
Return
#################################################################
##### It is used in creating transaction, just before writing the instruction########
$INICRE
[F:YXD]YXNUM=[M:YVX0]YXNUM
Return
###############################################################
###Increment of line number#########################
$INICRE_LIG
[F:YXD]YXNUM=[M:YVX0]YXNUM
Return
################################################################## ##The line that defines the filter that is used to only read the detail lines attached to the current header ########
$DEFLIG
Default Mask [YVX1] ####Details Screen
Default File [YXD] ####Details Table abbre
CRIT = ‘YXNUM=”‘+[M:YVX0]YXNUM+'”‘ ####Parameters
FICLIG = “YVXNUMD” ####Details Table
ABLIG = “YXD” ####Details Table abbre
ZONLIG = “YXNUMLIN” ####Line no
Return
##################################################################
####### This is used to filter the elements in the principal and last read lists #########
$FILTRE
Default File[YXD]
Return
####################################################################This is used while reading a record or reading each record and loading of the data
$LIENS
Gosub LIENS From TABLEAUX
Return
######################################################################Creating and saving the data#####
$CREATION
Gosub CREATION From TABLEAUX
Return
####################################################################################### Modifying the data after creation#########
$MODIF
Gosub MODIF From TABLEAUX
Return
#################################################################################Deleting the single record or multiple records#####
$ANNULE
Gosub ANNULE From TABLEAUX
Return
##################################################################### It is written for the sequence number generation in the header field####
$VERIF_CRE
Local Char ZNUMBER
Local Integer STAT
Call NUMERO(“YIX”,””,date$,””,ZNUMBER,STAT) From SUBANM
[M:YVX0]YXNUM=ZNUMBER
Affzo[M:YVX0]
Return
###########################################################################