Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions z_debugger_data_view_ext_demo.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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(<flights>).

"dummy line to add your break-point before the end of the program
ASSERT 1 = 1.
9 changes: 8 additions & 1 deletion zcl_op_structure.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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 ).
Expand Down
7 changes: 7 additions & 0 deletions zcl_op_table.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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 ).
Expand Down
3 changes: 3 additions & 0 deletions zcl_op_value_pretty_printer.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
15 changes: 15 additions & 0 deletions zcx_op_dve.clas.abap
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 17 additions & 0 deletions zcx_op_dve.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCX_OP_DVE</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>General exception class for Data View Extension</DESCRIPT>
<CATEGORY>40</CATEGORY>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>
3 changes: 2 additions & 1 deletion zif_op_value_pretty_printer.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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.