2012 Oct 19 8:50 AM
Hi All,
I am having code like shown below...
loop at it_vbeln.
SELECT * FROM vbfa WHERE vbeln = it_vbeln-vbeln.
SELECT SINGLE * FROM vbkd WHERE vbeln = vbfa-vbelv.
endloop.
whether can i use the select statements outside the loop?
select VBELN
POSNR
KDGRP
PLTYP
from vbfa
into table it_vbfa
for all entries in it_vbeln
where vbeln = it_vbeln-vbeln.
after that...
loop at it_vbeln.
read table it_vbfa into wa_vbaf with key vbeln = it_vbeln-vbeln.
Which one is better....inside loop select single is better or use select outside the loop and read the table...
But when i seen the execution time select single inside loop is taking less time as compared with select outside loop and reading inside loop.
Please advise.
Ram
2012 Oct 19 8:58 AM
Moderator message : There are several discussions already available to related topics. Please search for it in SCN. Do the performance analysis yourself using the various transactions available in SAP( please search for it again ).