使用REUSE_ALV_FIELDCATALOG_MERGE的问题与解决办法

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
     EXPORTING
       i_program_name               =  v_repid
       i_internal_tabname           = 'HEADERTAB'
*     I_STRUCTURE_NAME             =
*     I_CLIENT_NEVER_DISPLAY       = 'X'
       i_inclname                   = v_repid
       i_bypassing_buffer           = 'X'
       i_buffer_active              = ' '
     CHANGING
       ct_fieldcat                  = i_fieldcat
     EXCEPTIONS
       inconsistent_interface       = 1
       program_error                = 2
       OTHERS                       = 3
             .
使用REUSE_ALV_FIELDCATALOG_MERGE会出现以下错误:

Since the caller of the procedure could not have expected this exception
 to occur, the running program was terminated.
The reason for the exception is:
You tried to read the program "ZQUY_TEST" from the database. The READ REPORT
statement allows you to copy a program's source code into an internal
table. The lines of source code must not be longer than the width of the
 internal table. The internal table is 72 characters wide. The source
code line is 74 wide.

引起以上错误的原因有两种:

1、内表定义HEADERTAB中的字段长度 大于 72字节。

      解决办法:尽量避免出现这种情况。

2、程序源码中有的行源码数 大于 72字节。

      解决办法:进入SE38—>使用程序—>设置—>在“ABAP EDITOR一栏”,如下图设置所示:

      11377579_200906040941541.jpg

      将源码的每行的长度控制在72字节,如果大于这个长度,自动换行。

       然后,强制换行,在SE38—>使用程序—>More Utilities中点击 Force Line Length,如图:

       11377579_200906040945551.jpg

OK,问题搞定!

fj.png11.jpg

fj.png11.jpg

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

转载于:http://blog.itpub.net/11377579/viewspace-605068/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值