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

Help in the ABAP query

hi folks,

Need help in this query.

I am working on this query..

select knumv kschl kbetr kwert kinak

from konv

into table cdata for all entries in bodyitab1

where konv~knumv = bodyitab1-knumv

and ( konvkbetr > 0 or konvkwert > 0 )

The query works fine and I fetch only the records where I have 'KBETR' AND 'KWERT' have values greater than 0.

But I have a condition type 'ZBET' and for one of the records the net balance is zero i.e

kbetr and kwert both have value 0. so it does not pick that record.

But I have to pick it up .

So how can I modify this query so that this condition is not applicable for the condition type 'Zbet'

Thanks in advance.

Santhosh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 28, 2005 at 03:02 PM
    
    select knumv kschl kbetr kwert kinak
           from konv
            into table cdata for all entries in bodyitab1
                   where konv~knumv = bodyitab1-knumv
                    and (  kschl = 'ZBET' )
                     or ( konv~kbetr > 0 or konv~kwert > 0 )
    
    

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2005 at 03:44 PM

    Hi,

    You need to use sub-queries "EXISTS". but it'not working on cluster table and pool table...and KONV in a cluster table.

    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.