ITPub博客

首页 > Linux操作系统 > Linux操作系统 > FOR ALL ENTRIES IN

FOR ALL ENTRIES IN

原创 Linux操作系统 作者:zhaoshuhong 时间:2009-10-21 09:48:28 0 删除 编辑

关于for all entries in性能方面的解释网络上已经很多了,我只说一个在实际工作中遇到的问题。

IF NOT Z_VBELN[] IS INITIAL.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ITLIKP FROM LIKP
            WHERE VBELN IN Z_VBELN.
    ENDIF.

Z_VBELN为一个RANGE。

Z_VBELN的条目数为2100条,运行程序时,报dump错误,通过ST22错误分析:

The SAP Open SQL statement concerned must be divided into several smaller units.
If the problem occurred due to the use of an excessively large table in an IN itab construct, you can use FOR ALL ENTRIES instead.
When you use this addition, the statement is split into smaller units according to the restrictions of the database system used.

根据此提示改为:

 IF NOT Z_VBELN[] IS INITIAL.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ITLIKP FROM LIKP
            FOR ALL ENTRIES IN Z_VBELN
            WHERE VBELN = Z_VBELN-LOW.
    ENDIF.

15000行没有问题。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9859323/viewspace-617064/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-09-27

  • 博文量
    29
  • 访问量
    78454