FIle path in Screen Programming
Hi I am new to screen programming.
My program would pick a file from desktop and process it.
I am a bit confused how would I give the file path. Should it be a input/output field??
I want something like,
PARAMETERS: filename TYPE text255 OBLIGATORY.
Check below code will be useful.
PARAMETERS : p_flnm LIKE rlgrap-filename. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FLNM. perform F4_HELP. FORM F4_HELP. IF SY-UCOMM <> 'onli'. CALL FUNCTION 'WS_FILENAME_GET' EXPORTING DEF_FILENAME = P_FLNM DEF_PATH = 'c:\my documents' MASK = ',*.*,*.*.' MODE = 'O' TITLE = 'Open PC File for Upload' IMPORTING FILENAME = P_FLNM EXCEPTIONS INV_WINSYS = 01 NO_BATCH = 02 SELECTION_CANCEL = 03 SELECTION_ERROR = 04. IF SY-SUBRC <> 0. MESSAGE E000(0) WITH 'error locating upload file on PC' P_FLNM. ENDIF. ENDIF. ENDFORM. "F4_HELP