使用视图取代基本表

很多时候 ABAP 程序员需要使用基本表和嵌套的选择。其实我们应该查看一下是否有SAP已经提供的这些基本表的某些视图可供使用,以便直接获得想要的数据,而不用特别编写代码来获取。

不建议使用:

Select * from zcntry where cntry like ‘IN%’.

Select single * from zflight where cntry = zcntry-cntry and airln = ‘LF’.

Endselect.

建议使用:

Select * from zcnfl where cntry like ‘IN%’ and airln = ‘LF’.

Endselect.

posted on 2009-08-03 19:26  levin  阅读(1423)  评论(0编辑  收藏  举报