Code: Alles auswählen.
IF 1022_go_cont IS NOT BOUND.
CREATE OBJECT 1022_go_cont
EXPORTING
container_name = 'CONT_1022'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2.
IF sy-subrc <> 0.
" do error handling here
ENDIF.
CREATE OBJECT 1022_go_alv
EXPORTING
i_parent = 1022_go_cont
EXCEPTIONS
error_cntl_create = 1.
IF sy-subrc <> 0.
" do error handling here
ENDIF.
1022_go_alv->set_table_for_first_display(
CHANGING
it_outtab = lt_itab
it_fieldcatalog = 1022_gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
).
IF sy-subrc <> 0.
" do error handling here
ENDIF.
ELSE.
1022_go_alv->refresh_table_display( ).
ENDIF.