2007 Jul 03 8:00 AM
Hi Experts
I am having three records in data base like
TESTPP001
TESTSS002
TESTPP003
If I will give PP in my input then I required output
TESTPP001
TESTPP003
If I will give 0 in my input then I required output
TESTPP001
TESTSS002
TESTPP003
Please send the solution with code
Urgent ..
Hi Experts
I am having three records in data base like
TESTPP001
TESTSS002
TESTPP003
If I will give PP in my input then I required output
TESTPP001
TESTPP003
If I will give 0 in my input then I required output
TESTPP001
TESTSS002
TESTPP003
Please send the solution with code
Urgent ..
2007 Jul 03 8:03 AM
Hi
Have your WHERE condition of SELECT stmnt as
1. <b>WHERE field like '%PP%'</b>
2. <b>WHERE field like '%0%'.</b>
Regards
Raj
2007 Jul 03 8:05 AM
u can use CS (contains string ) to compare in where clause.
select <fields>
from table
where field1 cs input.
Reward points if helpful
2007 Jul 03 8:12 AM
2007 Jul 03 8:24 AM
Hi,
use this code and check :
tables : ekko.
TYPES: BEGIN OF ts_test,
ernam type ekko-ernam,
END OF ts_test.
DATA: it_test TYPE TABLE OF ts_test.
DATA: ls_test TYPE ts_test.
SELECT ernam
FROM ekko
INTO corresponding fields of table it_test
WHERE ernam like '%SUD%'.
loop at it_test into ls_test.
write 😕 ls_test-ernam.
endloop.
Reward, if helpful,
Sandeep Kaushik
2007 Jul 03 8:08 AM
Hi,
You can search with the Select statment using the % symbols,
WHERE FIELD like '%0%'. " This wil search the recird for 0 with in the valueRegards
Sudheer
2007 Jul 03 8:10 AM
Hi Gupta,
Mention like
This is for TESTPP001
TESTPP003
SELECT F1 F2 F3 FROM ZXXXX INTO ITAB
WHERE F1 LIKE '%PP%'.
This is for TESTPP001
TESTSS002
TESTPP003
SELECT F1 F2 F3 FROM ZXXXX INTO ITAB
WHERE F1 LIKE '%0%'.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar.