<?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: Message store in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528979#M241925</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For those of you who thought that sy-subrc value will change on error, do the following. Create a simple function module, which does not have any importing, exporting parameters, and will throw an exception, say ABC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the following statement inside the function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message e398(00).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call this function module from your Program, and see what happens. Your program will be stuck up after the function module throws the error and you will not be able to do anything about it. Since after the error, the program execution stops, the flow will not come to the statement "IF SY-SUBRC NE 0." statement at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Aug 2006 17:59:45 GMT</pubDate>
    <dc:creator>Juwin</dc:creator>
    <dc:date>2006-08-15T17:59:45Z</dc:date>
    <item>
      <title>Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528971#M241917</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 have a code which calls standard function module. The standard function module outputs messages using the message statement. So, if an error occurs in the function module, it does not return me back anything through the program, but just gives out an error message, which I would not be aware of through my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to activate any memory log, so that whenever such error/ warning messages happen in the standard function module, then message will be sent to the log, and when the control returns to my program, I can read the message log, and call the appropriate handler from my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 15:40:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528971#M241917</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2006-08-15T15:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528972#M241918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;which standard function module are you calling in your ABAP ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 15:45:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528972#M241918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T15:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528973#M241919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;L_TO_CREATE_SINGLE is the function module. But the solution should not be this function module specific. I have come across this situation with other function modules also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 15:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528973#M241919</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2006-08-15T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528974#M241920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please send the code u have written ? &lt;/P&gt;&lt;P&gt;I guess you have not uncommented the Exceptions in the function modules .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Yogesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 16:05:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528974#M241920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T16:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528975#M241921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THe function module raise exception with message for errors. After function call try the following code or use the system variables in code to get message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_msg(255).&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4&lt;/P&gt;&lt;P&gt;            into v_msg.&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;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 16:10:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528975#M241921</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-08-15T16:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528976#M241922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function module just does not throw any exception. It gives out an error message and stops right there. I would rather prefer the function module to throw an exception and let me handle the error in my own way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am using is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM create_to .&lt;/P&gt;&lt;P&gt;  CLEAR v_tanum.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'L_TO_CREATE_SINGLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_lgnum               = v_0200data-lgnum&lt;/P&gt;&lt;P&gt;      i_bwlvs               = v_0200data-bwlvs&lt;/P&gt;&lt;P&gt;      i_matnr               = v_0200data-matnr&lt;/P&gt;&lt;P&gt;      i_werks               = v_0200data-werks&lt;/P&gt;&lt;P&gt;      i_lgort               = v_0200data-lgort&lt;/P&gt;&lt;P&gt;      i_anfme               = v_0200data-qnty&lt;/P&gt;&lt;P&gt;      i_altme               = v_0200data-uom&lt;/P&gt;&lt;P&gt;      i_squit               = 'X'&lt;/P&gt;&lt;P&gt;      i_wempf               = v_0200data-recipient&lt;/P&gt;&lt;P&gt;      i_vlenr               = v_storageunit&lt;/P&gt;&lt;P&gt;      i_nltyp               = v_0200data-sttype&lt;/P&gt;&lt;P&gt;      i_nlpla               = v_0200data-destbin&lt;/P&gt;&lt;P&gt;      i_update_task         = 'X'&lt;/P&gt;&lt;P&gt;      i_commit_work         = space&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_tanum               = v_tanum&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      no_to_created         = 1&lt;/P&gt;&lt;P&gt;      bwlvs_wrong           = 2&lt;/P&gt;&lt;P&gt;      betyp_wrong           = 3&lt;/P&gt;&lt;P&gt;      benum_missing         = 4&lt;/P&gt;&lt;P&gt;      betyp_missing         = 5&lt;/P&gt;&lt;P&gt;      foreign_lock          = 6&lt;/P&gt;&lt;P&gt;      vltyp_wrong           = 7&lt;/P&gt;&lt;P&gt;      vlpla_wrong           = 8&lt;/P&gt;&lt;P&gt;      vltyp_missing         = 9&lt;/P&gt;&lt;P&gt;      nltyp_wrong           = 10&lt;/P&gt;&lt;P&gt;      nlpla_wrong           = 11&lt;/P&gt;&lt;P&gt;      nltyp_missing         = 12&lt;/P&gt;&lt;P&gt;      rltyp_wrong           = 13&lt;/P&gt;&lt;P&gt;      rlpla_wrong           = 14&lt;/P&gt;&lt;P&gt;      rltyp_missing         = 15&lt;/P&gt;&lt;P&gt;      squit_forbidden       = 16&lt;/P&gt;&lt;P&gt;      manual_to_forbidden   = 17&lt;/P&gt;&lt;P&gt;      letyp_wrong           = 18&lt;/P&gt;&lt;P&gt;      vlpla_missing         = 19&lt;/P&gt;&lt;P&gt;      nlpla_missing         = 20&lt;/P&gt;&lt;P&gt;      sobkz_wrong           = 21&lt;/P&gt;&lt;P&gt;      sobkz_missing         = 22&lt;/P&gt;&lt;P&gt;      sonum_missing         = 23&lt;/P&gt;&lt;P&gt;      bestq_wrong           = 24&lt;/P&gt;&lt;P&gt;      lgber_wrong           = 25&lt;/P&gt;&lt;P&gt;      xfeld_wrong           = 26&lt;/P&gt;&lt;P&gt;      date_wrong            = 27&lt;/P&gt;&lt;P&gt;      drukz_wrong           = 28&lt;/P&gt;&lt;P&gt;      ldest_wrong           = 29&lt;/P&gt;&lt;P&gt;      update_without_commit = 30&lt;/P&gt;&lt;P&gt;      no_authority          = 31&lt;/P&gt;&lt;P&gt;      material_not_found    = 32&lt;/P&gt;&lt;P&gt;      lenum_wrong           = 33&lt;/P&gt;&lt;P&gt;      OTHERS                = 34.&lt;/P&gt;&lt;P&gt;&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;    PERFORM err_message USING 7.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    IF v_tanum IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;      PERFORM err_message USING 8.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  LEAVE TO TRANSACTION sy-tcode.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " create_to&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 17:30:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528976#M241922</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2006-08-15T17:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528977#M241923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If function module fails because of any case failure, it will raise an exception.&lt;/P&gt;&lt;P&gt;After FUNCTION CALL, check SY-SUBRC value. It should vary between 1 - 34 based upon corresponding exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code, add a check to see the SY_SUBRC value and populate error message accordingly.&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;  case sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     when 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     when 2.&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;   endcase.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 17:48:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528977#M241923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T17:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528978#M241924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved the problem myself. Luckily the function module was RFC enabled. So I called the function in a separate task, so the function module when throws error, will not effect my screen and I will get the sy-subrc value changed after the call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 17:55:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528978#M241924</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2006-08-15T17:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528979#M241925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For those of you who thought that sy-subrc value will change on error, do the following. Create a simple function module, which does not have any importing, exporting parameters, and will throw an exception, say ABC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the following statement inside the function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message e398(00).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call this function module from your Program, and see what happens. Your program will be stuck up after the function module throws the error and you will not be able to do anything about it. Since after the error, the program execution stops, the flow will not come to the statement "IF SY-SUBRC NE 0." statement at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 17:59:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528979#M241925</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2006-08-15T17:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528980#M241926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dude :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its very simple , just add the line ERROR_MESSAGE = 32 under your exceptions, you will get the control back to your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had encountered the same earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you still find dofficulty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Aug 2006 19:41:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528980#M241926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-15T19:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528981#M241927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep.. abaper_user is great... That was, what I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 12:53:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528981#M241927</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2006-08-16T12:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Message store</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528982#M241928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPUser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its kind of interesting what you have said. We faced the same issue discussed in this thread and after a lot of struggle found a relief through your answer... Now the control comes back to the calling program and also we can handle the exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the question is, what is the significance of adding  ERROR_MESSAGE = 32  in our exceptions? How that works... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 20:56:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-store/m-p/1528982#M241928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T20:56:23Z</dc:date>
    </item>
  </channel>
</rss>

