<?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: BAPI_CUSTOMERCONTACT_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570123#M1659818</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 think it will be good if you can get in touch with the functionalguys with both cases and ask them the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nabheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 12:03:11 GMT</pubDate>
    <dc:creator>nabheetscn</dc:creator>
    <dc:date>2012-02-14T12:03:11Z</dc:date>
    <item>
      <title>BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570109#M1659804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Freinds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am changing customer contract by using BAPI_CUSTOMERCONTRACT_CHANGE.&lt;/P&gt;&lt;P&gt;Here i have change the Bill blocked status(02 -&amp;gt; space) has to changed to 'SPACE' &lt;/P&gt;&lt;P&gt;of material item of given date range (starting and ending date).&lt;/P&gt;&lt;P&gt;I am getting the data of billing block status '02' on given contract start date and end date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but at last i am getting messages....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN has been processed succefully.&lt;/P&gt;&lt;P&gt;ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;The sales document is not yet complete: Edit data.&lt;/P&gt;&lt;P&gt;Monthly Billing 40000003 has been saved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone kindly help me please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anurag.radha on Feb 13, 2012 9:40 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 08:39:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570109#M1659804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T08:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570110#M1659805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The sales document is not yet complete: Edit data." - reason would be there is some data required / entered in past in billing contract...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To know the details, please repeat the same activity manually in transaction VA42, and go to Edit -&amp;gt; Incompletion Log &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Krish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 09:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570110#M1659805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T09:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570111#M1659806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Krish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for YOUr reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shold i need to pass billing plan number... i didn't find this field in any structure.&lt;/P&gt;&lt;P&gt;I think i should pass that number.&lt;/P&gt;&lt;P&gt;This is my code...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  loop at it_final into wa_final.

    bapisdh1-SALES_ORG  = wa_final-vkorg.
    bapisdh1-DISTR_CHAN = wa_final-vtweg.

    bapisdh1x-updateflag = 'U'.

    clear wa_item.
    wa_item-itm_number = wa_final-posnr.
    wa_item-material   = wa_final-matnr.
    wa_item-bill_block = ' '.
    append wa_item to it_item.

    clear wa_itemx.
    wa_itemx-itm_number = wa_final-posnr.
    wa_itemx-updateflag = 'U'.
*    wa_itemx-material   = 'X'.
    wa_item-bill_block  = ' '.
    append wa_itemx to it_itemx.

    clear wa_cntr.
    wa_cntr-itm_number = wa_final-posnr.
    wa_cntr-con_st_dat = wa_final-fkdat.
    wa_cntr-con_en_dat = wa_final-nfdat.
    append wa_cntr to it_cntr.

    clear wa_cntrx.
*    wa_cntrx-itm_number = 'X'.
    wa_cntrx-updateflag = 'U'.
*    wa_cntrx-con_st_dat = 'X'.
*    wa_cntrx-con_en_dat = 'X'.
    append wa_cntrx to it_cntrx.

    refresh it_return.

    call function 'BAPI_CUSTOMERCONTRACT_CHANGE'
      exporting
        salesdocument               =  wa_final-vbeln
        contract_header_in          =  bapisdh1
        contract_header_inx         =  bapisdh1x
*     SIMULATION                  =
*     BEHAVE_WHEN_ERROR           = ' '
*     INT_NUMBER_ASSIGNMENT       = ' '
*     LOGIC_SWITCH                =
*     NO_STATUS_BUF_INIT          = ' '
      tables
        return                      =  it_return
       contract_item_in             =  it_item
       contract_item_inx            =  it_itemx
*     PARTNERS                    =
*     PARTNERCHANGES              =
*     PARTNERADDRESSES            =
*     CONDITIONS_IN               =
*     CONDITIONS_INX              =
*     CONTRACT_CFGS_REF           =
*     CONTRACT_CFGS_INST          =
*     CONTRACT_CFGS_PART_OF       =
*     CONTRACT_CFGS_VALUE         =
*     CONTRACT_CFGS_BLOB          =
*     CONTRACT_CFGS_VK            =
*     CONTRACT_CFGS_REFINST       =
*     CONTRACT_TEXT               =
       contract_data_in             = it_cntr
       contract_data_inx            = it_cntrx
*     CONTRACT_KEYS               =
*     EXTENSIONIN                 =
              .

LOOP AT IT_RETURN INTO WA_RETURN.
  IF WA_RETURN-TYPE ne 'E'.
    append wa_return-message to it_error.
