<?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: Question on BAPI_Agreements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474055#M1555466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running into this same issue.  I've isolated it here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 IF NOT sv_bon_enh_available IS INITIAL AND
         ( sv_bon_enh_target_assign_done IS INITIAL OR
           NOT i_new_reference IS INITIAL ).
        ASSIGN COMPONENT 'BON_ENH_VAKEY' OF STRUCTURE
               c_konadb TO &amp;lt;g_kona_bon_enh_vakey&amp;gt;.
        IF sy-subrc NE 0.
          CLEAR sv_bon_enh_available.
        ENDIF.
        ASSIGN COMPONENT 'BON_ENH_INDIRECT' OF STRUCTURE
               c_konadb TO &amp;lt;g_kona_bon_enh_indirect&amp;gt;.
        IF sy-subrc NE 0.
          CLEAR sv_bon_enh_available.
        ENDIF.
        ASSIGN COMPONENT 'BON_ENH_PERIOD_S' OF STRUCTURE
               c_konadb TO &amp;lt;g_kona_bon_enh_period_s&amp;gt;.
        IF sy-subrc NE 0.
          CLEAR sv_bon_enh_available.
        ENDIF.
        sv_bon_enh_target_assign_done = 'X'.
      ENDIF.
      IF NOT sv_bon_enh_available IS INITIAL.
        &amp;lt;g_kona_bon_enh_vakey&amp;gt; = &amp;lt;g_t6b1_bon_enh_vakey&amp;gt;.
        &amp;lt;g_kona_bon_enh_indirect&amp;gt; = &amp;lt;g_t6b1_bon_enh_indirect&amp;gt;.
        &amp;lt;g_kona_bon_enh_period_s&amp;gt; = &amp;lt;g_t6b1_bon_enh_period_s&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those are lines 83-106 of FM agr_fill_default, which is called by BAPI_AGREEMENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the sixth line up (101), sv_bon_enh_taget_assign_done is set to 'X'.  This flag doesn't get reset after the function module executes, so in the next iteration of the loop, it skips lines 86-100, leaving the g_kona_bon_enh field symbols unassigned, and causing the short dump.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no idea how to fix this.  Ideas, anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2011 00:06:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-29T00:06:26Z</dc:date>
    <item>
      <title>Question on BAPI_Agreements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474054#M1555465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;i am trying to create rebate agreements in SD, but encounter problems with the BAPI_Agreements. The problem occures when i create a loop to create multiple rebates...so in other words, i am calling the bapi multiple times. the error seems to have on the function module AGR_FILL_DEFAULT, which tries to assign a value to a field symbol but the field symbol is not defined. as  i said, this only happens on the second round of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried clearing the GT_TB61 object using a field symbol, i have tried COMMIT and WAIT, even the BAPI Commit functions...nothing seems to help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems like that there is something wrong with calling the function module multiple times. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please assist &amp;lt;removed by moderator&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 19, 2010 11:36 AM - priority normalized&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rajesh Dookkoo on Dec 20, 2010 11:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 10:15:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474054#M1555465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-19T10:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Question on BAPI_Agreements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474055#M1555466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running into this same issue.  I've isolated it here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 IF NOT sv_bon_enh_available IS INITIAL AND
         ( sv_bon_enh_target_assign_done IS INITIAL OR
           NOT i_new_reference IS INITIAL ).
        ASSIGN COMPONENT 'BON_ENH_VAKEY' OF STRUCTURE
               c_konadb TO &amp;lt;g_kona_bon_enh_vakey&amp;gt;.
        IF sy-subrc NE 0.
          CLEAR sv_bon_enh_available.
        ENDIF.
        ASSIGN COMPONENT 'BON_ENH_INDIRECT' OF STRUCTURE
               c_konadb TO &amp;lt;g_kona_bon_enh_indirect&amp;gt;.
        IF sy-subrc NE 0.
          CLEAR sv_bon_enh_available.
        ENDIF.
        ASSIGN COMPONENT 'BON_ENH_PERIOD_S' OF STRUCTURE
               c_konadb TO &amp;lt;g_kona_bon_enh_period_s&amp;gt;.
        IF sy-subrc NE 0.
          CLEAR sv_bon_enh_available.
        ENDIF.
        sv_bon_enh_target_assign_done = 'X'.
      ENDIF.
      IF NOT sv_bon_enh_available IS INITIAL.
        &amp;lt;g_kona_bon_enh_vakey&amp;gt; = &amp;lt;g_t6b1_bon_enh_vakey&amp;gt;.
        &amp;lt;g_kona_bon_enh_indirect&amp;gt; = &amp;lt;g_t6b1_bon_enh_indirect&amp;gt;.
        &amp;lt;g_kona_bon_enh_period_s&amp;gt; = &amp;lt;g_t6b1_bon_enh_period_s&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those are lines 83-106 of FM agr_fill_default, which is called by BAPI_AGREEMENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the sixth line up (101), sv_bon_enh_taget_assign_done is set to 'X'.  This flag doesn't get reset after the function module executes, so in the next iteration of the loop, it skips lines 86-100, leaving the g_kona_bon_enh field symbols unassigned, and causing the short dump.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no idea how to fix this.  Ideas, anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 00:06:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474055#M1555466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-29T00:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Question on BAPI_Agreements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474056#M1555467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer my own question, sv_bon_enh_taget_assign_done is declared as static, so SAP obviously meant for the FM to work this way.  It seems the issue stems from calling BAPI_AGREEMENTS within a loop.  Rather than creating the agreements one at a time by iterating through the loop, if we load all of the agreements into an internal table and pass that, they are all created at once and the shortdump is avoided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 13:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-bapi-agreements/m-p/7474056#M1555467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-29T13:38:38Z</dc:date>
    </item>
  </channel>
</rss>

