Select for all entries

| April 30, 2009 | 1 Comment

When you need to access many records from one internal table is better to use select for all entries.

instead of doing this

loop at internal-table

select * from table where…….

endloop.

it’s better to

SELECT * FROM bkpf INTO CORRESPONDING FIELDS OF TABLE it_bkpf

FOR ALL ENTRIES IN it_vbrk

WHERE bukrs = it_vbrk-bukrs

AND blart = ‘DV’

AND xblnr = it_vbrk-doc

AND bstat = ”.

This way you will have one select to all the entries in it_vbrk.

 

Tags: ,

Category: BC - ABAP

About the Author ()

Comments (1)

Trackback URL | Comments RSS Feed

  1. mySAP FI says:

    Useful Tips… I just got many idea. I just came across your site thru sapdocs.info and wanted to say that I’ve really enjoyed reading your posts. In any case I’ll be subscribing to your feed and I hope you will keep a good work!

Leave a Reply