取 域的文本

2017-04-13  本文已影响18人  Mmm_余安
例图.png
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.
E_DDTEXT取出输入屏幕对应的值.png
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.
values_tab 取出域中所有的文本.png
上一篇下一篇

猜你喜欢

热点阅读