SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (20) lbl1 FOR FIELD p_trkorr.
PARAMETERS: p_trkorr LIKE e070-trkorr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
lbl1 = 'Transport-Auftrag:'.
START-OF-SELECTION.
DATA(lv_req) = VALUE trwbo_request_header( trkorr = p_trkorr ).
DATA: it_objects TYPE scit_e071.
DATA: it_keys TYPE tr_keys.
DATA: it_keys_str TYPE e071k_strtyp.
* erstellt Gesamt-Objektliste eines Auftrags und seiner Aufgaben
CALL FUNCTION 'TR_GET_OBJECTS_OF_REQ_AN_TASKS'
EXPORTING
is_request_header = lv_req
iv_condense_objectlist = abap_true
IMPORTING
et_objects = it_objects
et_keys = it_keys
et_keys_str = it_keys_str
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
IF sy-subrc = 0.
cl_demo_output=>write_data( p_trkorr ).
cl_demo_output=>write_data( it_objects ).
cl_demo_output=>write_data( it_keys ).
cl_demo_output=>write_data( it_keys_str ).
* html-code vom demo-output holen
DATA(lv_html) = cl_demo_output=>get( ).
* Daten im Inline-Browser im SAP-Fenster anzeigen
cl_abap_browser=>show_html( EXPORTING
title = 'Objektliste Transportauftrag'
html_string = lv_html
container = cl_gui_container=>default_screen ).
* cl_gui_container=>default_screen erzwingen
WRITE: space.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO DATA(lv_msg).
WRITE: / lv_msg.
ENDIF.