*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* DATA gt_bsid2 LIKE BSID OCCURS 0. CLASS lcl_event_receiver DEFINITION DEFERRED. DATA: go_grid3 TYPE REF TO CL_GUI_ALV_GRID, go_dialogbox_c TYPE REF TO CL_GUI_DIALOGBOX_CONTAINER, go_event_receiver TYPE REF TO LCL_EVENT_RECEIVER. *----------------------------------------------------------------------* * FORM CREATE_DETAIL_LIST * *----------------------------------------------------------------------* FORM create_popup_list. FIELD-SYMBOLS: <lf_fcat> TYPE LVC_S_FCAT. DATA: ls_layout3 TYPE LVC_S_LAYO, lt_fieldcat TYPE LVC_T_FCAT, ls_variant TYPE DISVARIANT. CREATE OBJECT go_dialogbox_c EXPORTING TOP = 100 LEFT = 150 LIFETIME = CNTL_LIFETIME_DYNPRO CAPTION = 'Dettaglio partita' WIDTH = 1000 HEIGHT = 200. CREATE OBJECT go_grid3 EXPORTING I_PARENT = go_dialogbox_c. SET HANDLER go_event_receiver->handle_close FOR go_dialogbox_c. CALL FUNCTION 'LVC_FIELDCATALOG_MERGE' EXPORTING I_STRUCTURE_NAME = 'BSID' CHANGING CT_FIELDCAT = lt_fieldcat. READ TABLE lt_fieldcat ASSIGNING <lf_fcat> WITH KEY fieldname = 'BELNR'. <lf_fcat>-hotspot = 'X'. ls_variant-report = SY-REPID. ls_variant-username = SY-UNAME. ls_variant-variant = '/DEFAULT'. ls_layout3-no_keyfix = 'X'. ls_layout3-grid_title = 'Dettaglio partita'. CALL METHOD go_grid3->set_table_for_first_display EXPORTING I_STRUCTURE_NAME = 'BSID' IS_VARIANT = ls_variant I_SAVE = 'A' IS_LAYOUT = ls_layout3 CHANGING IT_FIELDCATALOG = lt_fieldcat IT_OUTTAB = gt_bsid2. SET HANDLER go_event_receiver->handle_double_click FOR go_grid3. CALL METHOD cl_gui_control=>set_focus EXPORTING CONTROL = go_grid3. ENDFORM. "create_popup_list
lunedì 12 ottobre 2015
Creare una finestra popup
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento