<?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 Task issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065434#M1613098</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;did you call BAPI_TRANSACTION_COMMIT after the change?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Aug 2011 06:40:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-10T06:40:53Z</dc:date>
    <item>
      <title>Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065433#M1613097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using BAPI BAPI_PO_CHANGE for chnaging PO Prices with in a Pricing Routine related to Sales Order processing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the Po is not getting changed until it is been declared as shown below (in background Mode).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'BAPI_PO_CHANGE' IN BACKGROUND TASK&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            purchaseorder  = lw_po-ebeln&lt;/P&gt;&lt;P&gt;            poheader       = lw_poheader&lt;/P&gt;&lt;P&gt;            poheaderx      = lw_poheaderx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any please suggest if there is any alternative to fix the above issue,I just want to call the BAPI as it is like below and it should work.&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  = lw_po-ebeln&lt;/P&gt;&lt;P&gt;            poheader       = lw_poheader&lt;/P&gt;&lt;P&gt;            poheaderx      = lw_poheaderx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Natasha SS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 06:33:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065433#M1613097</guid>
      <dc:creator>former_member423024</dc:creator>
      <dc:date>2011-08-10T06:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065434#M1613098</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;did you call BAPI_TRANSACTION_COMMIT after the change?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 06:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065434#M1613098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T06:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065435#M1613099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope.As it is some sort of Enhancement program that will trigger during sales Order Change..I didn't use  the  FM for commiting the Database.&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;Natasha SS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 06:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065435#M1613099</guid>
      <dc:creator>former_member423024</dc:creator>
      <dc:date>2011-08-10T06:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065436#M1613100</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;an enhancement during order update? So maybe your change is overwritten after then?&lt;/P&gt;&lt;P&gt;Can't you modify any variables available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 06:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065436#M1613100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T06:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065437#M1613101</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 to updated/change PO data directly using Modify keyword. check the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_header into wa_header.&lt;/P&gt;&lt;P&gt;modify DATABASE_TABLE from wa_header.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_item into wa_item where PURCHASEORDER = wa_header-PURCHASEORDER.&lt;/P&gt;&lt;P&gt;modify DATABASE_TABLE from wa_item.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_item.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_header.&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;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 07:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065437#M1613101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T07:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065438#M1613102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Natasha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the BAPI documentation the changes to the PO will be written to the DB only if you call 'BAPI_TRANSACTION_COMMIT'. Infact this is a good BAPI programming practice &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;As it is some sort of Enhancement program that will trigger during sales Order Change..I didn't use the FM for commiting the Database&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course you should not interrupt the ongoing LUW with a COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you're using IN BACKGROUND TASK addition, the RFC call is registered in the system tables &amp;amp; is executed once the LUW is completed by a COMMIT WORK. So in your case PO gets updated when the Sales Order Change LUW is completed!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 07:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065438#M1613102</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-08-10T07:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065439#M1613103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is actually the BAPI is working only when it is been called IN BACKGROUND TASK...I need to make it work with out calling in Background Mode..&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;Natasha SS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 07:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065439#M1613103</guid>
      <dc:creator>former_member423024</dc:creator>
      <dc:date>2011-08-10T07:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065440#M1613104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; My issue is actually the BAPI is working only when it is been called IN BACKGROUND TASK&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My previous post should answer why it is working with IN BACKGROUND TASK addition!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I need to make it work with out calling in Background Mode.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Why? What is the business requirement you want to achieve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 08:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065440#M1613104</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-08-10T08:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065441#M1613105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great.Your are correct that it would work with an Update Function Module or in Background Mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now the Problem is incase if  we use "IN BACKGROUND MODE" it will be tough to capture the Messages..(TABLES&lt;/P&gt;&lt;P&gt;            return         = lt_return&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_PO_CHANGE' IN BACKGROUND TASK&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            purchaseorder  = lw_po-ebeln&lt;/P&gt;&lt;P&gt;            poheader       = lw_poheader&lt;/P&gt;&lt;P&gt;            poheaderx      = lw_poheaderx&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            return         = lt_return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, Can you suggest how to handle it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Natasha SS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 09:28:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065441#M1613105</guid>
      <dc:creator>former_member423024</dc:creator>
      <dc:date>2011-08-10T09:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065442#M1613106</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;you could create a new FM that get's called in background and that calls and captures BAPI_PO_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question beside: which kind of enhancement do you use in po update?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 09:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065442#M1613106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T09:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065443#M1613107</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;we can create an update FM in Background Task and call BAPI, But in that case BAPI_PO_CHANGE can not throw the messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the problem is to capture the error messages even if teh BAPI is called in background Mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Natasha SS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 10:20:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065443#M1613107</guid>
      <dc:creator>former_member423024</dc:creator>
      <dc:date>2011-08-10T10:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Task issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065444#M1613108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the idea is to start a parallel LUW &amp;amp; commit the changes in that disjoint LUW. A use-case for asynch RFC(aRFC)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a custom RFM to wrap the BAPI_PO_CHANGE &amp;amp; BAPI_TRANSACTION_COMMIT and start the custom RFM as an aRFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But bear in mind that an aRFC triggers a database commit in the calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 10:36:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-task-issue/m-p/8065444#M1613108</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-08-10T10:36:23Z</dc:date>
    </item>
  </channel>
</rss>

