SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl1 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
lbl1 = 'Material:'.
START-OF-SELECTION.
DATA: lv_header TYPE rpy_dyhead.
DATA: it_containers TYPE dycatt_tab.
DATA: it_fields_to_containers TYPE dyfatc_tab.
DATA: it_flow_logic TYPE swydyflow.
* Lesen eines Dynpros
CALL FUNCTION 'RPY_DYNPRO_READ'
EXPORTING
progname = sy-cprog
dynnr = sy-dynnr
IMPORTING
header = lv_header
TABLES
containers = it_containers
fields_to_containers = it_fields_to_containers
flow_logic = it_flow_logic
EXCEPTIONS
cancelled = 1
not_found = 2
permission_error = 3
OTHERS = 4.
IF sy-subrc = 0.
cl_demo_output=>write_data( lv_header ).
cl_demo_output=>write_data( it_containers ).
cl_demo_output=>write_data( it_fields_to_containers ).
cl_demo_output=>write_data( it_flow_logic ).
* 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 = |Daten des Dynpros { sy-dynnr }|
html_string = lv_html
container = cl_gui_container=>default_screen ).
* cl_gui_container=>default_screen erzwingen
WRITE: space.
ENDIF.