04-22-2008 11:05 AM
how to search a string from the database? starting with some character
04-22-2008 11:11 AM
Hi,
Are you talking about searching in SAP tables? If so, go to SE16. Give the value for the field (Starting with TEXT means you can give TEXT) and execute. This will give you the list of entries which has TEXT*** as value for that field.
If you want to write a program to search for a value use keyword 'CP' (Conatains pattern)
If w_text CP 'TEXT'.
Thanks and Regards,
Lakshmi.
04-22-2008 11:08 AM
Hi,
In Database table , if you want to search some field or any string then go to ctrl+F option and then type what field you want to search.
****Do reward if usefull
Vijay
04-22-2008 11:10 AM
04-22-2008 11:10 AM
Hi
Check out this Link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb33d9358411d1829f0000e829fbfe/frameset.htm
Reward Me Point
By
Pari
04-22-2008 11:11 AM
Hi,
Are you talking about searching in SAP tables? If so, go to SE16. Give the value for the field (Starting with TEXT means you can give TEXT) and execute. This will give you the list of entries which has TEXT*** as value for that field.
If you want to write a program to search for a value use keyword 'CP' (Conatains pattern)
If w_text CP 'TEXT'.
Thanks and Regards,
Lakshmi.
04-22-2008 11:22 AM
If you're trying to do this in a SELECT, you can use the LIKE verb in your WHERE clause.
Here's an Example
SELECT obj_name FROM tadir
INTO prog
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name LIKE 'Z%'.
In this case it will select every row that obj_name starts with Z.
If you wanted to find every row that the field obj_name contains say... 'WIN' you use LIKE '%WIN%'.
Edited by: Paul Chapman on Apr 22, 2008 12:32 PM