DATA: go_container_top TYPE REF TO CL_GUI_CONTAINER, go_container_body TYPE REF TO CL_GUI_CONTAINER, go_docking TYPE REF TO CL_GUI_DOCKING_CONTAINER, go_splitter TYPE REF TO CL_GUI_SPLITTER_CONTAINER. *----------------------------------------------------------------------* * Form SPLIT_SCREEN * *----------------------------------------------------------------------* FORM split_screen. DATA: lo_document TYPE REF TO CL_DD_DOCUMENT, lo_doctable TYPE REF TO CL_DD_TABLE_ELEMENT, lo_column1 TYPE REF TO CL_DD_AREA, lo_column2 TYPE REF TO CL_DD_AREA, lv_testo TYPE sdydo_text_element, lv_cid(4). CLEAR: go_docking, go_splitter, go_container_top, go_container_body. CREATE OBJECT go_docking EXPORTING REPID = SY-REPID DYNNR = '0100' RATIO = '95'. "--max container length * Create a splitter with 2 rows and 1 column CREATE OBJECT go_splitter EXPORTING PARENT = go_docking ROWS = 2 COLUMNS = 1. ** Upper Container go_splitter->get_container( EXPORTING ROW = 1 COLUMN = 1 RECEIVING CONTAINER = go_container_top ). ** Lower Container go_splitter->get_container( EXPORTING ROW = 2 COLUMN = 1 RECEIVING CONTAINER = go_container_body ). ** Upper Container height go_splitter->set_row_height( EXPORTING ID = 1 HEIGHT = 11 ). DESCRIBE TABLE gt_list LINES lv_cid. CONCATENATE text-003 lv_cid INTO lv_testo. CREATE OBJECT lo_document. lo_document->add_table( EXPORTING NO_OF_COLUMNS = 2 CELL_BACKGROUND_TRANSPARENT = 'X' BORDER = '0' WIDTH = '100%' IMPORTING TABLE = lo_doctable ). lo_doctable->add_column( IMPORTING COLUMN = lo_column1 ). lo_column1->add_text( EXPORTING TEXT = lv_testo SAP_STYLE = CL_DD_AREA=>HEADING ). lo_doctable->add_column( IMPORTING COLUMN = lo_column2 ). lo_column2->add_picture( EXPORTING PICTURE_ID = 'COMPANY_LOGO' ALTERNATIVE_TEXT = 'Company Logo' ). lo_document->merge_document( ). lo_document->display_document( EXPORTING PARENT = go_container_top ). ENDFORM. " split_screen
sabato 6 febbraio 2016
Dividere una Dynpro in due parti via codice
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento