<?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: Regarding capturing Error messages in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835912#M355771</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;Check this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_ERROR(50) OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: V_MESSAGE(50).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM LFA1&lt;/P&gt;&lt;P&gt;              WHERE VENDOR = P_LIFNR.&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the function module to format the message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ID              = '00'&lt;/P&gt;&lt;P&gt;   NO              = '398'&lt;/P&gt;&lt;P&gt;   V1              = 'Vendor don't exists'&lt;/P&gt;&lt;P&gt;   V2              = P_LIFNR&lt;/P&gt;&lt;P&gt;   V3              = ''&lt;/P&gt;&lt;P&gt;   V4              = ''&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   MSG             = V_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;append the error message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  T_ERROR = V_MESSAGE.&lt;/P&gt;&lt;P&gt;  APPEND T_ERROR.&lt;/P&gt;&lt;P&gt;&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;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display the error message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT T_ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / T_ERROR COLOR COL_NEGATIVE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2007 17:16:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-02T17:16:13Z</dc:date>
    <item>
      <title>Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835911#M355770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi every one,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i just had to create an internal table and capture the error messages ( like vendor not exists) when validation check fails and send these error messages to internal table and also to screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one please give me piece of code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 17:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835911#M355770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T17:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835912#M355771</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;Check this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_ERROR(50) OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: V_MESSAGE(50).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM LFA1&lt;/P&gt;&lt;P&gt;              WHERE VENDOR = P_LIFNR.&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the function module to format the message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ID              = '00'&lt;/P&gt;&lt;P&gt;   NO              = '398'&lt;/P&gt;&lt;P&gt;   V1              = 'Vendor don't exists'&lt;/P&gt;&lt;P&gt;   V2              = P_LIFNR&lt;/P&gt;&lt;P&gt;   V3              = ''&lt;/P&gt;&lt;P&gt;   V4              = ''&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   MSG             = V_MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;append the error message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  T_ERROR = V_MESSAGE.&lt;/P&gt;&lt;P&gt;  APPEND T_ERROR.&lt;/P&gt;&lt;P&gt;&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;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display the error message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT T_ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / T_ERROR COLOR COL_NEGATIVE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 17:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835912#M355771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T17:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835913#M355772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you narendran, but there are around 20 validation checks so do  u think i need to call this function module format_message for each validation check, i mean 20 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please revert back if you dont understand my concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;pavan kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 17:22:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835913#M355772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T17:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835914#M355773</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;FORMAT_MESSAGE is used to get the message for the corresponding message id, message no..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't want to use it..You can directly add the message to the error internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;SELECT SINGLE * FROM LFA1&lt;/P&gt;&lt;P&gt;WHERE VENDOR = P_LIFNR.&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;  CONCATENATE 'Vendor ' P_LIFNR ' not valid' into T_ERROR.&lt;/P&gt;&lt;P&gt;  APPEND T_ERROR.&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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 17:28:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835914#M355773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T17:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835915#M355774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your answer, do you also know how to send the captured error messages in internal table to user's outlook email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me regarding this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 17:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835915#M355774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T17:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835916#M355775</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;Please create a new thread for this question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 18:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835916#M355775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T18:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding capturing Error messages</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835917#M355776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i just posted my question as a new thread, if possible try to answer it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;P&gt; pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 18:31:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-capturing-error-messages/m-p/1835917#M355776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T18:31:56Z</dc:date>
    </item>
  </channel>
</rss>

