<?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 and debugging in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856490#M1135664</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;try puttingt a watch point on sy-subrc ???&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;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2008 09:40:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-28T09:40:15Z</dc:date>
    <item>
      <title>Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856489#M1135663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, please forgive the (probably) nooby question, some stuffs aren't so clear to me and maybe you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to debug a function that generates an error msg. I tried to debug a bit and located the point in which the error message is generated. I've seen that the error message is caused by a sy-subrc value NE 0 after a function call. Well, then the problem is that something goes wrong in that function.&lt;/P&gt;&lt;P&gt;Looking at the call, I've seen that the named exceptions are:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXCEPTIONS
   error_message = 01
   OTHER = 02.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The exact sy-subrc at the end of that call is 01, but can't locate what goes wrong. I expected to find something like a RAISE statement, but it isn't present. If I consider that function as a "black box", then I see that after its execution the sy-subrc value is 01 (and an error message is generated in the code that follows). If I check in depth the fuction, I see that:&lt;/P&gt;&lt;P&gt;- no raise exceptions are found.&lt;/P&gt;&lt;P&gt;- there are some calls to other functions and also some performs, and loops on tables...&lt;/P&gt;&lt;P&gt;Then the question is: how can I see (debugging a run) where exactly that sy-subrc is set to 01? Or in other words, what is responsable for a sy-subrc change in return for a call function?&lt;/P&gt;&lt;P&gt;This seems a quite complex scenario (the code is quite tricky), but maybe there's some trick in debug I don't know, or something to look for that can help me.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856489#M1135663</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2008-11-28T09:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856490#M1135664</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;try puttingt a watch point on sy-subrc ???&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;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856490#M1135664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T09:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856491#M1135665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is in itself generating the error (i.e. some conditions in the function module are not satisfying and thats the reason the SY-SUBRC is coming as 1). There will be no RAISE EXCEPTION in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion to you is check the function module in detail (in debug mode) and try to find which of the conditions, select statements, read statements, etc. are failing. There is no other option. you will have to debug and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kunal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:44:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856491#M1135665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T09:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856492#M1135666</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;Defintely there should be one RAISE statement...Did u check whther the function is calling some other function...Try to search with command RAISE in the main program of the FM..also u can check with ERROR_MESSAGE.&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;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856492#M1135666</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-11-28T09:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856493#M1135667</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;May i know the FM you are debugging . To check myself .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somewhere a Raise should be there which makes the sy-subrc to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rhea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856493#M1135667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T09:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856494#M1135668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function name is MS_SERVICE_PACKAGE. Is located on a SRM machine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 10:20:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856494#M1135668</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2008-11-28T10:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856495#M1135669</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;see this  in line 17 in include LMLSPF2M.&lt;/P&gt;&lt;P&gt;*IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; RAISE FATAL_ERROR.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May the subrc ur looking is coming from other FMs Exceptions  which are called in the MS_SERVICE_PACKAGE FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rhea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 10:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856495#M1135669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T10:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sy-subrc and debugging</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856496#M1135670</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 below are the exceptions are there in the main program -&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      RAISE NO_SERVICES_FOUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   RAISE SERVICE_NOT_EXIST.&lt;/P&gt;&lt;P&gt;      RAISE SERVICE_NOT_ALLOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         RAISE SERVICE_NOT_ALLOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      RAISE SERVICE_NOT_ALLOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   RAISE PO_NOT_EXIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    RAISE PACKNO_NOT_EXIST.&lt;/P&gt;&lt;P&gt;    RAISE PACKNO_NOT_EXIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    RAISE NO_SERVICES_FOUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  RAISE NOT_FOUND.&lt;/P&gt;&lt;P&gt;  RAISE NOT_FOUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAISE SERVICE_NOT_EXIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   RAISE PACKAGE_NOT_EXIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    RAISE no_service_data.&lt;/P&gt;&lt;P&gt;    RAISE no_tax_changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u check in the source code u will find  'RAISE EXCEPTION..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 10:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-subrc-and-debugging/m-p/4856496#M1135670</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-11-28T10:56:26Z</dc:date>
    </item>
  </channel>
</rss>