*      perform process_err_record.
   ELSE.
      call function 'BAPI_TRANSACTION_COMMIT'
        exporting
          wait   = 'X'
        importing
          return = wa_return1.
   ENDIF.
ENDLOOP.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anurag.radha on Feb 13, 2012 10:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 09:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570111#M1659806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T09:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570112#M1659807</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;Now i am not getting any error but those values are not updated.&lt;/P&gt;&lt;P&gt;i.e. the status is not changed from 02 to ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kiNDLY help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 09:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570112#M1659807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T09:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570113#M1659808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all BAPI_TRANSACTION_COMMIT is not require inside loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out your code, because of small mistake it is not getting updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;clear wa_itemx.
    wa_itemx-itm_number = wa_final-posnr.
    wa_itemx-updateflag = 'U'.
*    wa_itemx-material   = 'X'.
    wa_item-bill_block  = ' '.                    " it should be X instead of space
    append wa_itemx to it_itemx.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check below which should solve your probelm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;clear wa_itemx.
    wa_itemx-itm_number = wa_final-posnr.
    wa_itemx-updateflag = 'U'.
*    wa_itemx-material   = 'X'.
      wa_item-bill_block  = 'X'.                  
    append wa_itemx to it_itemx.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 10:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570113#M1659808</guid>
      <dc:creator>umashankar_sahu</dc:creator>
      <dc:date>2012-02-13T10:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570114#M1659809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the change what you suggested.&lt;/P&gt;&lt;P&gt;Actually that value only i have to chage from 02(blcok) to space(Unblock).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still the values are not updated and not getting any error message  also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anurag.radha on Feb 13, 2012 11:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 10:26:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570114#M1659809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T10:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570115#M1659810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Anurag, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree that you want to update the value from 02 to space, but you are correlating at wrong place. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;clear wa_item. 
    wa_item-itm_number = wa_final-posnr. 
    wa_item-material   = wa_final-matnr. 
    wa_item-bill_block = ' '.                      here you pass Space (here you are passing a new value ) 
    append wa_item to it_item. 

    clear wa_itemx. 
    wa_itemx-itm_number = wa_final-posnr. 
    wa_itemx-updateflag = 'U'. 
*    wa_itemx-material   = 'X'. 
    wa_item-bill_block  = ' '.     here you pass X (means you are Indicating BAPI to update only this fields) 
    append wa_itemx to it_itemx.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to pass wa_item-bill_block  = 'X'. it will update your bill block from 02 to space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 10:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570115#M1659810</guid>
      <dc:creator>umashankar_sahu</dc:creator>
      <dc:date>2012-02-13T10:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570116#M1659811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I chaged that field value to 'x'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still those modifications are not feflected in va43 for that records.&lt;/P&gt;&lt;P&gt;But in the debugging mode i am getting the message 'Monthely billing &amp;lt;Document No&amp;gt; has been saved.&lt;/P&gt;&lt;P&gt;Is the problem at commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i have to chage status form 02 to space of records like  01.03.2012(str date) &amp;amp; 31.03.2012(end date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still the status in table is '02' only.&lt;/P&gt;&lt;P&gt;why thes billing plan values are not updated... some where i read that for billing plan values we have to use&lt;/P&gt;&lt;P&gt;some fm.. and those are not update directly form this bapi.. is it true. if so what is purpose of this bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one kindly explain and clear my doubt and make me to get solution.&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;Edited by: anurag.radha on Feb 13, 2012 12:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 11:08:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570116#M1659811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T11:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570117#M1659812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Anurag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your requirement I checked the BAPI with the data and it is updating Billing Block as line item wise in Billing document tab in VA43, and updated successfully contract start date and contract end date in contract data tab of same line item, so it is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked BAPI using BAPI sequence :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a Sequence using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 : BAPI_CUSTOMERCONTRACT_CHANGE&lt;/P&gt;&lt;P&gt;2. BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass dummy entry in BAPI in fields you want to update, and than execute :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if everything will be fine you will get message &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ORDER_HEADER_IN has been processed successfully
ITEM_IN has been processed successfully
SP Contract 40000206 (Contract No.) has been saved&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let us see in this way are you able to update or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 12:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570117#M1659812</guid>
      <dc:creator>umashankar_sahu</dc:creator>
      <dc:date>2012-02-13T12:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570118#M1659813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting the messages..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ORDER_HEADER_IN has been processed successfully
ITEM_IN has been processed successfully
Monthly Billing 40000003 has been saved

ORDER_HEADER_IN has been processed successfully
ITEM_IN has been processed successfully
ITEM_IN has been processed successfull
Monthly Billing 40000003 has been saved

