diff --git a/z_debugger_data_view_ext_demo.prog.abap b/z_debugger_data_view_ext_demo.prog.abap index bb3d5ad..6654989 100644 --- a/z_debugger_data_view_ext_demo.prog.abap +++ b/z_debugger_data_view_ext_demo.prog.abap @@ -123,3 +123,9 @@ DATA(ls_col2) = nested_struc-col2. "do something with itab DATA(ls_col1) = nested_itab[ 1 ]-col1. + +"field symbol +ASSIGN lt_flights TO FIELD-SYMBOL(). + +"dummy line to add your break-point before the end of the program +ASSERT 1 = 1. diff --git a/zcl_op_structure.clas.abap b/zcl_op_structure.clas.abap index 8a4f384..273e9f4 100644 --- a/zcl_op_structure.clas.abap +++ b/zcl_op_structure.clas.abap @@ -217,8 +217,15 @@ CLASS zcl_op_structure IMPLEMENTATION. TRY. DATA(formated_content) = zcl_op_pretty_printer_factory=>create( )->format( content_4_display ). CATCH cx_class_not_existent INTO DATA(cx_class_not_existent). - "formating went wring, fallback using non formated text + "formating went wrong, fallback using non formated text formated_content = content_4_display. + CATCH zcx_op_dve INTO DATA(zcx_op_dve). + "formating went wrong, fallback using non formated text + DATA(unformated_content) = content_4_display. + cl_demo_output=>set_mode( cl_demo_output=>text_mode ). "set to text mode to be more compatible with minus signs and so on + cl_demo_output=>write_data( unformated_content ). + cl_demo_output=>display( ). + RETURN. ENDTRY. cl_demo_output=>set_mode( cl_demo_output=>text_mode ). "set to text mode to be more compatible with minus signs and so on cl_demo_output=>write_data( formated_content ). diff --git a/zcl_op_table.clas.abap b/zcl_op_table.clas.abap index 62fc232..70ce180 100644 --- a/zcl_op_table.clas.abap +++ b/zcl_op_table.clas.abap @@ -181,6 +181,13 @@ CLASS zcl_op_table IMPLEMENTATION. CATCH cx_class_not_existent INTO DATA(cx_class_not_existent). "formating went wrong, fallback using non formated text formated_content = content_4_display. + CATCH zcx_op_dve INTO DATA(zcx_op_dve). + "formating went wrong, fallback using non formated text + DATA(unformated_content) = content_4_display. + cl_demo_output=>set_mode( cl_demo_output=>text_mode ). "set to text mode to be more compatible with minus signs and so on + cl_demo_output=>write_data( unformated_content ). + cl_demo_output=>display( ). + RETURN. ENDTRY. cl_demo_output=>set_mode( cl_demo_output=>text_mode ). "set to text mode to be more compatible with minus signs and so on cl_demo_output=>write_data( formated_content ). diff --git a/zcl_op_value_pretty_printer.clas.abap b/zcl_op_value_pretty_printer.clas.abap index 29d1727..dcf5ca7 100644 --- a/zcl_op_value_pretty_printer.clas.abap +++ b/zcl_op_value_pretty_printer.clas.abap @@ -557,6 +557,9 @@ CLASS zcl_op_value_pretty_printer IMPLEMENTATION. ENDLOOP. + IF lx_error IS BOUND. + RAISE EXCEPTION TYPE zcx_op_dve EXPORTING previous = lx_error. + ENDIF. ENDMETHOD. diff --git a/zcx_op_dve.clas.abap b/zcx_op_dve.clas.abap new file mode 100644 index 0000000..371ce3a --- /dev/null +++ b/zcx_op_dve.clas.abap @@ -0,0 +1,15 @@ +CLASS zcx_op_dve DEFINITION +INHERITING FROM cx_static_check + PUBLIC + FINAL + CREATE PUBLIC . + + PUBLIC SECTION. + PROTECTED SECTION. + PRIVATE SECTION. +ENDCLASS. + + + +CLASS zcx_op_dve IMPLEMENTATION. +ENDCLASS. diff --git a/zcx_op_dve.clas.xml b/zcx_op_dve.clas.xml new file mode 100644 index 0000000..08624bb --- /dev/null +++ b/zcx_op_dve.clas.xml @@ -0,0 +1,17 @@ + + + + + + ZCX_OP_DVE + E + General exception class for Data View Extension + 40 + 1 + X + X + X + + + + diff --git a/zif_op_value_pretty_printer.intf.abap b/zif_op_value_pretty_printer.intf.abap index 136b9a5..80d6231 100644 --- a/zif_op_value_pretty_printer.intf.abap +++ b/zif_op_value_pretty_printer.intf.abap @@ -10,6 +10,7 @@ INTERFACE zif_op_value_pretty_printer "! @parameter r_formated_content | formated value #() construct containing line breaks, spaces and so on format IMPORTING i_unformated_value_content TYPE string - RETURNING VALUE(r_formated_content) TYPE string. + RETURNING VALUE(r_formated_content) TYPE string + RAISING zcx_op_dve. ENDINTERFACE.