*&---------------------------------------------------------------------*
*& 包括 ZESB001
*&---------------------------------------------------------------------*
********************函数字段名获取
DATA: ITI LIKE FUPARAREF OCCURS 0 WITH HEADER LINE.
DATA: ITS LIKE FUPARAREF OCCURS 0 WITH HEADER LINE.
SELECT * INTO TABLE ITI FROM FUPARAREF
WHERE FUNCNAME = FUNC_NAME
AND R3STATE = 'A'
AND PARAMTYPE = 'I'
AND PARAMETER LIKE 'I_%'.
SELECT * INTO TABLE ITS FROM FUPARAREF
WHERE FUNCNAME = FUNC_NAME
AND R3STATE = 'A'
AND PARAMTYPE = 'T'
AND PARAMETER LIKE 'S_%'.
FIELD-SYMBOLS:
<FS> TYPE ANY ,
<FS_LINE> TYPE ANY ,
<FS_TABLE> TYPE STANDARD TABLE.
DATA: NEW_LINE TYPE REF TO DATA.
DATA: QUERY_TABLE LIKE DD02L-TABNAME.
DATA: QUERY_FIELD LIKE DD02L-TABNAME.
SORT ITS.
LOOP AT ITS.
CONCATENATE ITS-PARAMETER '[]' INTO QUERY_TABLE.
ASSIGN (QUERY_TABLE) TO <FS_TABLE>.
CREATE DATA NEW_LINE LIKE LINE OF <FS_TABLE>.
ASSIGN NEW_LINE->* TO <FS_LINE>.
sort <FS_TABLE>.
LOOP AT <FS_TABLE> INTO <FS_LINE>.
ASSIGN COMPONENT 'SIGN' OF STRUCTURE <FS_LINE> TO <FS>.
IF <FS> IS INITIAL.
* DELETE <FS_TABLE> <FS_LINE>.
DELETE TABLE <FS_TABLE> FROM <FS_LINE>.
ENDIF.
ENDLOOP.
ENDLOOP.
* ----------------------------------------------------------------------
* 取表定义
* ----------------------------------------------------------------------
DATA BEGIN OF TABLE_STRUCTURE OCCURS 10.
INCLUDE STRUCTURE DFIES.
DATA END OF TABLE_STRUCTURE.
DATA TABLE_TYPE TYPE DD02V-TABCLASS.
DATA: BEGIN OF WHKS OCCURS 0,
TEXT(200),
END OF WHKS.
SORT ITI.
LOOP AT ITI.
ASSIGN (ITI-PARAMETER) TO <FS>.
CHECK <FS> = 'X'.
CLEAR WHKS[].
CLEAR: QUERY_TABLE,QUERY_FIELD,TABLE_STRUCTURE[].
MOVE ITI-PARAMETER+2(20) TO QUERY_TABLE.
SHIFT QUERY_TABLE LEFT DELETING LEADING SPACE.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = QUERY_TABLE
* FIELDNAME = ' '
LANGU = '1'
* LFIELDNAME = ' '
* ALL_TYPES = ' '
* GROUP_NAMES = ' '
IMPORTING
* X030L_WA =
DDOBJTYPE = TABLE_TYPE
* DFIES_WA =
* LINES_DESCR =
TABLES
DFIES_TAB = TABLE_STRUCTURE
* FIXED_VALUES =
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3
.
CHECK TABLE_STRUCTURE[] IS NOT INITIAL.
READ TABLE TABLE_STRUCTURE WITH KEY DOMNAME = 'MANDT'