Sage X3 how get a list of client running processes

The following Subprog returns into an Integer array the list of all running processes of clients connected to X3 application server.

The Subprog needs this two local variables as parameters:
XPROCID, an Integer array in which are inserted the numbers of running processes
XNUM, an Integer which returns the count of running processes
Continue reading “Sage X3 how get a list of client running processes”

Sage X3 Launch export from program

Run the export

Gosub INIT From GEXPOBJ
Gosub OUVRE From GEXPOBJ
Gosub DEBUT From GEXPOBJ
Gosub OK_SAI From GEXPOBJ
Gosub CONTROLE From GEXPOBJ

[M:EXP2]MODELE = MODELE
[M:EXP2]NOMEXP = 'export.txt'
[M:EXP2]NBFIC = 1 #number of tables setted into the export model
[M:EXP2]FICHIER(0) = Y_FIC #Name of first table
[M:EXP2]ABREV(0) = Y_ABRFIC #shortcut of first table
[M:EXP2]CRITERE(0) = "YFLGIMP<>2" #selection criteria of first table

Gosub EXEC From GEXPOBJ

Gosub TERMINE From GEXPOBJ

 

Sage X3 how to run import from program

Run the import

Here how to execute an import

Local Char PARAM(15)(1..4) , VALEUR(15)

Gosub INIT From GIMPOBJ

Gosub DEBUT From GIMPOBJ
Gosub OK_SAI From GIMPOBJ
Gosub CONTROLE From GIMPOBJ

[M:IMP2]MODIMP = MODELE
[M:IMP2]NOMIMP = FICHIER

Gosub EXEC From GIMPOBJ
Gosub TERMINE From GIMPOBJ

If GERRTRACE = 1 and GERRTRACE = 3 Then
  Errbox "Si รจ verificato un errore in fase di importazione del ricevimento", "Controllare il file traccia " + GTRACE titled "Import Ricevimenti"
Endif

Call LECFIC("TRA",GTRACE,"tra") From LECFIC