读取域固定值的方法有两种: 1、读取数据库视图DD07V 2、通过函数DD_DOMVALUES_GET
1、读取数据库视图DD07V
DATA:gt_dd07v TYPE TABLE OF dd07v.
SELECT *
FROM dd07v
INTO TABLE gt_dd07v
WHERE domname
= 'Z_OPR_TYPE'(域名称)
AND ddlanguage
= 'E'.
2、通过函数DD_DOMVALUES_GET
DATA: gt_ddo7v TYPE TABLE OF dd07v,
l_subrc TYPE sy-subrc.
CALL FUNCTION
'DD_DOMVALUES_GET'
EXPORTING
domname
= 'Z_OPR_TYPE' "域名称
text = 'X'
langu = 'E' "语言代码
bypass_buffer
= 'X'
IMPORTING
rc
= l_subrc
TABLES
dd07v_tab
= gt_ddo7v
EXCEPTIONS
wrong_textflag
= 1
OTHERS
= 2.