<?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>topic logic in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957473#M393957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i have an int. table which has one col. with long text...the text's value of every row can vary, from a letter to a max of 72 characters...now, i want to find the row that has the max. length (in the below case, it's 5 th row - strlen is 13)...is there any command to retrieve the max length of a col. in int table...i don't want to compute each and every row's strlen and compare vs. the next row...any helpful answer will be rewarded...thanks all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   tdname&lt;/P&gt;&lt;P&gt;   ABCDE&lt;/P&gt;&lt;P&gt;   ABCDEFG&lt;/P&gt;&lt;P&gt;   ABC&lt;/P&gt;&lt;P&gt;   ABCDEFGHI&lt;/P&gt;&lt;P&gt;   ABCDEFGHIJKLM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Sathish. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Feb 2007 11:46:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-26T11:46:48Z</dc:date>
    <item>
      <title>logic in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957473#M393957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i have an int. table which has one col. with long text...the text's value of every row can vary, from a letter to a max of 72 characters...now, i want to find the row that has the max. length (in the below case, it's 5 th row - strlen is 13)...is there any command to retrieve the max length of a col. in int table...i don't want to compute each and every row's strlen and compare vs. the next row...any helpful answer will be rewarded...thanks all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   tdname&lt;/P&gt;&lt;P&gt;   ABCDE&lt;/P&gt;&lt;P&gt;   ABCDEFG&lt;/P&gt;&lt;P&gt;   ABC&lt;/P&gt;&lt;P&gt;   ABCDEFGHI&lt;/P&gt;&lt;P&gt;   ABCDEFGHIJKLM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Sathish. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957473#M393957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: logic in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957474#M393958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can solve it somhow like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: gv_length TYPE i, gv_max TYPE i.
CLEAR gv_length. CLEAR gv_max.
LOOP AT itab INTO wa.
  gv_length = strlen(wa-text).
  IF gv_lenght &amp;gt; gv_max.
    gv_max = gv_length.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately there is no other way, I think it at least...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957474#M393958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: logic in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957475#M393959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:52:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957475#M393959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: logic in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957476#M393960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      May be you can sort your internal table by that field where you have the text and with the option AS TEXT, and I think then the field with most number of character will be last in the but works only if there is only one field with this maximum length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-in-internal-table/m-p/1957476#M393960</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-02-26T11:56:24Z</dc:date>
    </item>
  </channel>
</rss>

