<?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: Sample code for BAPI - BAPI_CUSTOMERQUOTATION_CHANGE needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682769#M886824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for pointing out that I should have sent my code for quick replies. And ofcourse! I did call the 2nd func. module for COMMIT WORK...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guys, Its solved... I was using the flag as 'X' instead of 'U' in the field - CONDITIONS_INX-UPDATEFLAG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;sap fan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Apr 2008 12:53:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-16T12:53:25Z</dc:date>
    <item>
      <title>Sample code for BAPI - BAPI_CUSTOMERQUOTATION_CHANGE needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682765#M886820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need sample code for the BAPI: &lt;STRONG&gt;BAPI_CUSTOMERQUOTATION_CHANGE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My intention is to change the condition rate (KONV-KBETR) for a condition type (say KONV-KSCHL = ZXYZ) of all the Quotation items with some new values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reply at the earliest, as I need this code for my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincere thanks,&lt;/P&gt;&lt;P&gt;sap fan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 15:16:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682765#M886820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T15:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code for BAPI - BAPI_CUSTOMERQUOTATION_CHANGE needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682766#M886821</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;here is a sample!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

method delete_delivery_block.

  data: ls_vbak type vbak.
  data: ls_vbakkom type vbakkom.
  data: lt_vbpakom type table of vbpakom.
  data: ls_vbakkomx type vbakkomx.
*
  data: ls_header type bapisdh1.
  data: ls_headerx type bapisdh1x.
  data: lt_ret2 type table of bapiret2.
  data: lv_error type xfeld.
  field-symbols: &amp;lt;fs&amp;gt; type bapiret2.


  ls_header-dlv_block = new_block.
  ls_headerx-updateflag = 'U'.
  ls_headerx-dlv_block = 'X'.

*Possible UPDATEFLAGS:
*U = change
*D = delete
*I = add


  call function 'BAPI_CUSTOMERQUOTATION_CHANGE'
    exporting
      salesdocument                = me-&amp;gt;vbeln
      quotation_header_in          = ls_header
      quotation_header_inx         = ls_headerx
      simulation                   = testrun
*   BEHAVE_WHEN_ERROR            =
*   INT_NUMBER_ASSIGNMENT        =
*   LOGIC_SWITCH                 =
*   NO_STATUS_BUF_INIT           = ' '
    tables
      return                       = lt_ret2
*   QUOTATION_ITEM_IN            =
*   QUOTATION_ITEM_INX           =
*   PARTNERS                     =
*   PARTNERCHANGES               =
*   PARTNERADDRESSES             =
*   CONDITIONS_IN                =
*   CONDITIONS_INX               =
*   QUOTATION_CFGS_REF           =
*   QUOTATION_CFGS_INST          =
*   QUOTATION_CFGS_PART_OF       =
*   QUOTATION_CFGS_VALUE         =
*   QUOTATION_CFGS_BLOB          =
*   QUOTATION_CFGS_VK            =
*   QUOTATION_CFGS_REFINST       =
*   SCHEDULE_LINES               =
*   SCHEDULE_LINESX              =
*   QUOTATION_TEXT               =
*   QUOTATION_KEYS               =
*   EXTENSIONIN                  =
            .

  if testrun is initial.

    lv_error = zcl_bapi=&amp;gt;check_for_errors( lt_ret2 ).

    if lv_error is initial.
      commit work.
    endif.
  endif.

  loop at lt_ret2 assigning &amp;lt;fs&amp;gt;.
    &amp;lt;fs&amp;gt;-message_v1 = me-&amp;gt;vbeln.
  endloop.

  bapireturn[] = lt_ret2[].

endmethod.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 15:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682766#M886821</guid>
      <dc:creator>b_deterd2</dc:creator>
      <dc:date>2008-04-15T15:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code for BAPI - BAPI_CUSTOMERQUOTATION_CHANGE needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682767#M886822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the post Bert!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it will not help me, as I want to change the condition rate of items, and not looking for some other header level change. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me breifly tell you what I have tried: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I populated the fields: ITM_NUMBER, COND_ST_NO, COND_COUNT, COND_TYPE and COND_VALUE in the table CONDITIONS_IN. And CONDITIONS_INX with the respective fields...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flag 'U' wherever needed. &lt;/P&gt;&lt;P&gt;The function module runs succesfully but the changes values are not reflected in the Quotation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking for suitable reply still....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 05:08:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682767#M886822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T05:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code for BAPI - BAPI_CUSTOMERQUOTATION_CHANGE needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682768#M886823</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;Perform Commit by calling the bapi BAPI_TRANSACTION_COMMIT after the change bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does the saving work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also do send your code so that it will be easy fr us to find out where you might have gone wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Minimum specifications:&lt;/P&gt;&lt;P&gt;The quotation number must definitely be entered in the SALESDOCUMENT structure.&lt;/P&gt;&lt;P&gt;Always enter key fields when you make a change.&lt;/P&gt;&lt;P&gt;The update indicator QUOTATION_HEADER_INX must always be entered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Commit control&lt;/P&gt;&lt;P&gt;The BAPI does not have a database. This means that the relevant application must leave the commit, in order that changes can be carried out on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the documentation of the BAPI for more info&lt;/P&gt;&lt;P&gt;Reward points if you find it helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 05:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682768#M886823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T05:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code for BAPI - BAPI_CUSTOMERQUOTATION_CHANGE needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682769#M886824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for pointing out that I should have sent my code for quick replies. And ofcourse! I did call the 2nd func. module for COMMIT WORK...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guys, Its solved... I was using the flag as 'X' instead of 'U' in the field - CONDITIONS_INX-UPDATEFLAG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;sap fan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 12:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-for-bapi-bapi-customerquotation-change-needed/m-p/3682769#M886824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T12:53:25Z</dc:date>
    </item>
  </channel>
</rss>

