<?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 RETURN CODES IN ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534616#M850448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;friends,&lt;/P&gt;&lt;P&gt; pls can you help me the concepts the retutn code.,&lt;/P&gt;&lt;P&gt;the various values of sy-subrc and their respective assingments..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2008 07:27:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-13T07:27:36Z</dc:date>
    <item>
      <title>RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534616#M850448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;friends,&lt;/P&gt;&lt;P&gt; pls can you help me the concepts the retutn code.,&lt;/P&gt;&lt;P&gt;the various values of sy-subrc and their respective assingments..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534616#M850448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534617#M850449</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;Suppose you want to execute a statement if it is sucessfully executed then it sets sy-subrc = 0. (always) otherwise it set sy-subrc normally to 4 and its value also depends upon applications you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:30:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534617#M850449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534618#M850450</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 ABAP Extension Module uses three different return codes to process business object data; return code 0, 21, and any non-zero code (other than 21). Set the return code in the function module interface. For more information on the function module interface.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Return code 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Return code 0 indicates that the business object was successfully processed and returns VALCHANGE to the connector infrastructure. If ABAP handler processing is successful, then the connector expects new business object data that reflects the operation performed. For example, after a successful Create, the returned business object is an exact copy of the business object initially sent in, except that the keys are updated. Similarly, a successful Retrieve results in a fully formed instance of the business object. However, Create, Update, and Delete operations have different requirements for returned business objects than do Retrieve operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the IBM WebSphere InterChange Server is the integration broker, the difference in requirements comes from how the WebSphere business integration system handles business objects, specifically dynamic cross-referencing of object IDs during mapping. When the connector returns a business object to IBM WebSphere InterChange Server after a Create or Update operation, the mapping infrastructure attempts to update the cross-reference tables with the newly acquired object ID. This is accomplished by looking up the value of the business object's ObjectEventId attribute that was set when the business object was originally sent to the connector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To the ABAP handlers, this is significant because the ABAP handlers are responsible for "stitching" the object IDs into the business object that is returned to the connector. Typically, this is not an issue for Retrieve operations because there is no corresponding dynamic cross-referencing. Retrieve operations generate an entirely new business object that is returned to the connector. This business object does not have any direct relationship to the structure of the business object originally sent in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The business object data returned by the ABAP handler must be in the same flat structure format as when it was initially passed in to function module /CWLD/RFC_DO_VERB_NEXTGEN. The ABAP handler needs to send out only simple type attributes with the following information for each: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value &lt;/P&gt;&lt;P&gt;Peer relationship &lt;/P&gt;&lt;P&gt;Application-specific information&lt;/P&gt;&lt;P&gt;The attribute name is not required at this point, because the connector uses only the application-specific information to create a business object from this data. Identifiers for the beginning and ending of business objects or object type attributes are not used and should not be added. For example, the BoName and BoVerb rows are not used in the business object returned from the ABAP handler. They are initially passed into the ABAP handler only to facilitate processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP handler must adhere to the following set of rules when populating a flat structure with business object response data representing an WebSphere business object: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send only simple attributes, not object types. &lt;/P&gt;&lt;P&gt;All attributes must exist in the WebSphere business object definition. &lt;/P&gt;&lt;P&gt;All attributes must be sent in the order they are listed in the WebSphere business object definition. &lt;/P&gt;&lt;P&gt;No attribute of a child business object can be sent unless at least one attribute is sent for its parent business object. &lt;/P&gt;&lt;P&gt;Contained business objects must communicate the number of peers they have. &lt;/P&gt;&lt;P&gt;Attribute name (field ATTR_NAME) is not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Return code 21&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Return code 21 indicates that the business object was successfully processed and returns SUCCESS to the connector infrastructure. This code returns only success and does not return any business object data back to the connector. The Object-specific IDoc handler that process the business object data returns a return code of 21 when the business object data is successfully entered into the SAP application. The return code is passed back to the /CWLD/RFC_DO_VERB_NEXTGEN function module, which returns success back to the connector. The connector never receives business object data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is useful when passing large objects (such as an IDoc with multiple line items) and all you want is to know that your business object data was passed to the SAP application successfully. Performance is greatly improved because you return only the code and not the business object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When WebSphere InterChange Server is the integration broker, you should use return code 21 only when the business object does not require cross-referencing and when you are simply passing data into the SAP application. Do not use return code 21 for retrieve operations. Behavior of the SUCCESS return code means that no business object is returned to the WebSphere InterChange Server for cross-referencing or further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Non-zero return code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A non-zero return code (other than 21) indicates that the object was not processed successfully and returns FAIL to the connector. If the ABAP handler returns a non-zero code (other than 21), then no business object is returned to the connector.&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;Regards&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:33:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534618#M850450</guid>
      <dc:creator>ak_upadhyay</dc:creator>
      <dc:date>2008-03-13T07:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534619#M850451</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;Check these&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 Generation successful.&lt;/P&gt;&lt;P&gt;SY-SUBRC &amp;lt;&amp;gt; 0 Generation unsuccessful.&lt;/P&gt;&lt;P&gt;SY_SUBRC = 4 Syntax error.&lt;/P&gt;&lt;P&gt;SY-SUBRC = 8 Generation error.&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;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534619#M850451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534620#M850452</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;SAP provided us with predefined Data objects. One such object is SUBRC in the table SYST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose of this field to indicate success/failure of any action in SAP. After each statement in SAP is executed, the SY-SUBRC is set depending on the result of the statement. the SY-SUBRC can contain the following values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0 - This value is set when the statement is executed successfully.&lt;/P&gt;&lt;P&gt;2 - This value is set when the statement is executed unsuccessfully.&lt;/P&gt;&lt;P&gt;4 - This value is set when the statement is executed unsuccessfully.&lt;/P&gt;&lt;P&gt;8 - This value is set when the statement is executed unsuccessfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the DB related stetementsl ike INSET, SELECT, MODIFY and DELETE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the Internal table realted statements like READ, APPEND, INSERT, MODIFY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function modules, Class methods(Not PERFORM's) if they are called using EXCEPTIONS addition and if you assign numbers to the exceptions in the calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above are some of the most used.&lt;/P&gt;&lt;P&gt;Its hardto list all the ABAP statements that effect sy-subrc what you can do is just press F1 on any KEY WORD for which you want to know and it gives wether this effects sy-subrc or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb304e358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb304e358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534620#M850452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534621#M850453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whenever a Function module/Report validation fails SY-SUBRC automatically assume a Non-zero value. Generally 1 or 4. So just use a if condition after Function Call and check for SY-SUBRC value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;if sy-subrc = o&lt;/P&gt;&lt;P&gt;write 'success'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write 'error'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinayak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534621#M850453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: RETURN CODES IN ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534622#M850454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The return code value of SY-SUBRC specifies whether a suitable entry was found.&lt;/P&gt;&lt;P&gt;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;&lt;/P&gt;&lt;P&gt;SY-TABIX is set to the index of the found entry &lt;/P&gt;&lt;P&gt;&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;The output area remains unchanged. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY_SUBRC = 4 SY-TABIX points to the next largest entry. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 8 The key sought is greater than that of the last table entry. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX is set to (number of all entries + 1). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;rose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes-in-abap/m-p/3534622#M850454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:38:47Z</dc:date>
    </item>
  </channel>
</rss>