ORDER_HEADER_IN has been processed successfully
ITEM_IN has been processed successfully
ITEM_IN has been processed successfully
ITEM_IN has been processed successfully
Monthly Billing 40000005 has been saved
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above item_in not executed one for each doucment it is getting increased by one by the previous time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have also tried for one record by hard coding the values.&lt;/P&gt;&lt;P&gt;It is giving some the above message only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the chages are not reflected while seeing in va43 for that record.&lt;/P&gt;&lt;P&gt;I am changing only status not dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call function 'BAPI_CUSTOMERCONTRACT_CHANGE'
    exporting
      salesdocument               =  '0040000003' "wa_final-vbeln
      contract_header_in          =  bapisdh1
      contract_header_inx         =  bapisdh1x
    tables
      return                      =  it_return
     contract_item_in             =  it_item
     contract_item_inx            =  it_itemx

     contract_data_in             = it_cntr
     contract_data_inx            = it_cntrx .

LOOP AT IT_RETURN INTO WA_RETURN.
  IF WA_RETURN-TYPE eq 'E'.
    append wa_return-message to it_error.
   ELSE.
  call function 'BAPI_TRANSACTION_COMMIT'
    exporting
      wait   = 'X'
    importing
      return = wa_return1.
*      append wa_return1 to it_return1.
   ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly chek the above, if i have done any mistakes while commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anurag.radha on Feb 14, 2012 9:44 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 12:47:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570118#M1659813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T12:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570119#M1659814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all please make sure the following things.You are not clearing the internal table after each call of BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After each call of BAPI  refresh    it_return it_item  it_itemx internal tables. Move the IT_RETURN data to another table IT_RETURN_TEMP. Secondly you dont need to call commit in loop.Just call only one commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once document is created go to the document and check what do you see in error log.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 08:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570119#M1659814</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2012-02-14T08:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570120#M1659815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear nabheeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done the changes what you suggested.&lt;/P&gt;&lt;P&gt;i am getting the following messages for three records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;Monthly Billing 40000003 has been saved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;Monthly Billing 40000003 has been saved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;Monthly Billing 40000005 has been saved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the endloop of Bapi. i have written the follwing code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at it_return_temp into wa_return.&lt;/P&gt;&lt;P&gt;      if wa_return-type eq 'E'.&lt;/P&gt;&lt;P&gt;        append wa_return to it_error.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        call function 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;          exporting&lt;/P&gt;&lt;P&gt;            wait   = 'X'&lt;/P&gt;&lt;P&gt;          importing&lt;/P&gt;&lt;P&gt;            return = wa_return1.&lt;/P&gt;&lt;P&gt;        append wa_return to it_success.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the bapi transaction commit it is calling the fm..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BUFFER_REFRESH_ALL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In side this it is calling some delete function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what mistake i have done..&lt;/P&gt;&lt;P&gt;can you please help me.. i am very greatful to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 09:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570120#M1659815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T09:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570121#M1659816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please tell what do you see in  VA42, and go to Edit -&amp;gt; Incompletion Log ? As we are getting message like sales document not comlpete. Please go to above place for the document and let us know why it is incomplete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nabheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 10:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570121#M1659816</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2012-02-14T10:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570122#M1659817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Nabheet, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked that also...&lt;/P&gt;&lt;P&gt;in va42 &lt;/P&gt;&lt;P&gt;But for those incomplete items it is througin  an error like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;The sales document is not yet complete: Edit data  "Here i am getting incomplete error log&lt;/P&gt;&lt;P&gt;Monthly Billing 40000004 has been saved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;for completed data i am getting...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;Monthly Billing 40000004 has been saved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem at bapi_commit.&lt;/P&gt;&lt;P&gt;suppose if other incomplete baseline item which is not going to chage is there in that contract&lt;/P&gt;&lt;P&gt;it will effect the complete base line item which i am going to chage the status....&lt;/P&gt;&lt;P&gt;I think the above is not because when i do it manually 'i am getting an information there are unbilled dates in the past'.&lt;/P&gt;&lt;P&gt;but those chages are saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 11:34:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570122#M1659817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T11:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570123#M1659818</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 think it will be good if you can get in touch with the functionalguys with both cases and ask them the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nabheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570123#M1659818</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2012-02-14T12:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570124#M1659819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked with fun consultant and make that contract completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am noticing that i have to chage the billing plan item block status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two billing blocks one is for material line item&lt;/P&gt;&lt;P&gt;another is for line items of that material item.&lt;/P&gt;&lt;P&gt;flow va43 -&amp;gt; select mat lineitem -&amp;gt; click on billing plan (below) -&amp;gt;then &lt;/P&gt;&lt;P&gt;the resultent screen displays the line items of that material item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i want to chage the billing block status.&lt;/P&gt;&lt;P&gt;what i have to chage the filed &amp;amp; the filed i am changing (bill_block) are same?&lt;/P&gt;&lt;P&gt;can anyone help me please.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  loop at it_final into wa_final.

