While doing the performance optimization I could see that in the code it is splitting the BKPF entries selected to a package of 500 and selecting from BSEG cluster table. In effect the remaining tables are also getting hit based on the no. of entries(packets) in the selected BKPF internal table.
Cant we use the package size 500 in the select statement instead of this spliting and hiting the tables in a do loop.
SELECT x v z
APPENDING TABLE lt_bseg
PACKAGE SIZE 500
FOR ALL ENTRIES IN lt_coep
WHERE bukrs = lt_coep-bukrs
AND belnr = lt_coep-belnr_fi
AND gjahr = lt_coep-gjahr.
When I read the keyword documentation I saw a note in that as " If the addition PACKAGE SIZE is specified together with FOR ALL ENTRIES, it is not passed to the database system, but is applied to the result set on the application server, after all selected rows have been read" I did not understand the meaning of this.
So I am confused whether I can go ahead with this approach or will go along with the already used BKPF split logic and selct from BSEG and other tables in DO loop.
Can you please help me << removed >>.
Thanks & Regards,
Edited by: Rob Burbank on Sep 23, 2010 9:09 AM