*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* DATA: BEGIN OF gt_out OCCURS 0, xref3 LIKE BSID-XREF3, budat LIKE BSID-BUDAT, wrbtr LIKE BSID-WRBTR, waers LIKE BSID-WAERS, dmbtr LIKE BSID-DMBTR, hwaer LIKE T001-WAERS, mwskz LIKE BSID-MWSKZ, text1 LIKE T007S-TEXT1, imp LIKE BSID-WRBTR, iva LIKE BSID-WRBTR, buttn TYPE CHAR4, END OF gt_out. *----------------------------------------------------------------------* * FORM OUTPUT_ALV * *----------------------------------------------------------------------* FORM output_alv. TYPE-POOLS SLIS. DATA: ls_fieldcat TYPE SLIS_FIELDCAT_ALV, lt_fieldcat TYPE SLIS_T_FIELDCAT_ALV, ls_layout TYPE SLIS_LAYOUT_ALV, ls_glay TYPE LVC_S_GLAY. CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING I_PROGRAM_NAME = SY-CPROG I_INTERNAL_TABNAME = 'GT_OUT' I_INCLNAME = SY-CPROG CHANGING CT_FIELDCAT = lt_fieldcat. ls_fieldcat-col_pos = 11. ls_fieldcat-fieldname = 'BUTTN'. ls_fieldcat-reptext_ddic = 'Proroga'. ls_fieldcat-checkbox = 'X'. ls_fieldcat-edit = 'X'. APPEND ls_fieldcat TO lt_fieldcat. ls_layout-colwidth_optimize = 'X'. ls_layout-zebra = 'X'. ls_glay-edt_cll_cb = 'X'. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = SY-CPROG I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET' I_CALLBACK_USER_COMMAND = 'USER_COMMAND' I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE' I_BACKGROUND_ID = 'ALV_BACKGROUND' I_GRID_SETTINGS = ls_glay IS_LAYOUT = ls_layout IT_FIELDCAT = lt_fieldcat I_SAVE = 'A' TABLES T_OUTTAB = gt_out. ENDFORM. "output_alv
giovedì 5 marzo 2015
Passare l'input utente alla tabella ALV
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento