Skip to Content
Technical Articles
Author's profile photo Shweta Sahay

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

 

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sandra Rossi
      Sandra Rossi

      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.
      • ...
      Author's profile photo Shweta Sahay
      Shweta Sahay
      Blog Post Author

      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.

      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      From my experience, the perceived risk of modifying the old code is usually far lower in reality than the risk of not making any changes.

      Author's profile photo Kevin Holtkamp
      Kevin Holtkamp

      Hey Sandra Rossi ,

      this might be a dumb question, but why doesn't SAP just fix it with a SAP Note by changing the internal table types to strings or at least c(255)?

      Author's profile photo Sandra Rossi
      Sandra Rossi

      Ask SAP, not me 😉

      Author's profile photo Kevin Holtkamp
      Kevin Holtkamp

      I hope you understand that I have more trust in you.

       

      I don't trust SAP since the day that SE80 told me that a string is not charlike...