PARAMETERS P_WERKS TYPE ZTEST1 .
data : I_DOMNAME LIKE DD07V-DOMNAME ,
I_DOMVALUE LIKE DD07V-DOMVALUE_L,
E_DDTEXT LIKE DD07V-DDTEXT.
I_DOMNAME = 'ZTEST1'.
I_DOMVALUE = P_WERKS.
CALL FUNCTION 'DOMAIN_VALUE_GET'
EXPORTING
I_DOMNAME = I_DOMNAME
I_DOMVALUE = I_DOMVALUE
IMPORTING
E_DDTEXT = E_DDTEXT
EXCEPTIONS
NOT_EXIST = 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.
WRITE:/ E_DDTEXT.
PARAMETERS P_WERKS TYPE ZTEST1 .
data: DOMNAME LIKE DD07L-DOMNAME,
values_tab TYPE STANDARD TABLE OF dd07v.
DOMNAME = 'ZTEST1'.
CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
DOMNAME = DOMNAME
* TEXT = 'X'
* FILL_DD07L_TAB = ' '
TABLES
VALUES_TAB = values_tab
* VALUES_DD07L =
* EXCEPTIONS
* NO_VALUES_FOUND = 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.