<?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 Re: Length of a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460384#M217333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; There is no System variable  to find the length of the string.&lt;/P&gt;&lt;P&gt; We have to go with Strlen( ) as other have used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pramod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2006 19:18:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-28T19:18:43Z</dc:date>
    <item>
      <title>Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460380#M217329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am wondering what is the code to obtain the length of a string of characters, is there such a thing like sy-length? Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anyi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:08:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460380#M217329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T19:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460381#M217330</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;DATA: STRING(20).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LEN TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRING = 'ABDCE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEN = STRLEN( STRING ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case LEN = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can use DESCRIBE FIELD statament to know the length of variable (in this case 20):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD STRING LENGTH LEN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460381#M217330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T19:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460382#M217331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just need the &amp;lt;u&amp;gt;defined&amp;lt;/u&amp;gt; length(as opposed to occupied length which STRLEN tells you) of a field then you can use the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD myfield LENGTH field_length.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:14:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460382#M217331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T19:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460383#M217332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to use the STRLEN keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: len type i.
data: str type string.

str = 'This is the string that we want to measure'.

len = STRLEN( str ).

write:/  len.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:14:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460383#M217332</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-28T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460384#M217333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; There is no System variable  to find the length of the string.&lt;/P&gt;&lt;P&gt; We have to go with Strlen( ) as other have used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pramod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:18:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460384#M217333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T19:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460385#M217334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H anyi,&lt;/P&gt;&lt;P&gt;The ABAP function STRLEN returns the length of a string up to the last character that is not a space. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[COMPUTE] &amp;lt;n&amp;gt; = STRLEN( &amp;lt;c&amp;gt; ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRLEN processes any operand &amp;lt;c&amp;gt; as a character data type, regardless of its real type. There is no type conversion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As with mathematical functions, the keyword COMPUTE is optional. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: INT TYPE I,&lt;/P&gt;&lt;P&gt;WORD1(20) VALUE '12345'. &lt;/P&gt;&lt;P&gt;      WORD2(20).&lt;/P&gt;&lt;P&gt;      WORD3(20) VALUE ' 4 '. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INT = STRLEN( WORD1 ). WRITE INT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INT = STRLEN( WORD2 ). WRITE / INT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INT = STRLEN( WORD3 ). WRITE / INT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results are 5 , 0, and 4 respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward helpful answers.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460385#M217334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T19:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Length of a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460386#M217335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi anyi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: Str type string,&lt;/P&gt;&lt;P&gt;      LEN type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( str ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/length-of-a-string/m-p/1460386#M217335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T19:19:32Z</dc:date>
    </item>
  </channel>
</rss>

