Code: Alles auswählen.
CALL METHOD cl_gui_frontend_services=>FILE_EXIST
EXPORTING
file = pfad.
IF sy-subrc = 0.
CALL METHOD cl_gui_frontend_services=>EXECUTE
EXPORTING
document = pfad.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
Schau dir doch mal die Sigantur der Methode an, du musst nicht sy-subrc abfragen!pohlmann-schwarza hat geschrieben:Was mach ich da noch falsch?
Code: Alles auswählen.
CALL METHOD cl_gui_frontend_services=>file_exist
EXPORTING
file =
receiving
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.