From bae673121b2a4981f4a5a49f7ffdc1db452f2b9c Mon Sep 17 00:00:00 2001 From: Domi Bigl Date: Fri, 25 Oct 2024 20:10:59 +0200 Subject: [PATCH] Fix dump for GUI download (#1276) * fix gui download dump * remove detailed exceptions --- src/not_cloud/zcl_excel_converter.clas.abap | 34 ++++++++++----------- 1 file changed, 16 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..e3c05b3 100644 --- a/src/not_cloud/zcl_excel_converter.clas.abap +++ b/src/not_cloud/zcl_excel_converter.clas.abap @@ -1664,26 +1664,19 @@ 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 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. - ENDIF. @@ -1812,7 +1805,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.