REPORT Z_SEARCH_TABLENAME .
TABLES: DD02L, DD03L, DD02T, DD02V.
*&----------------------------------------------------
*& 屏幕输出
*&-----------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK ioc01 WITH FRAME TITLE text-a01.
SELECT-OPTIONS:
TABNAME FOR DD03L-TABNAME,
S-NAME FOR DD03L-FIELDNAME,
TABCLASS FOR DD02V-TABCLASS DEFAULT 'TRANSP', "表类型
ROLLNAME FOR DD03L-ROLLNAME, "数据元素
DOMNAME FOR DD03L-DOMNAME, "域名
INTLEN FOR DD03L-INTLEN. "字段长度
SELECTION-SCREEN END OF BLOCK ioc01.
SELECTION-SCREEN BEGIN OF BLOCK ioc02 WITH FRAME TITLE text-a02.
PARAMETERS PO AS CHECKBOX DEFAULT 'X'.
PARAMETERS DDTEXT LIKE DD02T-DDTEXT.
SELECTION-SCREEN END OF BLOCK ioc02.
TYPE-POOLS: SLIS.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv, "存放ALV字段描述的表
g_repid LIKE sy-repid.
DATA: fieldcat TYPE slis_fieldcat_alv.
DATA: eventstab TYPE slis_t_event WITH HEADER LINE.
DATA: fieldlayout type slis_layout_alv.
TYPES: BEGIN OF RESULT,
TABNAME LIKE DD03L-TABNAME,
FIELDNAME LIKE DD03L-FIELDNAME,
TABCLASS LIKE DD02V-TABCLASS,
ROLLNAME LIKE DD03L-ROLLNAME,
DOMNAME LIKE DD03L-DOMNAME,
INTLEN LIKE DD03L-INTLEN,
DDTEXT LIKE DD02T-DDTEXT,
END OF RESULT.
DATA: WA TYPE RESULT,
ITAB TYPE RESULT OCCURS 0 WITH HEADER LINE.
DATA PM_TXT LIKE DD02T-DDTEXT.
****************************************************************