1、直接访问表
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.
时间: 2024-11-08 23:00:51