Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with "F4IF_INT_TABLE_VALUE_REQUEST"

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

This is issue with TAB

Try to include this code and & check


DATA:BEGIN OF tab_temp OCCURS 0,
CDOCT LIKE ZDNTINF-CDOCT,
DDTEXT LIKE DD07T-DDTEXT,
END OF tab_temp.

SELECT a~CDOCT b~DDTEXT FROM ZDNTDEPDOC as a
INNER JOIN DD07T as b
on a~CDOCT = b~DOMVALUE_L
INTO TABLE TAB_TEMP
WHERE b~DOMNAME = 'ZCDCT'.

  loop at TAB_TEMP.
    tab = TAB_TEMP-CDOCT. append tab.
    tab = TAB_TEMP-DDTEXT append tab.
  endloop.

1 REPLY 1

former_member194669
Active Contributor
0 Kudos

This is issue with TAB

Try to include this code and & check


DATA:BEGIN OF tab_temp OCCURS 0,
CDOCT LIKE ZDNTINF-CDOCT,
DDTEXT LIKE DD07T-DDTEXT,
END OF tab_temp.

SELECT a~CDOCT b~DDTEXT FROM ZDNTDEPDOC as a
INNER JOIN DD07T as b
on a~CDOCT = b~DOMVALUE_L
INTO TABLE TAB_TEMP
WHERE b~DOMNAME = 'ZCDCT'.

  loop at TAB_TEMP.
    tab = TAB_TEMP-CDOCT. append tab.
    tab = TAB_TEMP-DDTEXT append tab.
  endloop.