<?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: BAPI_PO_CHANGE message error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108998#M1617239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabrica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Be sure that you are CLEARing all work-areas&amp;amp;variables and REFRESHing all internal tables Properly in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Don't use +IF sy-subrc = 0 + after BAPI call, instead check tl_return table for any error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table tl_return into wa_return with key type = 'E'.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  Call 'BAPI_TRANSACTION_ROLLBACK'&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  Call BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF you still get same problem, simple DEBUG and check that are all the variables, workares, int tables are cleared well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 01:46:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-24T01:46:49Z</dc:date>
    <item>
      <title>BAPI_PO_CHANGE message error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108996#M1617237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem when calling the BAPI_PO_CHANGE in loop to update the field EREKZ (Final Invoice) from ME22N. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follows the logic... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_PO_CHANGE' &lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;purchaseorder = vl_po_number &lt;/P&gt;&lt;P&gt;TABLES &lt;/P&gt;&lt;P&gt;Return = tl_return &lt;/P&gt;&lt;P&gt;poitem = tl_poitem &lt;/P&gt;&lt;P&gt;poitemx = tl_poitemx. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0 . &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' &lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;wait = c_x &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh (all structures and table)... &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;Today the program works nice, blocking all PO correctly (field EREKZ)... &lt;/P&gt;&lt;P&gt;But, if one PO return some error for internal table, all PO subsequent too will have some error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need so much of help, &lt;/P&gt;&lt;P&gt;Please, somebody knows what's happening? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 19:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108996#M1617237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-23T19:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_CHANGE message error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108997#M1617238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give the details of the error that one PO or all PO's have come up with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 20:21:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108997#M1617238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-23T20:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_CHANGE message error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108998#M1617239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabrica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Be sure that you are CLEARing all work-areas&amp;amp;variables and REFRESHing all internal tables Properly in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Don't use +IF sy-subrc = 0 + after BAPI call, instead check tl_return table for any error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table tl_return into wa_return with key type = 'E'.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  Call 'BAPI_TRANSACTION_ROLLBACK'&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  Call BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF you still get same problem, simple DEBUG and check that are all the variables, workares, int tables are cleared well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 01:46:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108998#M1617239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-24T01:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_CHANGE message error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108999#M1617240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Diwakar, thank you so much,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did what you said and it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follows what I did...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data of PO are allocated in MEMORY ID..&lt;/P&gt;&lt;P&gt;Then I created a new report only with the BAPI_PO_CHANGE that import the data from MEMORY ID. &lt;/P&gt;&lt;P&gt;This happens for each loop from the main program that calls the program thought of SUBMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program now is working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm really thankful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vostan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 17:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change-message-error/m-p/8108999#M1617240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-24T17:00:23Z</dc:date>
    </item>
  </channel>
</rss>

