Skip to Content
Technical Articles

Avoid line >72 char wide issue

If the code line exceeds 72 char then few programs throws dump which happens because of some of the Function modules/programs having this restriction especially in case of ALVs. The dump shows message READ_REPORT_LINE_TOO_LONG  on execution whenever our code lines exceeds 72 characters  .

Solution for this is just to split the line which is exceeding the limit of 72 char width. Earlier we use to have a setting in ABAP setting to tick a check box to get an indicator on the editor by which we can understand while writing code whether the code line is exceeding limit and we need a split.

I was trying to find this option of getting indicator back on my editor but then thought with the new option to adjust the code with split using of Utilities->More Utilities->Force Line length 72  we have lost the old indicator line option, but finally came across below option which bought me back the indicator on my editor so thought of sharing it in this post.

Now this setting can be done from ABAP editor, from below option at the bottom left to include indicator just by entering Page width “72” and selecting “Disable Word Wrap” radio button . With this setting we can easily come to know while writing code if the code line is exceeding the width limit.

Now the ABAP editor is back with indicator . Once this setting is done it will appear in all the objects which use ABAP editor such as Function modules, Global methods & Smartform editors .

Generally, we forget the line width while writing long comment or modification log description in the program.Thus with the help of this setting we can avoid line >72 char wide, because of indicator we can easily come to know when the line split is required.

I hope this will be helpful !

 

Thanks

Shweta

 

/
3 Comments
You must be Logged on to comment or reply to a post.
  • The short dump READ_REPORT_LINE_TOO_LONG occurs for READ REPORT (internal table not wide enough to receive the lines, not limited to 72 characters by the way). This short dump can be avoided by defining an internal table with lines of type STRING.

    That would be nice to list the cases for the short dump.

    Examples of programs using READ REPORT into an internal table with a limited (fixed) length, so risk of short dump: 

    • Function module REUSE_ALV_FIELDCATALOG_MERGE, if you use the parameter I_INTERNAL_TABNAME.
    • Thanks Sandra for mentioning the case.

      Yes we can handle this dump also by changing the code , but if we are working on a modification for an existing program then it is risky to modify the old code. Also I have seen if we extend the line in implicit enhancement and the main program somewhere is using this Function module then also it results in error so simply by reducing the line length problem gets resolved.