<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: ABAP string declaration gets truncated at 255 length in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486516#M4948969</link>
    <description>SOST preview might have some character limitation too. Or you have some bug in your e-mail code. Best to let e-mail message reach the inbox and check final e-mail (if possible).</description>
    <pubDate>Thu, 17 Sep 2026 08:02:45 GMT</pubDate>
    <dc:creator>Tomas_Buryanek</dc:creator>
    <dc:date>2026-09-17T08:02:45Z</dc:date>
    <item>
      <title>ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaq-p/14486447</link>
      <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I searched online but couldn't find an answer to this problem. I want to fill a variable declared as string or text1000 but it gets truncated at 255 length. Hope you can help check, fix or even provide an explanation atleast.&lt;/P&gt;&lt;P&gt;Below is the code I'm using:&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report ZTEST1
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; 
*&amp;amp;---------------------------------------------------------------------*
report ztest1.
data: lt_lines type standard table of tline,
      lwa_lines type tline.
data: lv_complete_comment type text1000.
*Append information
lwa_lines-tdline = '************************************************************************'.
append lwa_lines to lt_lines.
lwa_lines-tdline = 'Changed By:   Aaron Di (7777777)'.
append lwa_lines to lt_lines.
lwa_lines-tdline = 'Changed On:   09/08/2026 21:21:21'.
append lwa_lines to lt_lines.
lwa_lines-tdline = '************************************************************************'.
append lwa_lines to lt_lines.
lwa_lines-tdline = 'This is a test case for the TIM reminder email update to increase the character restriction. The comments need to show'.
append lwa_lines to lt_lines.
lv_complete_comment = reduce string(
  init text = conv string( '' )
  for line in lt_lines
  next text = text &amp;amp;&amp;amp; '' &amp;amp;&amp;amp; line-tdline &amp;amp;&amp;amp; cl_abap_char_utilities=&amp;gt;newline ).
write lv_complete_comment.&lt;/LI-CODE&gt;&lt;P&gt;Below is the debug screen showing the character length saved inside lv_complete_comment.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lv_complete_comment.jpg" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/459310i59480B43BD335984/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="lv_complete_comment.jpg" alt="lv_complete_comment.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Appreciate your time and hope you can share your thoughts.&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 04:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaq-p/14486447</guid>
      <dc:creator>jeff_broodwar</dc:creator>
      <dc:date>2026-09-17T04:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486477#M4948963</link>
      <description>&lt;P&gt;What do you mean by truncated at 255 length? I do not see it in your screenshot.&lt;/P&gt;&lt;P&gt;When I try code I do not see problem either - LV_COMPLETE_COMMENT contains all the texts including the "The comments need to show".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tomas_Buryanek_0-1789627070103.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/459330i55E1BF383F9B4B95/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Tomas_Buryanek_0-1789627070103.png" alt="Tomas_Buryanek_0-1789627070103.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Maybe you are asking about WRITE? For that I recommend reading&amp;nbsp;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABAPWRITE-.html" target="_blank"&gt;WRITE | ABAP Keyword Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 06:38:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486477#M4948963</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2026-09-17T06:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486478#M4948964</link>
      <description>&lt;P&gt;Appreciate your time Tomas. please see comments below:&lt;/P&gt;&lt;P&gt;Mine gets cut out at "&lt;STRONG&gt;(include preceding comments)....This is a test case for the TIM reminder e&lt;/STRONG&gt;" (continuation of -&amp;gt; "mail update to increase..." - and the rest are cut out (please see debug screenshot)). I wonder why mine is limited to only 255? is there a setting for this?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 06:54:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486478#M4948964</guid>
      <dc:creator>jeff_broodwar</dc:creator>
      <dc:date>2026-09-17T06:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486487#M4948965</link>
      <description>&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/188779"&gt;@jeff_broodwar&lt;/a&gt; I think that what you are referring to is just "preview" of variable value in debugger. The one where you hover with mouse over the variable. But to properly inspect the variable value you should doubleclick on it or open it in one of the debugger view tools (like on my screenshot).</description>
      <pubDate>Thu, 17 Sep 2026 07:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486487#M4948965</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2026-09-17T07:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486489#M4948966</link>
      <description>&lt;P&gt;How did you get to that view? My variable when I try to pass to another string gets only until letter e. Not the complete text you are showing.&lt;/P&gt;&lt;P&gt;Here's my debugger view:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lv_complete_comment D1.jpg" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/459336iEE3DB378925A3908/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="lv_complete_comment D1.jpg" alt="lv_complete_comment D1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lv_complete_comment D2.jpg" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/459337iC3B9205C678DFE9E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="lv_complete_comment D2.jpg" alt="lv_complete_comment D2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If it's just showing a preview then I suppose it should get all the text when I pass it to another variable... It only gets until "e" as shown above.&lt;/P&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 07:30:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486489#M4948966</guid>
      <dc:creator>jeff_broodwar</dc:creator>
      <dc:date>2026-09-17T07:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486492#M4948967</link>
      <description>&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/188779"&gt;@jeff_broodwar&lt;/a&gt; your screenshot is unfortunately too small. But notice that you can change views in debugger. In my screenshot I used "Tabular" view (it is visible on screenshot). You can experiment and try others too. Some views/previews are limited and preview only fixed amount of characters (very often 128 or 255 maximum).</description>
      <pubDate>Thu, 17 Sep 2026 07:32:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486492#M4948967</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2026-09-17T07:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486507#M4948968</link>
      <description>&lt;P&gt;I see it now, the tabular view shows the complete text same as yours &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then the issue is not the variable, once I pass it to SOST it gets truncated shorter, only until "for the TIM remind" - compare to the fast display view showing "for the TIM reminder e". Once you changed to tabular it shows the whole text...&lt;/P&gt;&lt;P&gt;It appears SOST preview comment box has limitation as well?&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2026 07:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486507#M4948968</guid>
      <dc:creator>jeff_broodwar</dc:creator>
      <dc:date>2026-09-17T07:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486516#M4948969</link>
      <description>SOST preview might have some character limitation too. Or you have some bug in your e-mail code. Best to let e-mail message reach the inbox and check final e-mail (if possible).</description>
      <pubDate>Thu, 17 Sep 2026 08:02:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14486516#M4948969</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2026-09-17T08:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP string declaration gets truncated at 255 length</title>
      <link>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14487653#M4949036</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/188779"&gt;@jeff_broodwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TRING in ABAP is not limited to 255 characters. The truncation is usually caused by an intermediate field (such as TDLINE) or by how the value is being displayed/debugged&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Sravan&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2026 13:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/abap-string-declaration-gets-truncated-at-255-length/qaa-p/14487653#M4949036</guid>
      <dc:creator>sravan_aleshwaram</dc:creator>
      <dc:date>2026-09-18T13:05:02Z</dc:date>
    </item>
  </channel>
</rss>

