We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] Performance Tuning - Modifying internal table inside a loop

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by DakilangAbaper
on Sep 12 at 9:42 AM
Mark this reply as helpfulMark as helpful
Thanks to all of you guys... All of your answers helped me a lot in understanding the performance difference of the 2.

I've got a follow up question by the way. Isn't we create index for tables to improve the performance. Will it also be a help if we are simply selecting all data from a table?

What I mean is NO WHERE condition, just a simple SELECT * FROM mara TO TABLE itab... Is making an index to table MARA will still be a help to improve the selection performance?

---------------Original Message---------------
From: Super_Abaper
Sent: Wednesday, September 08, 2010 12:50 PM
Subject: Performance Tuning - Modifying internal table inside a loop

> Hi gurus,
>
> Just like to ask, which one performs faster in modifying an internal table inside a loop statement.
> Is it with the MODIFY i_tab INDEX sy-tabix (inside the loop) or you assign it to a field-symbols.
> (1) LOOP AT i_tab.
> i_tab-f1 = 123.
> MODIFY i_tab INDEX sy-tabix.
> ENDLOOP.
>
> OR
>
> (2)
> LOOP AT i_tab ASSIGNING <fs1>.
> ASSIGN COMPONENT 'F1' OF STRUCTURE <fs1> TO <fs>.
> <fs> = 123.
> ENDLOOP.
>
> Also, how can I trace the duration of a program. How can I evaluate it in ST05, or is there any other way.
>
> Thanks a lot!

__.____._
Copyright © 2010 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language