‎2008 May 23 9:38 AM
Hi all,
Can anybody tell any logic or function module to find the records when user enter in selection screem (for ex)
Ram 0r
ram or
RAM or
any such combination. It will consider all the input same and fetch the records.
Best Regards,
Aastha
‎2008 May 23 9:40 AM
Hi,
No conditions Required as it will be stored in the form of Capital letters in the Database.
‎2008 May 23 9:41 AM
Hi Aastha Gupta,
Generally when we enter any value in selection screen field and press enter it automatically coverts the alphabets in to CAPITALS.
If we declare the parameters as lower case then we need to use some logic.
as data base stores the data in upper case, we need to convert the data to upper case using TRANSLATE keyword and then we need to fetch data from database.
Best regards,
raam
‎2008 May 23 9:43 AM
Hi,
parameters: p_name(20) type c lower case.
Example:
tables pa0001.
parameters: p_name type pa0001-ename lower case.
select-options: s_name for pa0001-ename lower case.
Edited by: Velangini Showry Maria Kumar Bandanadham on May 23, 2008 10:47 AM
‎2008 May 23 9:46 AM
Hi,
As such by default SAP uses upper case to store in the database and converts all the inputs on the screen to upper case. However It depends on how the domain has been defined for the field . If the Lowercase checkbox is checked in the Output characteristics of the domain , then the data can be stored in sentence case ex, RAM, Ram or ram. Then it will not find a entry if you have entered 'RAM' in the data base but try to find and entry with 'ram'.
regards,
Advait.
‎2008 Jun 03 11:22 AM
If the lower case check box is checked in domain (Example TEXT132 domain) then how do we fetch entries by ignoring case.
KNA1-knurl is one such example. This field is on the selection screen.
I want to fetch URL entries irrespective of case.
example: www.sdn.sap.com or WWW.SDN.SAP.COM should both be treated the same.
‎2008 May 23 9:47 AM
Hi Astha,
If the field is not case sensitive, you can directly use that inside select query.
If the filed is case sensitive , do use that in the select query.
After fetching the data, compare it with the input as
IF ITAB-NAME CS P_NAME
‎2008 May 23 9:53 AM
Use TRANSLATE statement to convert to Upper case or lower
case before the database select.
TRANSLATE string5 TO UPPER CASE
or
TRANSLATE string5 TO LOWER CASE.