* https://wiki.scn.sap.com/wiki/display/ABAP/Create+your+own+New+Editor+for+BOR+objects
DATA(it_source_code_in) = VALUE stringtab( ).
DATA(it_source_code_out) = VALUE stringtab( ).
* Quelltext des Reports in Stringtab einlesen
READ REPORT sy-repid INTO it_source_code_in.
* Pretty Print für Code durchführen
CALL FUNCTION 'PRETTY_PRINTER'
EXPORTING
inctoo = space
TABLES
ntext = it_source_code_out
otext = it_source_code_in
EXCEPTIONS
enqueue_table_full = 1
include_enqueued = 2
include_readerror = 3
include_writeerror = 4
OTHERS = 5.
IF sy-subrc = 0.
* ABAP-Editor im cl_gui_container=>default_screen anzeigen
DATA(o_editor) = NEW cl_gui_abapedit( parent = cl_gui_container=>default_screen ).
* ReadOnly setzen
o_editor->set_readonly_mode( 1 ).
* Quelltext setzen
o_editor->set_text( it_source_code_out ).
* cl_gui_container=>default_screen erzwingen
WRITE space.
ENDIF.