sCORpio написал(а):
Хочется вывести это окошко модально, чтобы не плодить экраны. Можно ли это как то сделать?
Code:
*-------------------------------*
METHOD show_details.
DATA grid_title TYPE lvc_title.
CONCATENATE 'Заводы для' p_bukrs INTO grid_title
SEPARATED BY space.
* create dialogbox to show detail list (if not already existent)
IF dialogbox IS INITIAL.
gs_layout2-grid_title = grid_title.
* reserve two lines for the print_end_of_page event
gs_print-reservelns = 2.
* create dialogbox container as dynpro-instance
* when the user switches to another screen, it is
* destroyed by lifetime mangagement of cfw
CREATE OBJECT dialogbox
EXPORTING
top = 50
left = 150
lifetime = cntl_lifetime_dynpro
caption = gs_layout2-grid_title
width = 800
height = 200.
CREATE OBJECT grid2
EXPORTING i_parent = dialogbox.
* register abap oo event 'close'. it is not necessary to register this
* event at the frontend (this is done during creation).
SET HANDLER e_handler->handle_close FOR dialogbox.
CALL METHOD grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'T001K'
is_print = gs_print2
is_layout = gs_layout2
CHANGING
it_outtab = it_t001k.
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = grid2.
ELSE.
CALL METHOD:
dialogbox->set_caption EXPORTING caption = grid_title,
dialogbox->set_visible EXPORTING visible = 'x',
grid2->set_gridtitle EXPORTING i_gridtitle = grid_title,
grid2->refresh_table_display.
ENDIF.
ENDMETHOD. "show_details