*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* DATA: gc_filein(128) TYPE C VALUE '/IFR/SID/IMPORT/NEW_IM12_00_GPSP.TXT'. *----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* PARAMETERS: pa_filei(128) OBLIGATORY LOWER CASE DEFAULT gc_filein. *----------------------------------------------------------------------* * LOAD * *----------------------------------------------------------------------* LOAD-OF-PROGRAM. REPLACE 'SID' IN gc_filein WITH SY-SYSID. *----------------------------------------------------------------------* * EVENTS * *----------------------------------------------------------------------* AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_filei. PERFORM f4_help_for_field_filei. *----------------------------------------------------------------------* * FORM F4_HELP_FOR_FIELD_FILEI * *----------------------------------------------------------------------* FORM f4_help_for_field_filei. DATA: BEGIN OF lt_dirlist OCCURS 0. INCLUDE STRUCTURE EPSFILI. DATA: END OF lt_dirlist. DATA: lv_dirnam LIKE EPSF-EPSDIRNAM, lv_fcount LIKE EPSF-EPSFILSIZ, lv_ecount LIKE EPSF-EPSFILSIZ, lt_return LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE. DATA: BEGIN OF lt_file OCCURS 0, file TYPE CHAR40, END OF lt_file. CONCATENATE '/IFR/' SY-SYSID '/IMPORT/' INTO lv_dirnam. CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING' EXPORTING DIR_NAME = lv_dirnam FILE_MASK = 'NEW_IM12_00_GPSP*' IMPORTING DIR_NAME = lv_dirnam FILE_COUNTER = lv_fcount ERROR_COUNTER = lv_ecount TABLES DIR_LIST = lt_dirlist EXCEPTIONS INVALID_EPS_SUBDIR = 1 SAPGPARAM_FAILED = 2 BUILD_DIRECTORY_FAILED = 3 NO_AUTHORIZATION = 4 READ_DIRECTORY_FAILED = 5 TOO_MANY_READ_ERRORS = 6 EMPTY_DIRECTORY_LIST = 7. CHECK SY-SUBRC = 0 AND NOT lt_dirlist[] IS INITIAL. LOOP AT lt_dirlist. lt_file-file = lt_dirlist-name. APPEND lt_file. ENDLOOP. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING RETFIELD = 'FILE' VALUE_ORG = 'S' TABLES VALUE_TAB = lt_file RETURN_TAB = lt_return EXCEPTIONS PARAMETER_ERROR = 1 NO_VALUES_FOUND = 2. IF SY-SUBRC = 0. READ TABLE lt_return INDEX 1. CONCATENATE lv_dirnam lt_return-fieldval INTO pa_filei. ENDIF. ENDFORM. "f4_help_for_field_filei
giovedì 4 giugno 2015
F4 Help per file sull'Application Server
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento