*----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* PARAMETERS: pa_vari TYPE SLIS_VARI. *----------------------------------------------------------------------* * EVENTS * *----------------------------------------------------------------------* AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari. DATA: ls_variant TYPE DISVARIANT, lv_exit. ls_variant-report = SY-REPID. ls_variant-username = SY-UNAME. ls_variant-variant = pa_vari. CALL FUNCTION 'LVC_VARIANT_SAVE_LOAD' EXPORTING I_SAVE_LOAD = 'F' I_TABNAME = '1' IMPORTING E_EXIT = lv_exit CHANGING CS_VARIANT = ls_variant EXCEPTIONS OTHERS = 1. pa_vari = ls_variant-variant. *----------------------------------------------------------------------* * FORM OUTPUT_ALV * *----------------------------------------------------------------------* FORM output_alv. TYPE-POOLS SLIS. DATA: ls_layout TYPE SLIS_LAYOUT_ALV, ls_fieldcat TYPE SLIS_FIELDCAT_ALV, lt_fieldcat TYPE SLIS_T_FIELDCAT_ALV, ls_variant TYPE DISVARIANT. [...] ls_variant-report = SY-REPID. ls_variant-username = SY-UNAME. IF NOT pa_vari IS INITIAL. ls_variant-variant = pa_vari. ENDIF. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = SY-CPROG I_CALLBACK_USER_COMMAND = 'USER_COMMAND' I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE' I_BACKGROUND_ID = 'ALV_BACKGROUND' IS_LAYOUT = ls_layout IT_FIELDCAT = lt_fieldcat I_SAVE = 'A' IS_VARIANT = ls_variant TABLES T_OUTTAB = gt_out. ENDFORM. "output_alv
lunedì 6 aprile 2015
Variante di visualizzazione del layout ALV
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento