Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ignorning includes which starts with %

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

0 Kudos

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 ?

0 Kudos

Hi,

CS cannot be used in where clause.

Regards,

Pavan

Former Member
0 Kudos

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.

Former Member
0 Kudos

Did you try with offset ? Take the first Character and compare whether it is '%' .

sujeet2918
Active Contributor
0 Kudos

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