report z_barry_table_field.
type-pools slis.
data: it_fields type standard table of dd03p ,
gs_layout type slis_layout_alv .
parameters p_table type ddobjname obligatory.
call function 'DDIF_TABL_GET'
exporting
name = p_table
langu = sy-langu
tables
dd03p_tab = it_fields
exceptions
illegal_input = 1
others = 2.
*DELETE it_fields WHERE fieldname+0(1) = '.'.
gs_layout-zebra = 'X'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-no_keyfix = 'X'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_structure_name = 'DD03P'
is_layout = gs_layout
tables
t_outtab = it_fields
exceptions
program_error = 1
others = 2.
评论