ABAP顾问
分类:
2009-01-11 18:28:36
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.