Hi,
I created a table control based on an internal table defined in my program. The internal table contains a field named VSTEL. and the corresponding screen element name is WA_VSTEL.
Now when the user presses F4 on this, I am able to display a list of values of my choice, user selects it and that gets associated with the first row's WA_VSTEL.
Now In the second row if I press F4, the value list is displayed, i am able to select the value , but the the selected value does not appear on the WA_VSTEL (2nd row's column !!).
i am sure I need to change my code so that I set the return value from CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
to the corresponding row's WA_VSTEL.
i am not sure how to do that in my code...find below the POV code. any suggestions ??
TYPES: BEGIN OF X_VSTEL,
VSTEL TYPE TVST-VSTEL,
END OF X_VSTEL.
DATA: WA_ITAB TYPE X_VSTEL,
I_TAB LIKE TABLE OF WA_ITAB,
LT_DFIES_CSIT TYPE DFIES OCCURS 0.
CLEAR WA_ITAB.
REFRESH I_TAB.
SELECT DISTINCT VSTEL INTO WA_ITAB FROM TVST.
APPEND WA_ITAB TO I_TAB.
CLEAR WA_ITAB.
ENDSELECT.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'VSTEL'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'WA_VSTEL'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = I_TAB
FIELD_TAB = LT_DFIES_CSIT.