Variante 1 (cl_abap_list_layout)
PARAMETERS: p_matnr TYPE matnr.
AT SELECTION-SCREEN OUTPUT.
* Unterdrückt die Applikationszeile auf dem Listdynpro
cl_abap_list_layout=>suppress_toolbar( ).
START-OF-SELECTION.
WRITE: / p_matnr.
Variante 2 (RPY_DYNPRO_READ, RPY_DYNPRO_INSERT)
PARAMETERS: p_matnr TYPE matnr.
AT SELECTION-SCREEN OUTPUT.
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.
* Anzeige der Toolbar prüfen
IF lv_header-no_toolbar = abap_false.
lv_header-no_toolbar = abap_true.
* Einfügen eines Dynpros
CALL FUNCTION 'RPY_DYNPRO_INSERT'
EXPORTING
header = lv_header
suppress_exist_checks = abap_true
TABLES
containers = it_containers
fields_to_containers = it_fields_to_containers
flow_logic = it_flow_logic
EXCEPTIONS
cancelled = 1
already_exists = 2
program_not_exists = 3
not_executed = 4
missing_required_field = 5
illegal_field_value = 6
field_not_allowed = 7
not_generated = 8
illegal_field_position = 9
OTHERS = 10.
ENDIF.
ENDIF.
START-OF-SELECTION.
WRITE: / p_matnr.