REUSE_ALV_FIELDCATALOG_MERGE ABAP錯誤

REUSE_ALV_FIELDCATALOG_MERGE

错误详细描述: An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_READ_SRC_LINE_TOO_LONG', was
not caught in
procedure "K_KKB_FIELDCAT_MERGE" "(FUNCTION)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
There was an attempt to read program "Z1S01R001" from the database.
The READ REPORT statement allows you to copy a program text into an
internal table. The occupied line length in the program text must not
exceed the width of the internal table.
The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72
characters wide. The program line is 93 characters wide。

今天写个ABAP程序,一运行就荡掉,刚开始也没仔细看出错提示,以为是自己的代码写的问题,最后才搞懂,唉,原来是SAP系统不允许书写的代码长度超过72个字符,我的注释行的字符数太多了,导致了dump,唉,把长度很长的代码行,包括注释行,都变成72个字符以内后,就OK啦。

 

 

其他注意事项:

  • 如果是用本程序定义的内表的话,除了基本类型(I,N,C,etc.)可以用TYPE定义外,其他的必须要用LIKE,
  • 这个参数必须是一个用OCCUR 0定义的ITAB。不然获取不到它的Field Catalog.
  • 当使用程序中的内表的时候,“i_program_name”这个参数必须是本程序名SY-REPID
  • 程序中用来输出的内表结构中的每个字段都要参考了数据字典中的Data element,否则无法获取字段的相关信息,此时在自动构建FIELDCAT后再手动对无参照字典类型的字段进行手工设置
  • 还有一点,程序代码段要小于72个字符,不然会报dump:
    • The READ REPORT statement allows you to copy a program text into aninternal table. The occupied line length in the program text must notexceed the width of the internal table.The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72  characters wide. The program line isxxx characters wide.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值