12-09-2006 11:31 PM
Hi i need to upload a file, i'm using the function 'GUI_UPLOAD', but i'm using a specific file path i need that my program let the user select the file i.e. like a popup window to select the file and get the file path in some variable or something like that.
12-09-2006 11:48 PM
Hi Sergio,
Please check this sample code.
PARAMETERS P_FILE LIKE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',*.*.'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
Also check this links.
http://www.sapdevelopment.co.uk/file/file_fmfile.htm
http://www.sapdevelopment.co.uk/file/file_uptabpc.htm
Hope this will help.
Regards,
Ferry Lianto
12-09-2006 11:48 PM
Hi Sergio,
Please check this sample code.
PARAMETERS P_FILE LIKE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',*.*.'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
Also check this links.
http://www.sapdevelopment.co.uk/file/file_fmfile.htm
http://www.sapdevelopment.co.uk/file/file_uptabpc.htm
Hope this will help.
Regards,
Ferry Lianto
12-10-2006 12:01 AM