Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8868

Re: Differnce in term of performance

$
0
0

Hi Amine,

 

My Analysis,

 

LOOP at IT into WA

     IF condition 1

          IF condition 2

          Treatment

          ENDIF.

      ENDIF.

ENDLOOP

 

-> Here for every record in internal table IT 'Treatment' would be done if both the conditions are true. Irrespective of any other record the conditions would be checked for all the records.

 

Whereas,

 

LOOP at IT into WA

     IF condition 1

          IF condition 2

          Treatment

           EXIT.

          ENDIF.

      ENDIF.

ENDLOOP

 

-> Here after a single record is found which satisfies both the condition 'Treatment' would be done and processing would exit the Loop. Other data in the internal table IT would not be checked for your conditions.

 

 

Now which to choose depends on your requirement since both logics serve different purposes.

 

 

BR,

Ankit.


Viewing all articles
Browse latest Browse all 8868

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>