Code: Alles auswählen.
CALL METHOD cl_gui_frontend_services=>directory_exist
EXPORTING
directory = lw_pfad
RECEIVING
result = lw_result
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_pfad
i_begin_col = 1
i_begin_row = 1
i_end_col = 11
i_end_row = 100
TABLES
intern = li_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Tabelle nicht gefunden
MESSAGE w009.
ENDIF.
Code: Alles auswählen.
cl_gui_frontend_services=>directory_exist