From 590af469811c0b7d21bce43e9bb5390f062781a8 Mon Sep 17 00:00:00 2001 From: Domi Bigl Date: Thu, 10 Oct 2024 09:11:43 +0000 Subject: [PATCH] fix gui download dump fixes #1264 --- src/not_cloud/zcl_excel_converter.clas.abap | 46 +++++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/not_cloud/zcl_excel_converter.clas.abap b/src/not_cloud/zcl_excel_converter.clas.abap index 814ca9d..2a5c35c 100644 --- a/src/not_cloud/zcl_excel_converter.clas.abap +++ b/src/not_cloud/zcl_excel_converter.clas.abap @@ -1664,26 +1664,31 @@ CLASS zcl_excel_converter IMPLEMENTATION. cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = l_bytecount filename = l_dir filetype = 'BIN' - CHANGING data_tab = lt_file ). - cl_gui_frontend_services=>execute( - EXPORTING - document = l_dir - EXCEPTIONS - cntl_error = 1 - error_no_gui = 2 - bad_parameter = 3 - file_not_found = 4 - path_not_found = 5 - file_extension_unknown = 6 - error_execute_failed = 7 - synchronous_failed = 8 - not_supported_by_gui = 9 - ). + CHANGING data_tab = lt_file + EXCEPTIONS OTHERS = 1 ). IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno - WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. + WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. + ELSE. + cl_gui_frontend_services=>execute( + EXPORTING + document = l_dir + EXCEPTIONS + cntl_error = 1 + error_no_gui = 2 + bad_parameter = 3 + file_not_found = 4 + path_not_found = 5 + file_extension_unknown = 6 + error_execute_failed = 7 + synchronous_failed = 8 + not_supported_by_gui = 9 + ). + IF sy-subrc <> 0. + MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno + WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. + ENDIF. ENDIF. - ENDIF. @@ -1812,7 +1817,12 @@ CLASS zcl_excel_converter IMPLEMENTATION. cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = l_bytecount filename = l_dir filetype = 'BIN' - CHANGING data_tab = lt_file ). + CHANGING data_tab = lt_file + EXCEPTIONS OTHERS = 1 ). + IF sy-subrc <> 0. + MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno + WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. + ENDIF. ENDIF. ENDMETHOD. ENDCLASS.