<?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 Calling a BAPI within a BAdi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011280#M958357</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;This is the problem: I'm using BAdi IF_EX_PROJECTDEF_UPDATE to get changes made to a project structure. I then call a BAPI to update some custom tables, but the problem is that the data isn't available until the BAdi (method) has finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that when my BAPI starts, the data it is looking for isn't in the tables yet. Is there any way to run the BAPI after the method has finished? I've tried by running it in update task and background but with no luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kulbir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jun 2008 13:29:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-16T13:29:38Z</dc:date>
    <item>
      <title>Calling a BAPI within a BAdi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011280#M958357</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;This is the problem: I'm using BAdi IF_EX_PROJECTDEF_UPDATE to get changes made to a project structure. I then call a BAPI to update some custom tables, but the problem is that the data isn't available until the BAdi (method) has finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that when my BAPI starts, the data it is looking for isn't in the tables yet. Is there any way to run the BAPI after the method has finished? I've tried by running it in update task and background but with no luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kulbir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 13:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011280#M958357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a BAPI within a BAdi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011281#M958358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In update task the database commit may not have been executed, but in "background" it should have been. Maybe there are some long time of response of your system (relatively) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your function module may begin with a select (with  all necessary DO, WAIT and ENDDO) to insure the database commit is at end before executing the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 14:05:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011281#M958358</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-06-16T14:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calling a BAPI within a BAdi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011282#M958359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing you can try is to build a 'WAIT' logic in the BAPI itself. You are saying that you are trying to update the data in your custom table and that data will be available only when your method is finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I assume that your data you want to update will be available via SELECT query and should be available &lt;/P&gt;&lt;P&gt; with in 10 min or so &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;Inside BAPI&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Do 10 times.&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;SELECT query to get the data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;          wait for 60 seconds.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   else. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;and In your BADI , &lt;STRONG&gt;Call You BAPI in BACKGROUND task.&lt;/STRONG&gt; The first commit after the background task call will trigger the eecution of your BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope this works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saket Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 19:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-a-bapi-within-a-badi/m-p/4011282#M958359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T19:42:34Z</dc:date>
    </item>
  </channel>
</rss>

