ALV特定用户

*&---------------------------------------------------------------------*
*& ZMM_INCLUDE_Jack parameter and structure
*&---------------------------------------------------------------------*
type-pools: slis.
data:g_variant like disvariant.
data:g_layout type slis_layout_alv.
data:it_alv type slis_t_fieldcat_alv with header line.

*&---------------------------------------------------------------------*
*& incluede FORM display_ALV *
*&---------------------------------------------------------------------*
form display_alv tables it_data using title.

perform build_fieldcat.
g_layout-colwidth_optimize = 'X'.
**‘X’ = standard save
* 'U’ = only user-specific saving
* ‘A’ = standard and user-specific saving

call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
it_fieldcat = it_alv[]
is_variant = g_variant
i_save = 'X' "特定用户
i_default = 'X'
is_layout = g_layout
i_grid_title = title
tables
t_outtab = it_data
exceptions
program_error = 1
others = 2.

endform. "display_ALV


*&--------------------------------------------------------------------*
*& Form alv_append
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->FIELDNAME text
* -->SELTEXT_1 text
*---------------------------------------------------------------------*
form alv_append using fieldname seltext_1.
clear it_alv.
it_alv-fieldname = fieldname.
it_alv-seltext_l = seltext_1.
append it_alv.
endform. "alv_append

你可能感兴趣的:(用户)