Accelerated LOOP

Using "LOOP AT itab ASSIGNING ." instead of a work area you avoid data transport into the work area.

Using "LOOP AT itab ASSIGNING ." instead of using a work area (either explicit or via header line) you avoid data transport into the work area. The field symbol is a pointer into(!) the table so that you can modify the table line directly; you don't need MODIFY thus avoiding another data transport.
report z.
types: begin of rec_type,
       count type i,
       string(1024) type c,
       end   of rec_type.
types  tab_type type rec_type occurs 0.
data   itab type tab_type.
data   wa   type rec_type.
field-symbols 
  
    type rec_type.
do 1000 times.
   append wa to itab.
enddo.
loop at itab assigning 
   
    . " pointer
   
    
     -count = sy-tabix. " modify itab
   
     
      -string = 'x'. " without MODIFY
endloop.

     
    
   
  
This was last published in December 2001

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close