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

I want all entries in vbrp but i am fetching on basis of for all entries

Hi,

I want all entries in vbrp but i am fetching on basis of for all entries in vbrk. how i'll get duplicate entries in vbrp as i have to show in final output.

And which internal table shell i loop ,whether on it_vbrp or on it_vbrk to fill final internal table by read commond . Is there any general rule to put loop

on header and detail table to fill final table.

Regards,

Himanshu

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 08:38 AM

    Hi,

    Try this

    if not it_vbrk[] is initial.

    select -- -- -- --

    from vbrp

    into table it_vbrp

    for all entries in it_vbrk

    where (check for the key fields)

    if sy-subrc eq 0.

    sort it_vbrp.

    endif.

    endif.

    If yu want all the item level details, then loop at the item level internal table, it_vbrp. Then read the table it_vbrk.

    Then do further processing.

    Regards

    Ramesh Sundaram

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 05, 2009 at 05:23 PM

    please post one question per thread.

    You need to use SELECT ... INNER JOIN ... . Check abap documentation, and many threads in this forum

    Add a comment
    10|10000 characters needed characters exceeded

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

    Himanshu,

    first sort it_vbrk then use select to populate it_vbrp with for all entries in it_vbrk. then loop on the table you want to populate. and use read command to read fields from other internal tables & populate the fields.

    BR,

    SB.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 09, 2009 at 07:51 AM

    > how i'll get duplicate entries in vbrp as i have to show in final output.

    without details, I guess you are looking for duplicates which are deleted by the FOR ALL ENTRIES.

    Use the join, it should anyway be your first choice.

    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.