<?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: Code inspector error with exception in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510088#M1423375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;guess there are no Exceptions defined here.&lt;/P&gt;&lt;P&gt;so u can go with the condition return table is initial or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jan 2010 06:15:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-01T06:15:49Z</dc:date>
    <item>
      <title>Code inspector error with exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510086#M1423373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have below code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
 IF P_SUMM = C_ON.
   CALL FUNCTION 'ZSD_REPORT_HEADER'             "Write std Nike header
         EXPORTING
              PROGRAM   =  V_PROGRAM
              LINE_SIZE =  SY-LINSZ
              RUN_DATE  =  V_DATE
              RUN_TIME  =  V_TIME
              TITLE_1   =  TEXT-025
              TITLE_5   = '1424'
              PAGE_NO   =  SY-PAGNO.
   IF SY-SUBRC &amp;lt;&amp;gt; 0.
     WRITE: 'Problem with ZSI_REPORT_HEADER'(019).
   ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However in the code inspector it is giving  error :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Program ZSDR_TOP_ACC  Include ZSDR_TOP_ACC Row 988 Column 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No EXCEPTION to set SY_SUBRC Declared for CALL FUNCTION 'ZSI_REPORT_HEADER'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thus the value of SY-SUBRC is always 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest me how to eleminate error.  YOUR Helpis highy appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and happy new year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:34 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 06:00:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510086#M1423373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T06:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Code inspector error with exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510087#M1423374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy new year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that in your function module 'ZSD_REPORT_HEADER'  exceptions are not defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check this in exception tab of 'ZSD_REPORT_HEADER' in SE37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence , this FM will always return sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO, instead of checking sy-subrc , check the return internal tables for initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 06:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510087#M1423374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T06:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code inspector error with exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510088#M1423375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;guess there are no Exceptions defined here.&lt;/P&gt;&lt;P&gt;so u can go with the condition return table is initial or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 06:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510088#M1423375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T06:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Code inspector error with exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510089#M1423376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the reasons are already explained by the above users.&lt;/P&gt;&lt;P&gt;But see, i guess as per your coding standards you have added the sy-subrc check.. which is a good practice for standard function modules so as to check the correctness of the execution.. as i can see its a ZFM, you can better keep some exceptions to your FM and add the sy-subrc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if you do not want to change the zfm,  just remove the sy-subrc check...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 06:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510089#M1423376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T06:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Code inspector error with exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510090#M1423377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have not added Exceptions to your function module.But you have included sy-subrc check after the function call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Irrespective of whether your function module successfully executed or not sy-subrc will always be zero.Put some exceptions in your function module and then go for a sy-subrc check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 07:18:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510090#M1423377</guid>
      <dc:creator>former_member209217</dc:creator>
      <dc:date>2010-01-01T07:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Code inspector error with exception</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510091#M1423378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'ZSI_REPORT_HEADER'               &lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              PROGRAM   =  V_PROGRAM&lt;/P&gt;&lt;P&gt;              LINE_SIZE =  SY-LINSZ&lt;/P&gt;&lt;P&gt;              RUN_DATE  =  V_DATE&lt;/P&gt;&lt;P&gt;              RUN_TIME  =  V_TIME&lt;/P&gt;&lt;P&gt;              TITLE_1   =  TEXT-016&lt;/P&gt;&lt;P&gt;              TITLE_5   = '1425'&lt;/P&gt;&lt;P&gt;              PAGE_NO   =  SY-PAGNO&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;ADD Exceptions even the FM does not have exceptions.&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;OTHERS    = 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;IF SY-SUBRC NE 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;WRITE: 'Problem with ZSI_REPORT_HEADER'(028).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can add exception like above even though the exception was not declared in Function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2010 19:02:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-inspector-error-with-exception/m-p/6510091#M1423378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-01T19:02:49Z</dc:date>
    </item>
  </channel>
</rss>

