REPORT ZVENKATTEST.
data: file_exists TYPE XFLAG .
parameters:p_file like rlgrap-filename .
at selection-screen on value-request for p_file .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = p_file
.
start-of-selection .
CALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'
EXPORTING
FILENAME = p_file
PC = 'X'
IMPORTING
FILE_EXISTS = FILE_EXISTS
EXCEPTIONS
RFC_ERROR = 1
FRONTEND_ERROR = 2
NO_AUTHORITY = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if FILE_EXISTS = 'X'.
write:/ 'FILE EXISTS' .
else .
write:/ 'FILE doesnt EXISTS' .
endif.
Here you can find examples and sample programs related to ABAP Report Programs, ALV Grid/List Programs, BDC, HR ABAP, Function Modules, BAPIs, BADIs, Smartforms, SapScripts, etc.
Google Search - Blog...........
Showing posts with label unction module abap DX_FILE_EXISTENCE_CHECK. Show all posts
Showing posts with label unction module abap DX_FILE_EXISTENCE_CHECK. Show all posts
Subscribe to:
Posts (Atom)