1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
REPORT zwrite_container NO STANDARD PAGE HEADING. DATA: go_container TYPE REF TO cl_gui_custom_container, gt_data TYPE spfli_tab, go_alv TYPE REF TO cl_salv_table. LOAD-OF-PROGRAM. START-OF-SELECTION. SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE gt_data. WRITE: / 'Тест вывода в GUI контейнер во WRITE отчёте'. SKIP 20. CREATE OBJECT go_container EXPORTING container_name = '' repid = 'SAPMSSY0' dynnr = '0120'. go_container->set_top( 10 ). go_container->set_left( 10 ). go_container->set_width( 980 ). go_container->set_height( 120 ). TRY. cl_salv_table=>factory( EXPORTING r_container = go_container IMPORTING r_salv_table = go_alv CHANGING t_table = gt_data ). CATCH cx_salv_msg . MESSAGE 'Ошибка при создании ALV' TYPE 'E'. ENDTRY. go_alv->display( ). WRITE 'Вывод после ALV'. |