10-05-2009 1:19 PM
Hi all,
I have below data in my data base.
SULPH1
SULPH2
Sulph3
I am querying the descritpion table with like operatior. if I query with SUL, I am getting 2 records, If I query with Sul I am getting only one record. it is possible to get all the 3 reocrds in one search like SUL or Sul?
Thanks in Advacne.
Vr reddi.
10-05-2009 1:24 PM
Hi,
Check if the checkbox "Lowercase" is checked in the domain level of the field. If its checked then you will have to select the whole table, convert to upper or lower case and process accordingly. On which table are you trying to perform this? custom or standard table?
10-05-2009 1:28 PM
Hi,
I am querying a custom table. the check box for Lower case is checked for the filed .
Regards,
Vr Reddi.
10-05-2009 1:32 PM
10-05-2009 1:33 PM
Since its a custom table, check if the field 'lowercase' can be unchecked. If thats allowed then you wont have any problem with the select since SAP will convert all the data into uppercase internally.
If thats not possible you have no other option other than selecting the whole table and processing accordingly
10-05-2009 1:40 PM
10-05-2009 2:03 PM
Hi vrreddi,
independent of the lower case indicator programs are still able to store lower case data-
In this case, use
SELECT <whatever or *>
INTO <target structure>
FROM <DD TABLE NAME>
WHERE ...
CONVERT <target structure-your field> TO UPPERCASE.
CHECK <target structure-your field> IN S_SELECT.
APPEND <target structure> to <internal table>.
ENDSELECT.
Regards,
Clemens
10-05-2009 2:20 PM
Use native SQL like in this example:
data: wwlifnr like lfa1-lifnr.
exec sql performing display.
SELECT lifnr into :wwlifnr
FROM LFA1
WHERE UPPER(NAME1) like '%SUL%'
endexec.
form display.
write: / 'supplier:', wwlifnr.
endform.