<?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 debugger’s handling exception in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511766#M2004079</link>
    <description>&lt;P&gt;Yes. It should really quit debugging after the WRITE:/1 'TRUE'. instead of jumping to line WRITE:/1 'FALSE'. &lt;/P&gt;</description>
    <pubDate>Sun, 09 Jan 2022 19:31:44 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2022-01-09T19:31:44Z</dc:date>
    <item>
      <title>ABAP debugger’s handling exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511763#M2004076</link>
      <description>&lt;P&gt;I found something interesting.&lt;/P&gt;
  &lt;P&gt;I think ABAP debugger has a problem with handling a exception because of below.&lt;/P&gt;
  &lt;P&gt;When I executed below program on Debugging Enviornment,&lt;BR /&gt;I found the cursor moved to wrong position.&lt;BR /&gt;I tested it repeatly on SAP BASIS 46C, 751, 753 and the result was the same.&lt;/P&gt;
  &lt;P&gt;So, I would like to know this reason.&lt;/P&gt;
  &lt;P&gt;Below is my test code.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;REPORT yfic2rasing.&lt;BR /&gt;&lt;BR /&gt;"This statement doesn't affect sy-subrc.&lt;BR /&gt;MESSAGE s001(00) WITH 'Test raising exception' RAISING xyz.&lt;BR /&gt;&lt;BR /&gt;IF sy-subrc = 0.&lt;BR /&gt;  "So we expect ABAP executes this statement.&lt;BR /&gt;  "And it does actually.&lt;BR /&gt;  WRITE:/1 'TRUE'.&lt;BR /&gt;ELSE.&lt;BR /&gt;  "However, on debugging enviornment, we can see that debugging cursor enters this point.&lt;BR /&gt;  "Actually ABAP doesn't execute this statement.&lt;BR /&gt;  "Just it is shown as like executing that.&lt;BR /&gt;  WRITE:/1 'FALSE'.&lt;BR /&gt;ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jan 2022 09:10:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511763#M2004076</guid>
      <dc:creator>any2me_k</dc:creator>
      <dc:date>2022-01-07T09:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP debugger’s handling exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511764#M2004077</link>
      <description>&lt;P&gt;It's nothing to do with the exception - you don't need the MESSAGE statement to get the same result! I added a &lt;STRONG&gt;WRITE /1 'FINISHED'&lt;/STRONG&gt; statement after the ENDIF; the debugger then behaves as expected. I think I know what is happening.&lt;/P&gt;&lt;P&gt;It seems the debugger will always go to the last actually &lt;EM&gt;executable&lt;/EM&gt; line in the program. Even if it doesn't actually execute it. The debugger just can't stop at ENDIF or a blank line, so it stops at the line before ENDIF. The WRITE:/1 'FALSE'. &lt;/P&gt;&lt;P&gt;I can't really think of what else it could do! Same behaviour in Eclipse and SAPGui btw.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 12:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511764#M2004077</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-01-07T12:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP debugger’s handling exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511765#M2004078</link>
      <description>&lt;P&gt;Thanks for your opinion.&lt;/P&gt;&lt;P&gt;After more consideration, my conclusion is this.&lt;/P&gt;&lt;P&gt;"The conditional statement (like IF, CASE) out of procedure(subroutine, function modules, methods)" causes the debugger to act incorrectly.&lt;/P&gt;&lt;P&gt;I was in a hurry to test the statement of "Message ~ Raising~" and made just simple code without procedure such a Form.&lt;/P&gt;&lt;P&gt;And then it made me thought the reason was the exception statement.&lt;/P&gt;&lt;P&gt;Generally ABAP program has processing blocks and our executable program is called by MODULE statement in screen 1000 on SAPMSSY0.&lt;/P&gt;&lt;P&gt;So, my if statments is not in procedure but screen event.&lt;/P&gt;&lt;P&gt;Anyway, I think this situation isn't good at all.&lt;/P&gt;&lt;P&gt;What I'm seeing is not true!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511765#M2004078</guid>
      <dc:creator>any2me_k</dc:creator>
      <dc:date>2022-01-07T14:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP debugger’s handling exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511766#M2004079</link>
      <description>&lt;P&gt;Yes. It should really quit debugging after the WRITE:/1 'TRUE'. instead of jumping to line WRITE:/1 'FALSE'. &lt;/P&gt;</description>
      <pubDate>Sun, 09 Jan 2022 19:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-s-handling-exception/m-p/12511766#M2004079</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-01-09T19:31:44Z</dc:date>
    </item>
  </channel>
</rss>

