<?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 Refresh Global table in BAPI_AGREEMENTS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-global-table-in-bapi-agreements/m-p/10392879#M1841843</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;I am using the BAPI 'BAPI_AGREEMENTS' to create multiple Rebate Agreements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I call the BAPI for the first time, it works perfectly and created the Rebate Agreement document. But when I call the BAPI for the second time, it results in a dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for the dump is that, within this BAPI, the Function Module 'AGR_FILL_DEFAULT' is called. It populates a Global internal table GT_T6B1 from table T6B1, after checking that the internal table GT_T6B1 is initial. Then it assigns values to certain Field-Symbols. These Field-Symbols are used later within this same Function Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first time the BAPI is called, the global internal table GT_T6B1 is indeed initial, and hence the Field-Symbols are assigned. But this global table is not refreshed within the BAPI. Hence, when the BAPI is called the second time, the Field-Symbol assignment does not take place. When the code tries to use the Field-Symbols, it results in a dump as the Field-Symbols have not been assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the BAPI 'BAPI_TRANSACTION_COMMIT' to commit the transaction after the BAPI is called. This ought to refresh all buffers, but it is not refreshing this internal table at least. I also called the Function 'BUFFER_REFRESH_ALL' explicitly within my program, but that also is not helping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any solutions for this problem? Please share your ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swagata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jul 2014 18:09:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-07-02T18:09:58Z</dc:date>
    <item>
      <title>Refresh Global table in BAPI_AGREEMENTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-global-table-in-bapi-agreements/m-p/10392879#M1841843</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;I am using the BAPI 'BAPI_AGREEMENTS' to create multiple Rebate Agreements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I call the BAPI for the first time, it works perfectly and created the Rebate Agreement document. But when I call the BAPI for the second time, it results in a dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for the dump is that, within this BAPI, the Function Module 'AGR_FILL_DEFAULT' is called. It populates a Global internal table GT_T6B1 from table T6B1, after checking that the internal table GT_T6B1 is initial. Then it assigns values to certain Field-Symbols. These Field-Symbols are used later within this same Function Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first time the BAPI is called, the global internal table GT_T6B1 is indeed initial, and hence the Field-Symbols are assigned. But this global table is not refreshed within the BAPI. Hence, when the BAPI is called the second time, the Field-Symbol assignment does not take place. When the code tries to use the Field-Symbols, it results in a dump as the Field-Symbols have not been assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the BAPI 'BAPI_TRANSACTION_COMMIT' to commit the transaction after the BAPI is called. This ought to refresh all buffers, but it is not refreshing this internal table at least. I also called the Function 'BUFFER_REFRESH_ALL' explicitly within my program, but that also is not helping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any solutions for this problem? Please share your ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swagata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 18:09:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-global-table-in-bapi-agreements/m-p/10392879#M1841843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-07-02T18:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh Global table in BAPI_AGREEMENTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-global-table-in-bapi-agreements/m-p/10392880#M1841844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a workaround and that was sufficient to solve my problem. I created all he Rebate Agreements at once by passing all Rebate Agreements data in the parameter TI_BAPIAGRMNT and called the BAPI a single time. This did not cause dump. Marking this question as closed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 10:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-global-table-in-bapi-agreements/m-p/10392880#M1841844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-07-04T10:07:14Z</dc:date>
    </item>
  </channel>
</rss>

