<?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: doubt in exception in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428297#M823501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The foll piece in ur Report defines the sy-subrc value for an exception...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTION_A = 1&lt;/P&gt;&lt;P&gt;EXCEPTION_B = 2&lt;/P&gt;&lt;P&gt;EXCEPTION_C = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more clear....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EXCEPTION_A  is raised by the FM , then sy-subrc = 1 in ur report.&lt;/P&gt;&lt;P&gt;if EXCEPTION_B  is raised by the FM , then sy-subrc = 2 in ur report.&lt;/P&gt;&lt;P&gt;if EXCEPTION_C  is raised by the FM , then sy-subrc = 3 in ur report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so u can write like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC  = 1.&lt;/P&gt;&lt;P&gt;do whatever u want to do when EXCEPTION_A  is raised&lt;/P&gt;&lt;P&gt;ELSEif SY-SUBRC  = 2.&lt;/P&gt;&lt;P&gt;do whatever u want to do when EXCEPTION_B  is raised.&lt;/P&gt;&lt;P&gt;ELSEif SY-SUBRC  = 3.&lt;/P&gt;&lt;P&gt;do whatever u want to do when EXCEPTION_C  is raised.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;jose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jose on Feb 16, 2008 8:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Feb 2008 07:17:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-16T07:17:07Z</dc:date>
    <item>
      <title>doubt in exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428296#M823500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;FUNCTION Y_MODULE4.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:*&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"  IMPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"     VALUE(IT2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"  EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"     VALUE(IT1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"  EXCEPTIONS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"      EXCEPTION_A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"      EXCEPTION_B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"      EXCEPTION_C&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;write : / ' the global variable g1 =&amp;gt;', g1 color 5 centered.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it1 = g1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;write: / 'it1 = &amp;gt;', it1 color 7 centered.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;write: / 'it2 = &amp;gt;', it2 color 6 centered.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case it2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;when 'A'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;raise exception_A.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;when 'B'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;raise exception_B.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;when 'C'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;raise exception_C.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endcase.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDFUNCTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;REPORT  YSUSFUN2.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data getogether(10) .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALL FUNCTION 'Y_MODULE4'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;  &lt;EM&gt;EXPORTING&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;IT2               =  'h'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;IMPORTING&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;   &lt;EM&gt;IT1               = getogether&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;EXCEPTIONS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;EM&gt;EXCEPTION_A       = 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;   &lt;EM&gt;EXCEPTION_B       = 2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;   &lt;EM&gt;EXCEPTION_C       = 3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;   &lt;EM&gt;OTHERS            = 4         .&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*   values assigned to export parameters are not copied back to the&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*calling program&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;   &lt;EM&gt;write:/ ' getogether=&amp;gt;', getogether color 7.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;write:/ 'sy-subrc = ', sy-subrc color 7.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ELSE.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;write: / 'sy-subrc =', sy-subrc color 7.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ENDIF.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above program is a functional module and calling program. i am import the it2 as 'H'. it is not compatible with when clause in the functional module. it returns to the calling program and i want to print the others values ie 4 in the sy-subrc . say it is possible. if it is possible .say where  i can include the statement.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 07:01:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428296#M823500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T07:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428297#M823501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The foll piece in ur Report defines the sy-subrc value for an exception...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTION_A = 1&lt;/P&gt;&lt;P&gt;EXCEPTION_B = 2&lt;/P&gt;&lt;P&gt;EXCEPTION_C = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more clear....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EXCEPTION_A  is raised by the FM , then sy-subrc = 1 in ur report.&lt;/P&gt;&lt;P&gt;if EXCEPTION_B  is raised by the FM , then sy-subrc = 2 in ur report.&lt;/P&gt;&lt;P&gt;if EXCEPTION_C  is raised by the FM , then sy-subrc = 3 in ur report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so u can write like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC  = 1.&lt;/P&gt;&lt;P&gt;do whatever u want to do when EXCEPTION_A  is raised&lt;/P&gt;&lt;P&gt;ELSEif SY-SUBRC  = 2.&lt;/P&gt;&lt;P&gt;do whatever u want to do when EXCEPTION_B  is raised.&lt;/P&gt;&lt;P&gt;ELSEif SY-SUBRC  = 3.&lt;/P&gt;&lt;P&gt;do whatever u want to do when EXCEPTION_C  is raised.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;jose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jose on Feb 16, 2008 8:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 07:17:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428297#M823501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T07:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428298#M823502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i got it. thanks &lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;surender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 07:28:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-exception/m-p/3428298#M823502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T07:28:38Z</dc:date>
    </item>
  </channel>
</rss>

