【ABAP】代码单行长度超长Dump

  问题:The ABAP program lines are wider than the internal table.

       ALV自动转换成fieldcat,通过内表转换,如果代码长度超过72位,会系统Dump。

复制代码
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = 'LS_RECORD'
      i_inclname             = sy-repid
    CHANGING
      ct_fieldcat            = gt_fieldcat[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2.
复制代码

  原因:函数K_KKB_FIELDCAT_MERGE,365行处转换问题

  rssource-line长度设定72位,因此ABAP代码宽度不能超过72字符长度

* source container
  data:
        l_abap_source like rssource occurs 0 with header line.

 

*    class cx_sy_read_src_line_too_long definition load.
*    data: ex_too_long type ref to  cx_sy_read_src_line_too_long.
*    try.
    read report l_prog_tab_local into l_abap_source.
*      catch cx_sy_read_src_line_too_long into ex_too_long.
*    endtry.
    check sy-subrc eq 0.

 

posted on   color_story  阅读(108)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示