01-06-2009 4:50 AM
Hi All,
I am fetching Program name, and Include from the Table D010INC. but in the resulted output
there are some includes that are begining with the symbol %. I don't want to display them in the final
output.
my select query is as follws.
SELECT master include FROM d010inc INTO TABLE itab_d010inc
WHERE master IN s_mast AND
include IN s_incl and
master NOT LIKE '%___________________' and
include NOT LIKE '%___________________' and
include NOT LIKE '<%>'.
how do add not like % condition in the where clause ?
Thanks in advance'
Kr
01-06-2009 4:57 AM
Hi,
select all the entries from the table and delete the entries from the table which are not required.
Eg: DELETE itab where field CS '%'.
Hope it helps...
Regards,
Pavan
01-06-2009 4:57 AM
Hi,
select all the entries from the table and delete the entries from the table which are not required.
Eg: DELETE itab where field CS '%'.
Hope it helps...
Regards,
Pavan
01-06-2009 5:15 AM
Hi Vishnu,
Thanks for quick replay. Your solution also works fine, but i want to include that condition in the where clause (like other conditions). is it possible to do it ?
01-19-2009 6:37 AM
01-06-2009 5:00 AM
Hi KR,
SELECT master include FROM d010inc INTO TABLE itab_d010inc
WHERE master IN s_mast .
loop at itab_d010inc.
if itab_d010inc-master(1) = '%'.
delete itab_d010inc.
endif.
endloop.
01-06-2009 5:59 AM
Did you try with offset ? Take the first Character and compare whether it is '%' .
01-06-2009 6:49 AM
Hi KR,
Please write the code as i hve given below :
SELECT master include FROM d010inc INTO TABLE itab_d010inc
WHERE master IN s_mast .
IF itab_d010inc[] IS NOT INITIAL.
DELETE itab_d010inc where master CS '%'
OR INCLUDE CS '%'.
ENDIF.
Hope It will solve your problem..
if not then get back to me..there are so many way..you can delete.
Thanks,
Sujeet