3 weeks ago
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:
and this is how how the values are in select options: (First index replaced by last)
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
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?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raymond,
I guess sorting is not causing the problem here still tried what you suggested but it didn't work.
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.
Post your code for calling F4_FIELD_ON_VALUE_REQUEST
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's the code for F4 Help
DATA: lt_return TYPE TABLE OF ddshretval,
ls_range LIKE s_tabnam,
lt_dynp TYPE TABLE OF dynpread.
CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
EXPORTING
tabname = 'Table Name'
fieldname = 'TABNAME'
searchhelp = 'Search Help Name'
dynprofield = 'S_TABNAM'
multiple_choice = 'X'
TABLES
return_tab = lt_return
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
IF sy-subrc = 0 AND lt_return IS NOT INITIAL.
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.
ENDIF.
I suppose this code is part of a AT SELECTION-SCREEN ON VALUE-REQUEST on the SELECT-OPTIONS
User | Count |
---|---|
76 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.