How To Use "For All Entries In Itab"

How To Use "For All Entries In  Itab"
- Usually use for Sql Select Statement,it is for search condition in a list or a internal table.
For Instance:
-Internal Table: ITAB_A
Carrid    Connid
LH           2415
SQ          0026
LH           0400
 
-Sql Section
 Select * from sfligh into wa-sfligh
 For All Entries In ITAB_A
 where Carrid = ITAB_A-Carrid
 and Connid = ITAB_A-Connid
 and Fldate = '20010228'
.....
EndSelect.
 
-The Statement has the same effect as:
 Select Distinct * from sflight into wa-sfligh
where Carrid = 'LH'
And Connid ='2415'
And fldate = '20010228' or
( Carrid = 'SQ'
And Connid ='0026'
And fldate = '20010228') Or
(Carrid = 'LH'
And Connid ='0400'
And fldate = '20010228')
...
EndSelect.
  
 
 

posted on 2007-05-04 12:29  封起De日子  阅读(103)  评论(0编辑  收藏  举报

导航