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

Re: SORT internal table

$
0
0

Hi Norman,

 

Don't sort the internal table inside the loop.

Don't use the loop for sorting an itab.

 

Please check the code below.

 

select * from sbook into CORRESPONDING FIELDS OF TABLE it_sbook where customID ='00000238'.

 

   loop at it_sbook into wa_sbook.

 

   select * from stravelag into corresponding fields of table it_strave where agencynum = wa_sbook-agencynum.

  

    endloop.

 

 

SORT it_starve ASCENDING BY NAME.

 

     loop at it_strave into wa_strave.

 

READ TABLE IT_SBOOK into wa_sbook with key agencyNum = wa_starve-agencyNum.

 

          write: / wa_strave-Name, wa_sbook-bookID, wa_sbook-agencyNum.

 

  

    endloop.

     

 



Viewing all articles
Browse latest Browse all 9159

Trending Articles



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