<?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: Messages. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223310#M477523</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;    Triggering Exceptions with Messages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use messages in function modules and methods with the addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... RAISING &amp;lt;exc&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the way in which the message is handled depends on whether the calling program handles the exception &amp;lt;exc&amp;gt; or not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the calling program does not handle the exception, the message is displayed and handled according to the context in which it occurs in the function module or method from which it was called. &lt;/P&gt;&lt;P&gt;If the calling program handles the exception, the message is not displayed. Instead, the procedure is interrupted in accordance with the message type, and processing returns to the calling program. The contents of the message are placed in the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Catching Message in the Calling Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can catch messages from function modules that are not sent using the RAISING addition in the MESSAGE statement by including the implicit exception ERROR_MESSAGE in the EXCEPTIONS list of the CALL FUNCTION statement. The following conditions apply: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type S, I, and W messages are ignored (but logged during background processing) &lt;/P&gt;&lt;P&gt;Type E and A messages trigger the exception ERROR_MESSAGE &lt;/P&gt;&lt;P&gt;Type X messages trigger the usual runtime error and short dump. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 May 2007 10:19:45 GMT</pubDate>
    <dc:creator>former_member673464</dc:creator>
    <dc:date>2007-05-11T10:19:45Z</dc:date>
    <item>
      <title>Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223307#M477520</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;I am using FM REUSE_ALV_GRID_DISPLAY.Whenever there is any exception that is raised, the program goes to dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to display a message whenever an exception is caused.How can I stop the program form going to dump and give a proper message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223307#M477520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T10:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223308#M477521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After executing FM Check the sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****Give your message.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223308#M477521</guid>
      <dc:creator>Santosh_Kezkhepatmelathil</dc:creator>
      <dc:date>2007-05-11T10:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223309#M477522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What might be the situation is that u are calling the Function using Pattern button.&lt;/P&gt;&lt;P&gt;In this case, the MESSAGE statement in the condition IF SY-SUBRC &amp;lt;&amp;gt; 0. is generally commented. what u can do is just uncomment that. In this case whenever SY-SUBRC &amp;lt;&amp;gt; 0, the message will displayed accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:19:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223309#M477522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T10:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223310#M477523</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;    Triggering Exceptions with Messages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use messages in function modules and methods with the addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... RAISING &amp;lt;exc&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the way in which the message is handled depends on whether the calling program handles the exception &amp;lt;exc&amp;gt; or not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the calling program does not handle the exception, the message is displayed and handled according to the context in which it occurs in the function module or method from which it was called. &lt;/P&gt;&lt;P&gt;If the calling program handles the exception, the message is not displayed. Instead, the procedure is interrupted in accordance with the message type, and processing returns to the calling program. The contents of the message are placed in the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Catching Message in the Calling Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can catch messages from function modules that are not sent using the RAISING addition in the MESSAGE statement by including the implicit exception ERROR_MESSAGE in the EXCEPTIONS list of the CALL FUNCTION statement. The following conditions apply: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type S, I, and W messages are ignored (but logged during background processing) &lt;/P&gt;&lt;P&gt;Type E and A messages trigger the exception ERROR_MESSAGE &lt;/P&gt;&lt;P&gt;Type X messages trigger the usual runtime error and short dump. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:19:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223310#M477523</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2007-05-11T10:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223311#M477524</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;after calling that function module.write like this.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;write:/ 'problem occcured'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:19:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223311#M477524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T10:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223312#M477525</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 this.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;message i000 with 'Error'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223312#M477525</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-05-11T10:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223313#M477526</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;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    raise message e000(message class name) with 'exception occured'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223313#M477526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T10:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223314#M477527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HAI&lt;/P&gt;&lt;P&gt;1.u can try sy-subrc = 0 or not.&lt;/P&gt;&lt;P&gt;2.u check whether the internal table name  and tables names are correct.&lt;/P&gt;&lt;P&gt;3.whether they are exist.&lt;/P&gt;&lt;P&gt;4.reuse_alv_grid_display FM raises only program error.&lt;/P&gt;&lt;P&gt;it cannot raise other errors.&lt;/P&gt;&lt;P&gt;5. u uncomment exceptions  when u call FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;vennila&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223314#M477527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T10:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Messages.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223315#M477528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sandeep first check what kind of exceptionit is..&lt;/P&gt;&lt;P&gt;if it is related to sql then u can set it  in sy-subrc..&lt;/P&gt;&lt;P&gt;if it is not the case.. then define the exception on ur own...&lt;/P&gt;&lt;P&gt;give a no to exception and write a message for it  when that exception is raised then ur own message will be displayed...&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 10:49:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messages/m-p/2223315#M477528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T10:49:04Z</dc:date>
    </item>
  </channel>
</rss>

