<?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: abap in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919216#M687338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi GANAPATHI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it depends on the context. A READ TABLE will give SY_SUBRC 8 if the table is empty, 4 if the record was not found. Use F1 help on ABAP statement to see what subrc has what meaning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The use your head (or ask your boss) to decide how to handle it.&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, 13 Oct 2007 21:08:11 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-10-13T21:08:11Z</dc:date>
    <item>
      <title>abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919212#M687334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; if sy-subrc = 4,if sy-subrc = 8 like that we can write in progam.then which type of message its disply?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 06:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919212#M687334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T06:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919213#M687335</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 = 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;SELECT * FROM MARA &lt;/P&gt;&lt;P&gt;into table i_mara&lt;/P&gt;&lt;P&gt;where matnr = '00000123445'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a record exists in MARA table for the above material no., then sy-subrc value would be 0 i.e. Successful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a record doesnt exist in MARA table for above material no., then sy-subrc value would be 4 i.e. Retrieval not successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;The result table contains at least one record. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;The result table is empty. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8: &lt;/P&gt;&lt;P&gt;Applies only to SELECT SINGLE FOR UPDATE: You did not specify all of the primary key fields in the WHERE condition. The result table is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 06:27:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919213#M687335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T06:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919214#M687336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can set the value of sy-subrc manually in your program.&lt;/P&gt;&lt;P&gt;Regarding the Message to be displayed... you can raise any message based on the value of sy-subrc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 06:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919214#M687336</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-10-13T06:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919215#M687337</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 sy in your program.stem field which is usually used to check the success of a particular statement like the loop,select etc....&lt;/P&gt;&lt;P&gt;The values of sy-subrc other than zero states that the statement could not be executed successfully but the value zero states it executed successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the values of sy-subrc you can write the code like the error messages.&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;display an error message by using the message number and the message class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;CASE sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          LOOP AT gi_recievers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            IF gi_recievers-receiver = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              name = gi_recievers-rec_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              name = gi_recievers-receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            IF gi_recievers-retrn_code = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              WRITE: / name, ': succesfully sent'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              WRITE: / name, ': error occured'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHEN 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WRITE: / 'Too many receivers specified !'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHEN 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WRITE: / 'No receiver got the document !'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHEN 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WRITE: / 'Missing send authority !'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WHEN OTHERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WRITE: / 'Unexpected error occurred !'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you have any further clarifications,do let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Puneet Jhari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2007 15:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919215#M687337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-13T15:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919216#M687338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi GANAPATHI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it depends on the context. A READ TABLE will give SY_SUBRC 8 if the table is empty, 4 if the record was not found. Use F1 help on ABAP statement to see what subrc has what meaning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The use your head (or ask your boss) to decide how to handle it.&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, 13 Oct 2007 21:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap/m-p/2919216#M687338</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-10-13T21:08:11Z</dc:date>
    </item>
  </channel>
</rss>

