<?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: how to check a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750917#M325605</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;PRE&gt;&lt;CODE&gt;if str1+0(1) ='0'.
starts with zero.
else
not starts with zero.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Dec 2006 09:43:31 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2006-12-02T09:43:31Z</dc:date>
    <item>
      <title>how to check a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750916#M325604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  How to check if a string (str1) starts with a ' 0 ' (zero) or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 09:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750916#M325604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-02T09:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to check a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750917#M325605</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;PRE&gt;&lt;CODE&gt;if str1+0(1) ='0'.
starts with zero.
else
not starts with zero.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 09:43:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750917#M325605</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-02T09:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to check a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750918#M325606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SVJ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can try this code ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if string+0(1) CA '0'.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Zero'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Non zero'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 10:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750918#M325606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-02T10:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to check a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750919#M325607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if str(1) = '0'.&lt;/P&gt;&lt;P&gt;  &amp;lt;leading 0&amp;gt;.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  &amp;lt;no 0&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;shiba dutta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 10:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750919#M325607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-02T10:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to check a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750920#M325608</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;the proposals are correct but incomplete and dangerous because empty strings will result in a dump. The offset +0(1) is invalid for length zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could be a nice application for a functional method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
method starts_with_zero.
if strlen( str1 ) &amp;gt; 0.
  if str1(1) = '0'.
    result = 'X'.
  else.
    result = space.
  endif.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define a local or dictionary class z_util with static method (CLASS-METHODS) starts_with_zero. Define str1 type string as importing parameter, value(result) type xfeld as returning parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The in your program, use something like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CHECK z_util=&amp;gt;starts_with_zero( anystring ) is initial.
* continue for string anystring if not starting with Zero
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I love functional static methods - they can make programs more easy to read and write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 14:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-check-a-string/m-p/1750920#M325608</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-12-02T14:36:50Z</dc:date>
    </item>
  </channel>
</rss>

