<?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: Execution of BAPI inside BADI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272195#M1632994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the method &lt;STRONG&gt;AFTER_SAVE&lt;/STRONG&gt; is triggered after the commit work of the transaction then the record will not be saved if you execute the function in background task, to check if this is the case add a bapi_transaction_commit after the bapi call. First of all let us know what is the badi you are using and the standard transaction being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2011 09:40:21 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2011-10-27T09:40:21Z</dc:date>
    <item>
      <title>Execution of BAPI inside BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272192#M1632991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented  BAPI_RE_CN_CREATE inside a BADI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax that I use is CALL FUNCTION BAPI_RE_CN_CREATE IN BACKGROUND TASK. I used "IN BACKGROUND TASK" because without that, the function keeps on looping. After adding the command, the BAPI works. Here is my question, how can I retrieve immediately the contract number that the BAPI created? I hope you can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 08:22:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272192#M1632991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-27T08:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of BAPI inside BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272193#M1632992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by function keeps on looping ? Could you please explain the neccesity of the return value ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return value( contract number ) will be available in database if the transaction gets executed successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 08:28:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272193#M1632992</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-27T08:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of BAPI inside BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272194#M1632993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kesav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We put the BADI in AFTER_SAVE Method. The code is like this......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-ucomm = 'TRANS_NEXT'.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION BAPI_RE_CN_CREATE&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;          .&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;When the the system reach at CALL FUNCTION part, it does'nt execute it and it jumps back to "IF" condition part. We look for solution in the forum and someone suggest to put "IN BACKGROUND TASK" and we didi that. It works actually. But after excuting the CALL FUNCTION and search the contract that was save in VICNCN table, it was not updated yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUr scenario is that we want to know what is the contract number being created after the CALL FUNCTION module because we have another requirement that we will use that field after creating the contract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 08:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272194#M1632993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-27T08:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of BAPI inside BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272195#M1632994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the method &lt;STRONG&gt;AFTER_SAVE&lt;/STRONG&gt; is triggered after the commit work of the transaction then the record will not be saved if you execute the function in background task, to check if this is the case add a bapi_transaction_commit after the bapi call. First of all let us know what is the badi you are using and the standard transaction being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 09:40:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execution-of-bapi-inside-badi/m-p/8272195#M1632994</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2011-10-27T09:40:21Z</dc:date>
    </item>
  </channel>
</rss>

