DATA: vl_excel_file_exist,
vl_excel_lines TYPE i.
CALL FUNCTION 'DX_FILE_EXISTENCE_CHECK'
EXPORTING
filename = p_local
pc = 'X'
IMPORTING
file_exists = vl_excel_file_exist
EXCEPTIONS
rfc_error = 1
frontend_error = 2
no_authority = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.