访问Domain中Value Range的方法
1 、直接访问表
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
dd07l 和 dd07T
select * from dd07l
where domname = 'domname' and
as4local = active.
2、使用 SAP 的标准函数
call function 'DD_DOMVALUES_GET'
exporting
domname = p_domname
importing
rc = l_subrc
tables
dd07v_tab = l_dd07v
exceptions
wrong_textflag = 1
others = 2.
3、使用 SAP 的标准函数
PERFORM get_domain TABLES it_beskz USING 'BESKZ'.
CALL FUNCTION 'DDIF_DOMA_GET'
EXPORTING
name = p_value
state = 'A'
langu = sy-langu
TABLES
dd07v_tab = lt_dd07v
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR p_desc.
READ TABLE it_beskz WITH KEY domvalue_l = p_beskz.
IF sy-subrc = 0.
p_desc = it_beskz-ddtext.
ENDIF.