*    bapisdh1-SALES_ORG  = wa_final-vkorg.
*    bapisdh1-DISTR_CHAN = wa_final-vtweg.

    bapisdh1x-updateflag = 'U'.

    refresh : it_return, it_item, it_itemx, it_cntr, it_cntrx.

    loop at it_final1 into wa_final1 where vbeln = wa_final-vbeln
                                     and   kunnr = wa_final-kunnr.
    clear wa_item.
    wa_item-itm_number = wa_final-posnr.                    "'000010'.
    wa_item-material   = wa_final-matnr.                    "'AL1-001'.
    wa_item-bill_block = ' '.
    append wa_item to it_item.

    clear wa_itemx.
    wa_itemx-itm_number = wa_final-posnr.                   "'000010'.
    wa_itemx-updateflag = 'U'.
*    wa_itemx-material   = 'X'.
    wa_item-bill_block  = 'X'.
    append wa_itemx to it_itemx.

*    clear wa_cntr.
    wa_cntr-itm_number = wa_final-posnr.
*    wa_cntr-con_st_dat = wa_final-fkdat.   "'20100201'.
*    wa_cntr-con_en_dat = wa_final-nfdat.   "'20120229'.
    append wa_cntr to it_cntr.

    clear wa_cntrx.
    wa_cntrx-itm_number = wa_final-posnr.
    wa_cntrx-updateflag = 'U'.
*    wa_cntrx-con_st_dat = 'X'.
*    wa_cntrx-con_en_dat = 'X'.
    append wa_cntrx to it_cntrx.

    clear   :wa_item, wa_itemx, wa_cntr, wa_cntrx, wa_final1.
    endloop.


    call function 'BAPI_CUSTOMERCONTRACT_CHANGE'
      exporting
        salesdocument               =  wa_final-vbeln "'0040000003'
        contract_header_in          =  bapisdh1
        contract_header_inx         =  bapisdh1x
*     SIMULATION                  =
*     BEHAVE_WHEN_ERROR           = ' '
*     INT_NUMBER_ASSIGNMENT       = ' '
*     LOGIC_SWITCH                =
*     NO_STATUS_BUF_INIT          = ' '
      tables
        return                      =  it_return
       contract_item_in             =  it_item
       contract_item_inx            =  it_itemx
*     PARTNERS                    =
*     PARTNERCHANGES              =
*     PARTNERADDRESSES            =
*     CONDITIONS_IN               =
*     CONDITIONS_INX              =
*     CONTRACT_CFGS_REF           =
*     CONTRACT_CFGS_INST          =
*     CONTRACT_CFGS_PART_OF       =
*     CONTRACT_CFGS_VALUE         =
*     CONTRACT_CFGS_BLOB          =
*     CONTRACT_CFGS_VK            =
*     CONTRACT_CFGS_REFINST       =
*     CONTRACT_TEXT               =
       contract_data_in             = it_cntr
       contract_data_inx            = it_cntrx
*     CONTRACT_KEYS               =
*     EXTENSIONIN                 =
              .

    append lines of it_return to it_return_temp.
    refresh it_return.

  endloop.

  clear : wa_return, wa_return1.
  loop at it_return_temp into wa_return.
    if wa_return-type eq 'E'.
      append wa_return to it_error.
    else.
      call function 'BAPI_TRANSACTION_COMMIT'
        exporting
          wait   = 'X'
        importing
          return = wa_return1.
      append wa_return to it_success.
    endif.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anurag.radha on Feb 16, 2012 7:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 06:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570124#M1659819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-16T06:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CUSTOMERCONTACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570125#M1659820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No bapi for changing billing plan as line item wise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have done using fm's which start with &lt;/P&gt;&lt;P&gt;sd_sales... and my issue is resolved.&lt;/P&gt;&lt;P&gt;i got the solution from sdn only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnak you so much to all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 12:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-customercontact-change/m-p/8570125#M1659820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T12:09:34Z</dc:date>
    </item>
  </channel>
</rss>

