abap语言中可以通过函数DDIF_FIELDINFO_GET读取数据库表字段的描述。 简单的代码如下: REPORT ztest_get_field_desc. DATA:git_dfies TYPE STANDARD TABLE OF dfies WITH HEADER LINE. CALL FUNCTION 'DDIF_FIELDINFO_GET' EXPORTING tabname = 'EKKO' fieldname = 'EBELN' langu = sy-langu * LFIELDNAME ...
CALL FUNCTION 'DDIF_FIELDINFO_GET' destination desti EXPORTING tABNAME = p_tabname FIELDNAME = p_fieldname ALL_TYPES = 'x' IMPORTING DFIES_WA = l_dfies_wa tables DFIES_TAB = p_dfies EXCEPTIONS NOT_FOUND = 1 INTERNAL_ERROR = 2 OTHERS = 3. case sy-subrc. when 0. when 1. messa...