Skip to Content
author's profile photo Former Member
Former Member

ignorning includes which starts with %

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2009 at 04: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2009 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2009 at 05:59 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 06, 2009 at 06: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.