on 2024 Nov 05 3:54 PM
Hi all,
I have an issue converting a SELECT-OPTION variable to upper case.
If my input is done in upper case (e.g. *JHON*), this works(i.e., returns data):
DATA w_name TYPE lfa1-name1.
SELECTION-SCREEN BEGIN OF BLOCK block-1 WITH FRAME.
SELECT-OPTIONS s_name FOR w_name NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK block-1.
TRANSLATE s_name-low TO UPPER CASE.
SELECT * FROM lfa1 WHERE name1 IN @s_name INTO TABLE @DATA(itab).
Now, as soon as I try to enter the data in lower case (e.g. *jhon*), the Select does not return any data, although doing a debug shows the value for s_name in upper case (after the TRANSLATE).
I know that there are a lot of workarounds that I could use, but I’ m curious why the difference, even though the variable's value seems to be the same.
TIA,
Luis
Request clarification before answering.
It's happening because your reference to translating S_NAME-LOW is in the header row, and not an update to the internal table that stores the data used in the query.
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remarks
For recent versions you can use upper SQL function (WHERE UPPER(NAME1) IN <RANGE>)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
15 | |
10 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.