代码如下:
PERFORM FRM_GET_DOMVALUE_TEXT USING 'ZMMD_ZFLZQ' <GFS_DATA>-ZFLZQ CHANGING <GFS_DATA>-ZZQTEXT .
IF <GFS_DATA>-ZXYLX IS NOT INITIAL .
PERFORM FRM_GET_DOMVALUE_TEXT USING 'ZMMD_ZXYLX' <GFS_DATA>-ZXYLX CHANGING <GFS_DATA>-ZLXTEXT .
ENDIF.
*&---------------------------------------------------------------------*
*& Form FRM_GET_DOMVALUE_TEXT
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM FRM_GET_DOMVALUE_TEXT USING P_DOMNAME
P_VALUE
CHANGING P_DOM_TEXT .
DATA: LV_DOMNAME TYPE DD07L-DOMNAME,
LV_VALUE TYPE DD07L-DOMVALUE_L.
DATA: LS_DD07V TYPE DD07V,
LV_RC LIKE SY-SUBRC.
LV_DOMNAME = P_DOMNAME.
LV_VALUE = P_VALUE.
CALL FUNCTION 'DD_DOMVALUE_TEXT_GET'
EXPORTING
DOMNAME = LV_DOMNAME
VALUE = LV_VALUE
* LANGU = ' '
* BYPASS_BUFFER = ' '
IMPORTING
DD07V_WA = LS_DD07V
RC = LV_RC.
IF LV_RC = 0 .
P_DOM_TEXT = LS_DD07V-DDTEXT .
ENDIF.
ENDFORM.