<?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: Capture PO errors to log table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665451#M615130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quality Inforecord is set up through config and if any material/ vendor combination does not have a QIR, SAP raises message say EX: 06 - message number 822.&lt;/P&gt;&lt;P&gt;I want to capture the material and vendor number and store it in Z table along with the error message for Business to later review and create QIR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if its possible to get list of already captured errors - to insert in Z table through User exit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2007 20:34:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-24T20:34:09Z</dc:date>
    <item>
      <title>Capture PO errors to log table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665449#M615128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please let me know if there is a way to capture SAP standard errors raised during PO creation into a Z log table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX: SAP raises Message 06, message number 882, is there a way to capture this error into a log table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2007 19:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665449#M615128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-24T19:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Capture PO errors to log table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665450#M615129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you want to capture the errors in log table. There is a way like see what validation standard sap is doing before throwing the errors and accordingly capture them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2007 19:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665450#M615129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-24T19:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Capture PO errors to log table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665451#M615130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quality Inforecord is set up through config and if any material/ vendor combination does not have a QIR, SAP raises message say EX: 06 - message number 822.&lt;/P&gt;&lt;P&gt;I want to capture the material and vendor number and store it in Z table along with the error message for Business to later review and create QIR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if its possible to get list of already captured errors - to insert in Z table through User exit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2007 20:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665451#M615130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-24T20:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Capture PO errors to log table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665452#M615131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In PO processing using ME21N/ME22N a lot messages are not issued individually, but are presented in a list in a pop-up window.  Not sure if this is true of the messages you want to capture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the following code implemented in the CHECK method of "ME_PROCESS_PO_CUST" BADI, you will see it adds a customer message to this list using the macro MMPUR_MESSAGE from the MM_MESSAGES_MAC include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps there is also a macro for reading the messages.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if not, the macro code should show how you could read them and then you could place code in this user exit to get the messages and log the relevent ones to a Z table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;METHOD if_ex_me_process_po_cust~check.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;NB: Add Type Group MMMFD to implementing class properties tab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lt_items TYPE purchase_order_items,&lt;/P&gt;&lt;P&gt;l_item_wa TYPE purchase_order_item,&lt;/P&gt;&lt;P&gt;l_item TYPE mepoitem,&lt;/P&gt;&lt;P&gt;l_total TYPE brtwr,&lt;/P&gt;&lt;P&gt;l_matkl TYPE matkl,&lt;/P&gt;&lt;P&gt;l_flag TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE mm_messages_mac. "useful macros for message handling&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: l_total, l_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD im_header-&amp;gt;get_items&lt;/P&gt;&lt;P&gt;RECEIVING&lt;/P&gt;&lt;P&gt;re_items = lt_items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Loop through items and calculate total&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT lt_items INTO l_item_wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD l_item_wa-item-&amp;gt;get_data&lt;/P&gt;&lt;P&gt;RECEIVING&lt;/P&gt;&lt;P&gt;re_data = l_item.&lt;/P&gt;&lt;P&gt;l_matkl = l_item-matkl.&lt;/P&gt;&lt;P&gt;l_total = l_total + l_item-brtwr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if any lines missing contract number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF l_item-konnr IS INITIAL.&lt;/P&gt;&lt;P&gt;l_flag = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&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;IF l_flag = 'X'.&lt;/P&gt;&lt;P&gt;IF l_total &amp;gt; 5000.&lt;/P&gt;&lt;P&gt;mmpur_metafield mmmfd_agreement.&lt;/P&gt;&lt;P&gt;mmpur_message 'E' '06' '999'&lt;/P&gt;&lt;P&gt;'Purchase order over $5000.00 requires a contract' '' '' ''.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invalidate the object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD im_header-&amp;gt;invalidate( ).&lt;/P&gt;&lt;P&gt;LOOP AT lt_items INTO l_item_wa.&lt;/P&gt;&lt;P&gt;CALL METHOD l_item_wa-item-&amp;gt;invalidate( ).&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD. &lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is of some use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Aug 2007 08:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665452#M615131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-26T08:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Capture PO errors to log table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665453#M615132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andrew, Will look into it. Hopefully this solves the issue. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 12:12:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-po-errors-to-log-table/m-p/2665453#M615132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T12:12:46Z</dc:date>
    </item>
  </channel>
</rss>

