Skip to Content
0
Former Member
Mar 02, 2009 at 09:10 PM

Issue with "F4IF_INT_TABLE_VALUE_REQUEST"

36 Views

Hello,

I want to display the fixed values and its description from table DD07T during drop-down F4 on a field based on some criteria. I am using following code, but the issue is some of the fixed values come in first column and some come in other column with text. I want one column to display fixed value and other to display Text.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CDOCT-LOW.

DATA:BEGIN OF tab OCCURS 0,

CDOCT LIKE ZDNTINF-CDOCT,

DDTEXT LIKE DD07T-DDTEXT,

END OF tab.

SELECT aCDOCT bDDTEXT FROM ZDNTDEPDOC as a

INNER JOIN DD07T as b

on aCDOCT = bDOMVALUE_L

INTO TABLE TAB

WHERE b~DOMNAME = 'ZCDCT'.

FIELD_TAB-TABNAME = 'DD07T'.

FIELD_TAB-FIELDNAME = 'DOMVALUE_L'.

APPEND FIELD_TAB.

FIELD_TAB-TABNAME = 'DD07T'.

FIELD_TAB-FIELDNAME = 'DDTEXT'.

APPEND FIELD_TAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'DDTEXT'

TABLES

VALUE_TAB = tab

FIELD_TAB = FIELD_TAB

RETURN_TAB = RETURN_TAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE RETURN_TAB INDEX 1 TRANSPORTING FIELDVAL.

S_CDOCT-LOW = RETURN_TAB-FIELDVAL.