<?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: Function module to display error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708744#M1296185</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;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  
DATA: LT_MESSAGES TYPE TABLE OF BDCMSGCOLL,
      LS_MESSAGES TYPE BDCMSGCOLL.

        CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = LS_MESSAGES-MSGID
          LANG      = '-D'
          NO        = LS_MESSAGES-MSGNR
          V1        = LS_MESSAGES-MSGV1
          V2        = LS_MESSAGES-MSGV2
          V3        = LS_MESSAGES-MSGV3
          V4        = LS_MESSAGES-MSGV4
        IMPORTING
          MSG       = LV_MESSAGE
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vishnu Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2009 15:20:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-28T15:20:05Z</dc:date>
    <item>
      <title>Function module to display error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708741#M1296182</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 want to display a &lt;STRONG&gt;error message popup&lt;/STRONG&gt;.  and that pop up message should hold a&lt;/P&gt;&lt;P&gt;series of messages not a single message.  i.e  i should have a internal table where i can fill&lt;/P&gt;&lt;P&gt;all my msgid, msgno record by record. so that it will be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 15:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708741#M1296182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-28T15:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to display error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708742#M1296183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To best suit your requirement, create a custom pop up screen in your program and write the error messages onto it as you need. This will also give you lot of formatting options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Nilesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 15:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708742#M1296183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-28T15:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to display error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708743#M1296184</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;do the follwing to display list of messages in pop-up..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

"Initialize one time...
* Initialize the messages
  CALL FUNCTION 'MESSAGES_INITIALIZE'
    EXCEPTIONS
      log_not_active       = 1
      wrong_identification = 2
      OTHERS               = 3.

"append all error warning messages to below function module
      PERFORM store_messages USING 'E'
                                   w_pn
                                   w_batch2
                                   w_werks
                                   ' '
                                   w_msgno.

FORM store_messages USING p_msgty
                          p_msgv1
                          p_msgv2
                          p_msgv3
                          p_msgv4
                          p_txtnr.
  IF p_msgty EQ 'E'.
    w_err_fg = 'X'.
  ENDIF.
* Store the messages to be displayed
  CALL FUNCTION 'MESSAGE_STORE'
    EXPORTING
      arbgb                  = 'ZCCH001'
      msgty                  = p_msgty
      msgv1                  = p_msgv1
      msgv2                  = p_msgv2
      msgv3                  = p_msgv3
      msgv4                  = p_msgv4
      txtnr                  = p_txtnr
    EXCEPTIONS
      message_type_not_valid = 1
      not_active             = 2
      OTHERS                 = 3.

ENDFORM.                    " STORE_MESSAGES

"at lsat call the below function module to show the messages ata time..
* Display all the messages together on a pop up
  CALL FUNCTION 'MESSAGES_SHOW'
    EXPORTING
      show_linno         = ' '
    IMPORTING
      e_exit_command     = wa_exit_command
    EXCEPTIONS
      inconsistent_range = 1
      no_messages        = 2
      OTHERS             = 3.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 15:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708743#M1296184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-28T15:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to display error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708744#M1296185</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;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  
DATA: LT_MESSAGES TYPE TABLE OF BDCMSGCOLL,
      LS_MESSAGES TYPE BDCMSGCOLL.

        CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = LS_MESSAGES-MSGID
          LANG      = '-D'
          NO        = LS_MESSAGES-MSGNR
          V1        = LS_MESSAGES-MSGV1
          V2        = LS_MESSAGES-MSGV2
          V3        = LS_MESSAGES-MSGV3
          V4        = LS_MESSAGES-MSGV4
        IMPORTING
          MSG       = LV_MESSAGE
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vishnu Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 15:20:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-display-error/m-p/5708744#M1296185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-28T15:20:05Z</dc:date>
    </item>
  </channel>
</rss>

