cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Select-Options

far_sid2103
Explorer
0 Kudos

Hi

I have a select options which displays some values from where which user can select multiple values.

Now the problem here is when i press enter after selecting some values the value at first index gets replaced by the value at last index. Can you give me a reason why that is happening and what can i do to resolve it.

This is the F4 Help that is displayed:

far_sid2103_0-1714031465891.png

and this is how how the values are in select options: (First index replaced by last)

far_sid2103_1-1714031522432.png

Below is the code for implementing f4 help: 

Implemented in Event - at selection screen on value request

1. Used FM - 'F4_FIELD_ON_VALUE_REQUEST'  to capture selected values in LT_RETURN.

2. Appending values to select-options

LOOP AT lt_return INTO DATA(ls_return).
      s_tabnam-low = ls_return-fieldval.
      s_tabnam-sign = 'I'.
      s_tabnam-option = 'EQ'.
      APPEND s_tabnam.
      CLEAR: ls_return, s_tabnam.
    ENDLOOP.

Regards,

Farhan

 

View Entire Topic
raymond_giuseppi
Active Contributor

You sorted the list by key (the red arrow next to table name)

If you really want this order, then sort RETURN_TAB too, but that shoudn't change anything in the select criteria result in the following SELECT. (what were the values of field RECORDPOS in the RETURN_TAB?)

far_sid2103
Explorer
0 Kudos

Hi Raymond,

The values are getting captured in below order only and appended in select-options in the same order.

far_sid2103_0-1714036064324.png

But i am getting the values (while displaying) in below order, also the 1st value is getting replaced by the last value, which should not happen.

far_sid2103_1-1714036172570.png

Regards,

Farhan

 

raymond_giuseppi
Active Contributor
0 Kudos
What you see is not what you get (try to sort the proposed list by text...)
far_sid2103
Explorer
0 Kudos
Hi Raymond,
far_sid2103
Explorer
0 Kudos

Hi Raymond,

I guess sorting is not causing the problem here still tried what you suggested but it didn't work.

far_sid2103_0-1714465531260.png

This is how i am getting values in select-options, which i think is wrong because i have selected 3 unique values but only 2 unique values remain, its replacing one value with other which should not happen.