<?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: sy-subrc in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288761#M786839</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;SY-SUBRC is a system code to identify whether a transaction or a statement is executed succesfully or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They have set several types of failures for an execution and they have set numbers for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To differentiate Succesful execution and Failure they would have set 0 for succesful execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. 0 - successful execution&lt;/P&gt;&lt;P&gt;anyother number - Failure in execution,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;awrd points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jan 2008 05:50:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-10T05:50:47Z</dc:date>
    <item>
      <title>sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288754#M786832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why there is 0 instead of other number representing the successful return of the code result for the system-variable sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u please explain this in detail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points would be rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asuthosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288754#M786832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288755#M786833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SY-SUBRC&lt;/P&gt;&lt;P&gt;Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ASSIGNsets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ASSIGN dref-&amp;gt;* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL FUNCTION sets SY-SUBRC according to the exception handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL METHOD sets SY-SUBRC according to the exception handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· COMMIT WORK sets SY-SUBRC to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· COMMUNICATION INIT DESTINATION &amp;#133; RETURNCODE sets SY-SUBRC as specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· DELETEsets SY-SUBRC to 0 if operation was successful, otherwise 4 or 0 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· DEMAND &amp;#133; MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· FETCHsets SY-SUBRC to 0 if at least one row was read, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· IMPORTsets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· INSERTsets SY-SUBRC to 0 if operation was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· LOAD REPORT sets SY-SUBRC to 0 if operation was successful, otherwise 4 or 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· LOOPsets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· LOOP ATsets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· MODIFYsets SY-SUBRC to 0 if operation was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· MODIFYsets SY-SUBRC to 0 if operation was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· OVERLAYsets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· READ LINE sets SY-SUBRC to 0 if list row exists, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· REPLACEsets SY-SUBRC to 0 if search string could be replaced, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ROLLBACK WORK always sets SY-SUBRC to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SCROLLsets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SEARCHsets SY-SUBRC to 0 if search string was found, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SELECTsets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SET BITsets SY-SUBRC to 0 if bit was set, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SHIFT &amp;#133; UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SPLITsets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· UPDATEsets SY-SUBRC to 0 if operation successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· WRITE &amp;#133; TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REward Points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288755#M786833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288756#M786834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi asuthosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC&lt;/P&gt;&lt;P&gt;Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ASSIGNsets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ASSIGN dref-&amp;gt;* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL FUNCTION sets SY-SUBRC according to the exception handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL METHOD sets SY-SUBRC according to the exception handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· COMMIT WORK sets SY-SUBRC to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· COMMUNICATION INIT DESTINATION &amp;#133; RETURNCODE sets SY-SUBRC as specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· DELETEsets SY-SUBRC to 0 if operation was successful, otherwise 4 or 0 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· DEMAND &amp;#133; MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· FETCHsets SY-SUBRC to 0 if at least one row was read, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· IMPORTsets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· INSERTsets SY-SUBRC to 0 if operation was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· LOAD REPORT sets SY-SUBRC to 0 if operation was successful, otherwise 4 or 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· LOOPsets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· LOOP ATsets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· MODIFYsets SY-SUBRC to 0 if operation was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· MODIFYsets SY-SUBRC to 0 if operation was successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· OVERLAYsets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· READ LINE sets SY-SUBRC to 0 if list row exists, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· REPLACEsets SY-SUBRC to 0 if search string could be replaced, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· ROLLBACK WORK always sets SY-SUBRC to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SCROLLsets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SEARCHsets SY-SUBRC to 0 if search string was found, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SELECTsets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SET BITsets SY-SUBRC to 0 if bit was set, otherwise 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SHIFT &amp;#133; UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· SPLITsets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· UPDATEsets SY-SUBRC to 0 if operation successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;· WRITE &amp;#133; TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;swaroop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:43:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288756#M786834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288757#M786835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi asuthosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sy-subrc&lt;/STRONG&gt; is a system field which is the return code. &lt;/P&gt;&lt;P&gt;ABAP programs will set this to 0 if execution is successfull or != (&amp;lt;&amp;gt;, not equal) 0 if otherwise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code value of SY-SUBRC specifies whether a suitable entry was found. In turn, this determines the value of the table index SY-TABIX . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 Entry found &lt;/P&gt;&lt;P&gt;SY-SUBRC &amp;lt;&amp;gt; 0 Entry not found &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Each ABAP sentence modifies sy-subrc with a return code. &lt;/P&gt;&lt;P&gt;- zero means "no error" &lt;/P&gt;&lt;P&gt;- not zero means "something happened", not necessary an error (sy-subrc from a read table sentence means "not found") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have that things clear, you will find what sy-subrc ne 0 means checking the syntax of the last sentence ran. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e.: &lt;/P&gt;&lt;P&gt;COMMAND [parameters]. &lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a trouble because that IF sentence is being true (sy-subrc &amp;lt;&amp;gt; 0), then you must make a double-click over COMMAND, to read the ABAP help about that command. Generally, SAP provides the frequent return codes for each command, and you will find the sense of your sy-subrc value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Rewqard if helpful.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou,&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:46:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288757#M786835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288758#M786836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Asu,&lt;/P&gt;&lt;P&gt;           That is standard one.At time of creation they will follow that notation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award poitns if helpful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; Kiran Kumar.G.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:48:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288758#M786836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288759#M786837</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;i binary system,  0 means true and 1 means false.&lt;/P&gt;&lt;P&gt;On suceess return ,it has to be displayed as true. so ' 0 ' is used as number to represnt sucessful return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess that could be the correct reason .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;suma sailaja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: suma sailaja pvn on Jan 10, 2008 6:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288759#M786837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288760#M786838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashutosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's due to convention, generally in all languages return code 0 means successful processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:49:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288760#M786838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288761#M786839</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;SY-SUBRC is a system code to identify whether a transaction or a statement is executed succesfully or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They have set several types of failures for an execution and they have set numbers for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To differentiate Succesful execution and Failure they would have set 0 for succesful execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. 0 - successful execution&lt;/P&gt;&lt;P&gt;anyother number - Failure in execution,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;awrd points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:50:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288761#M786839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T05:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288762#M786840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi asuthosh,&lt;/P&gt;&lt;P&gt;SY-SUBRC is the system variable which is set after any SQL,Function call,etc.when these operations are entirely sucessful then it is set to a value of 0.else to any value like 2 3 4 5 6 7 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ABAP statements, it is usually, 0,4,8 which means success or failure.&lt;/P&gt;&lt;P&gt;Sy-subrc = 0 -&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;Success&lt;/P&gt;&lt;P&gt;Sy-subrc = 4 -&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;Failure(known reason)&lt;/P&gt;&lt;P&gt;Sy-subrc = 8 -&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;Internal error(Unknown reason).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;From BDC CALL tranaction, 1001, will mean failure. Or if we are talking about sy-subrc value after calling a function module, it will depend on the exceptions list from the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kanagaraja J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 05:53:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288762#M786840</guid>
      <dc:creator>Kanagaraja_L</dc:creator>
      <dc:date>2008-01-10T05:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: sy-subrc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288763#M786841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Asuthosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its very simple to explain...&lt;/P&gt;&lt;P&gt;For successful return of the code result sy-subrc = 0...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other number returns the other details like...&lt;/P&gt;&lt;P&gt;Sy-subrc = 0 &amp;lt;Success&amp;gt;&lt;/P&gt;&lt;P&gt;Sy-subrc = 4 &amp;lt;Failure(known reason)&amp;gt;&lt;/P&gt;&lt;P&gt;Sy-subrc = 8 &amp;lt;Internal error(Unknown reason)&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But 0 (Zero) is the standard for anyother cases to return the sucessful execution.&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;Sayak...                                                                                "if u think its helpful then reward points"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 06:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc/m-p/3288763#M786841</guid>
      <dc:creator>RoySayak</dc:creator>
      <dc:date>2008-01-10T06:02:18Z</dc:date>
    </item>
  </channel>
</rss>

