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

Problem retreving data from cluster table

Hi friends,

Iam facing a problem while retreving data from a cluster table..


 select knumv
          kposn
          krech
          kawrt
          kbetr
          waers
          kpein
          kmein
          kwert
          from konv
          into table gt_konv
          where knumv in s_agnm.

In s_agnm i have 8 entries ie: iam giving manually 8 entries in s_sgnm-low.

If i do the above way iam getting exactly the 82 entries which i have in KONV table.. This is perfect..

But when iam using for all entries iam getting only 58 records from the KONV table..

ie :

    SELECT KNUMV
           KPOSN
           KRECH
           KAWRT
           KBETR
           WAERS
           WAERS
           KPEIN
           KMEIN
           KWERT
           FROM KONV
           INTO TABLE ITAB1
           FOR ALL ENTRIES IN ITAB
           WHERE KNUMV = ITAB-F1

Here F1 is the field which is same as S_SGNM as above and it also contains same number of records as above

Now when iam running the 2nd select statment iam getting only 58 entries ... instead it should get 82 entries as above...

Can any one tell me how to correct..

Regards

Kumar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 21, 2009 at 02:06 PM

    Read ABAP help for FOR ALL ENTRIES, it is removing duplicates so you are losing data if you don't include all key fields.

    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 21, 2009 at 02:07 PM

    Deleted

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2009 at 02:09 PM

    Hi Kumar,

    Since the number of rows returned (82 and 58) is not too high to inspect visually, the first thing I would do is simply print out the two result tables and compare them. Also make absolutely certain that the internal tables referenced in your WHERE clause do indeed contain what you think they contain.

    Keep us posted,

    Mark

    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.