<?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: Why is sy-subrc not zero? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214227#M1983145</link>
    <description>&lt;P&gt;thank you  &lt;SPAN class="mention-scrubbed"&gt;michael.biber2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;that is right , i thought after clear statement the sy-subrc set to zero .&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2020 06:52:18 GMT</pubDate>
    <dc:creator>Madjid_Khanevadegi</dc:creator>
    <dc:date>2020-03-18T06:52:18Z</dc:date>
    <item>
      <title>Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214219#M1983137</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
  &lt;P&gt;in sap s4 hana i used a simple statement read table , this statement not return record and sy-subrc is 4 , and after that i use clear statement but the sy-subrc is 4 and not set to zero.&lt;/P&gt;
  &lt;P&gt;thank you in advance&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  Read Table it1
  Into wa1
  WITH KEY GUID = x_GUID.
  ...
  if sy-subrc ne 0 .
      clear wa1.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2020 16:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214219#M1983137</guid>
      <dc:creator>Madjid_Khanevadegi</dc:creator>
      <dc:date>2020-03-17T16:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214220#M1983138</link>
      <description>&lt;P&gt;Probably that the data types of GUID/X_GUID are different, or their values have a different length, or trailing space if their types are string. If you don't find out the reason, please attach the screenshots from the debugger (types, hex values, etc.).&lt;/P&gt;&lt;P&gt;Anyway, probability is 99.9999% that it's not a bug in SAP.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 16:28:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214220#M1983138</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-17T16:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214221#M1983139</link>
      <description>&lt;P&gt;The reason is that the clear Statement does not change sy-subrc at all. So it stays at the same value as before. &lt;/P&gt;&lt;P&gt;This is probably one of the reasons why most of the new commands do not rely on sy-subrc any more but uses exceptions instead. &lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 17:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214221#M1983139</guid>
      <dc:creator>BiberM</dc:creator>
      <dc:date>2020-03-17T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214222#M1983140</link>
      <description>&lt;P&gt;Is your question about SY-SUBRC not set to 0 after CLEAR? If yes please forget my first comment and refer to Michael answer.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 17:49:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214222#M1983140</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-17T17:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214223#M1983141</link>
      <description>&lt;P&gt;Probably, if you want to clear sy-subrc - try using FREE wa1&lt;/P&gt;&lt;P&gt;Clear - may clear the database object fields as well. &lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 17:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214223#M1983141</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-17T17:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214224#M1983142</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;madjied.khanevadegi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;SY-SUBRC is system field that will provide a return value for every ABAP statement executed as part of the program. The CLEAR is not among those commands that can change SY-SUBRC value.&lt;/P&gt;&lt;P&gt;The Value of the SY-SUBRC field will not be changed until another valid statement gets executed that will change the SY-SUBRC value, This is common for all system fields.&lt;/P&gt;&lt;P&gt;However you can clear the value of SY-SUBRC at any instant of the program.&lt;/P&gt;&lt;P&gt;The values and different commands in ABAP that alter SY-SUBRC is given below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/Sy-Subrc" target="_blank"&gt;SY-SUBRC&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 05:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214224#M1983142</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-03-18T05:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214225#M1983143</link>
      <description>&lt;P&gt;The first sentence of your answer is confusing "SY-SUBRC ... provide a return value &lt;STRONG&gt;for every&lt;/STRONG&gt; ABAP statement".&lt;/P&gt;&lt;P&gt;If you say instead, "only a few ABAP statements set SY-SUBRC", that would be better.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 05:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214225#M1983143</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-18T05:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214226#M1983144</link>
      <description>&lt;P&gt;That's true, SY-SUBRC is not a good friend, most of the developper used a variable because most of the time we didn't know when it will be updated. SELECT / READ ... &lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 06:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214226#M1983144</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-03-18T06:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214227#M1983145</link>
      <description>&lt;P&gt;thank you  &lt;SPAN class="mention-scrubbed"&gt;michael.biber2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;that is right , i thought after clear statement the sy-subrc set to zero .&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 06:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214227#M1983145</guid>
      <dc:creator>Madjid_Khanevadegi</dc:creator>
      <dc:date>2020-03-18T06:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214228#M1983146</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;frdric.girod&lt;/SPAN&gt; and sadly, people don't read the documentation when they have a doubt... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Wed, 18 Mar 2020 07:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214228#M1983146</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-18T07:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is sy-subrc not zero?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214229#M1983147</link>
      <description>&lt;P&gt;As a good developper; I never read documentation, even in real life &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 07:12:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-is-sy-subrc-not-zero/m-p/12214229#M1983147</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-03-18T07:12:39Z</dc:date>
    </item>
  </channel>
</rss>

