SAGE X3 V9 ASKUI IT DOESN'T EXIST

SOLVED

Hello,

First of all I have to say that I am a beginner on SAGE X3 environment, so it is possible I ask very easy question......sorry for that

I have to read the content of an ascii delimiter file to generate accountancy entries on X3 V9

To do this, first of all I have to allow user to select the file so that it is uploaded on X3 server folders (TMP - Import - ...)  so that after it can be read from X3 environment

Here is where I appear my problems because 3GL instructions Askui - Callui - Getui, are not supported on PU9

I would be very glad if someone could send me a link, where I can see how do this, that's,

  • Show a dialog box so that user can select file
  • Upoload this file to X3 server folder
  • Read content of that file
  • Any other suggestion you consider

Kind regard

Jose Luis Palau

  • 0
    I would be interested by the similar askui function with PU9.
    It is very complicated to explain, after a migration, we can not anymore open a file from X3.
  • 0 in reply to GERALDES Adrien
    SUGGESTED
    Hi,
    Here you are how e do it

    1st) Procedure which allow to upload the file from customer to server X3
    Subprog PEDIRFICHERO (FICSRV,OK,FICCLI)
    Variable Char FICSRV(),FICCLI()
    Variable Integer OK
    Local Integer STAT

    FICCLI=""
    FICSRV= filpath("tmp",num$(timestamp$),"") # Nombre del fichero de destino en el servidor
    Call SET_NAMCLI(FICCLI) From ORDSYS
    Call COPSRV(FICCLI,FICSRV,STAT) From ORDSYS # Funcion que abre la selección del fichero en el puesto de cliente
    If STAT
    Call ERREUR(mess(12,139,1)) From GESECRAN : # Copie non réalisée
    OK=0
    Else
    OK=1
    Endif
    End

    2nd) Code to call before, open and read it
    Subprog LEER_FIC
    # Pedir fichero
    Local Integer OK
    Local Char FICSRV(255),FICCLI(255)
    Raz FICSRV,FICCLI,[M:ZSF]NOMFICSRV
    Call PEDIRFICHERO (FICSRV,OK,FICCLI) From ZCOMUN
    If not OK
    end
    Endif

    # Abrir fichero del servidor
    Openi FICSRV Using [XFO]
    Iomode adxifs ";" Using [XFO]
    Iomode adxirs chr$(13)+chr$(10) Using [XFO]
    Iomode adxium 50 Using [XFO] # 50 = ASCII 0 = UTF8


    # Leerlo
    Local Char DAT(200)(4)
    Repeat
    Rdseq DAT(0),DAT(1),DAT(2),DAT(3) Using [XFO]
    Until fstat <> 0

    # Cerrar fichero
    Openi Using [XFO]

    I hope it helps you

    Regards
    Jose Luis Palau
  • +1 in reply to Jose Luis Palau
    verified answer

    Thank you José.

    We find our problem. It was just a problem of acces right.

    Indeed, whe add the repertory in the file : runtime\cfgconfigRuntime.json

    + create the X3 storage area