<?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: How to use BAPI_CUSTOMERCONTRACT_CHANGE ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597361#M1083887</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;Using FM BAPI_CUSTOMERCONTRACT_CHANGE isolated in tcode se37 will &lt;STRONG&gt;never&lt;/STRONG&gt; make a "real" change in the system because after BAPI execution you always have to use FM BAPI_TRAMSACTION_COMMIT. You normally use it in a program, but in SE37 you can also run 2 FM's at a time if you use a test sequence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SE37-&amp;gt;Function module (menu)-&amp;gt;Test-&amp;gt;Test sequences-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Oct 2008 18:58:59 GMT</pubDate>
    <dc:creator>valter_oliveira</dc:creator>
    <dc:date>2008-10-17T18:58:59Z</dc:date>
    <item>
      <title>How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597355#M1083881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please let me know how to use this FM BAPI_CUSTOMERCONTRACT_CHANGE? my requirement is to change the item details of a particular contract which has more than 500 items so i can you please help me with FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to change the header enddate, outAg target quantity, profit center, material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would be really helpfull if someone can send me a sample code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2008 22:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597355#M1083881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-08T22:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597356#M1083882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This example has just header data. For item is the same, must fill CONTRACT_ITEM_IN and CONTRACT_ITEM_INX structures.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: vbeln TYPE vbeln.
DATA: return TYPE STANDARD TABLE OF bapiret2.
DATA: header TYPE bapisdh1.
DATA: headerx  TYPE bapisdh1x.

*** New values
CLEAR: header.
header-bill_block = space.
header-pymt_meth = 'M'.
CONCATENATE 'MB-' wa_assin-ref_pag INTO header-purch_no_c.

*** Refer fields to be changed
CLEAR: headerx.
headerx-updateflag = 'U'.
headerx-bill_block = 'X'.
headerx-purch_no_c = 'X'.
headerx-pymt_meth = 'X'.

CALL FUNCTION 'BAPI_CUSTOMERCONTRACT_CHANGE'
  EXPORTING
    salesdocument       = vbeln
    contract_header_in  = header
    contract_header_inx = headerx
  TABLES
    return              = return.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2008 22:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597356#M1083882</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-08T22:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597357#M1083883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Valter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your response, i have tried to change the material, plant and traget quantity but the values were not changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have filled the tables &lt;/P&gt;&lt;P&gt;CONTRACT_ITEM_IN in this i have filled the item number, material, plant and target quantity&lt;/P&gt;&lt;P&gt;CONTRACT_ITEM_INX and have put X in the above mentioned fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly i have filled &lt;/P&gt;&lt;P&gt;CONTRACT_HEADER_IN sales org, distribution channel, division&lt;/P&gt;&lt;P&gt;CONTRACT_HEADER_INX and have put X in the above mentioned fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also the UPDATEFLAG as U.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the values are not getting changed, can you please correct me if i am wrong.&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;Thanks,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 01:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597357#M1083883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T01:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597358#M1083884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_contract_items_inx-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;      s_contract_items_in-itm_number  = s_vbap-posnr.&lt;/P&gt;&lt;P&gt;      s_contract_items_inx-itm_number = s_vbap-posnr.&lt;/P&gt;&lt;P&gt;      s_contract_items_in-material    = s_itm_record-matnr.&lt;/P&gt;&lt;P&gt;      s_contract_items_inx-material   = 'X'.&lt;/P&gt;&lt;P&gt;      s_contract_items_in-target_qty  = s_itm_record-zmeng.&lt;/P&gt;&lt;P&gt;      s_contract_items_inx-target_qty = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF NOT s_itm_record-mvgr2 IS INITIAL.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE * FROM tvm2t WHERE bezei = s_itm_record-mvgr2&lt;/P&gt;&lt;P&gt;                                     AND spras = 'E'.&lt;/P&gt;&lt;P&gt;        s_contract_items_in-prc_group2  = tvm2t-mvgr2.&lt;/P&gt;&lt;P&gt;        s_contract_items_inx-prc_group2 = 'X'.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        s_contract_items_in-prc_group2  =  ' '.&lt;/P&gt;&lt;P&gt;        s_contract_items_inx-prc_group2 = 'X'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF s_itm_record-mvgr3 = 'true'.&lt;/P&gt;&lt;P&gt;        s_contract_items_in-prc_group3 = 'XXX'.&lt;/P&gt;&lt;P&gt;        s_contract_items_inx-prc_group3 = 'X'.&lt;/P&gt;&lt;P&gt;      ELSEIF s_itm_record-mvgr3 = 'false'.&lt;/P&gt;&lt;P&gt;        s_contract_items_in-prc_group3 = ' '.&lt;/P&gt;&lt;P&gt;        s_contract_items_inx-prc_group3 = 'X'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are changing the target quantity, i believe you may have to pass the net price also....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if your contract has a agreeement ... If so then the values will be picked from the agreement.... try passing values to other fields and see if it is updated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Madan....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 01:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597358#M1083884</guid>
      <dc:creator>madan_ullasa</dc:creator>
      <dc:date>2008-10-10T01:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597359#M1083885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I would ask you to check what does return structure say ... It can tell you what the problem is ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question. Are you using CONTRACT_ITEM_INX-posnr = 'X'? You shouldn't because you don't want to change item number, just material, quantity and plant (those should have the 'X', but remember that that material have to exist in the plant too ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if you can change all of those header data. Try commenting the change to these data (or just sales org) to see if the item data is changed (and the opposite too).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, don't forget to use FM BAPI_TRANSACTION_COMMIT after your BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nothing of this works, can you please post the entire code (the code block where you call the bapi)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 10:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597359#M1083885</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-10T10:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597360#M1083886</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 was trying to test the FM in SE37 and was trying to fill the values, the FM executes succesfully and i get a message saying that the item got processed successfully but when i check the contract it does'nt happen in va43.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTRACT_ITEM_INX-posnr = X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have just tried to change material and plant even it says that it has succesfully updated but the contract doesnt show those values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: srinivas reddy kaki on Oct 17, 2008 4:03 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 22:30:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597360#M1083886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T22:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597361#M1083887</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;Using FM BAPI_CUSTOMERCONTRACT_CHANGE isolated in tcode se37 will &lt;STRONG&gt;never&lt;/STRONG&gt; make a "real" change in the system because after BAPI execution you always have to use FM BAPI_TRAMSACTION_COMMIT. You normally use it in a program, but in SE37 you can also run 2 FM's at a time if you use a test sequence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SE37-&amp;gt;Function module (menu)-&amp;gt;Test-&amp;gt;Test sequences-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 18:58:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597361#M1083887</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-17T18:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597362#M1083888</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 have tried with the below code the header are being changed but the item values are not getting changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help to change the item values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want the target quantity, material and plant to be changed at the item level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: vbeln TYPE vbeln.&lt;/P&gt;&lt;P&gt;DATA: return TYPE STANDARD TABLE OF bapiret2.&lt;/P&gt;&lt;P&gt;DATA: header TYPE bapisdh1.&lt;/P&gt;&lt;P&gt;DATA: headerx  TYPE bapisdh1x.&lt;/P&gt;&lt;P&gt;DATA: item TYPE STANDARD TABLE OF BAPISDITM with header line.&lt;/P&gt;&lt;P&gt;DATA: itemx  TYPE STANDARD TABLE OF BAPISDITMX with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;New values&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;CLEAR: header.&lt;/P&gt;&lt;P&gt;header-CT_VALID_T = '20091231'.&lt;/P&gt;&lt;P&gt;*header-pymt_meth = 'M'.&lt;/P&gt;&lt;P&gt;*CONCATENATE 'MB-' wa_assin-ref_pag INTO header-purch_no_c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbeln = '0040001291'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Refer fields to be changed&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;CLEAR: headerx.&lt;/P&gt;&lt;P&gt;headerx-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;headerx-CT_VALID_T = 'X'.&lt;/P&gt;&lt;P&gt;*headerx-purch_no_c = 'X'.&lt;/P&gt;&lt;P&gt;*headerx-pymt_meth = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: item.&lt;/P&gt;&lt;P&gt;item-ITM_NUMBER = '000010'.&lt;/P&gt;&lt;P&gt;*item-TARGET_QTY = '120'.&lt;/P&gt;&lt;P&gt;item-MATERIAL = '307'.&lt;/P&gt;&lt;P&gt;item-PLANT = '0548'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: itemx.&lt;/P&gt;&lt;P&gt;itemx-UPDATEFLAG = 'U'.&lt;/P&gt;&lt;P&gt;*itemx-ITM_NUMBER = 'X'.&lt;/P&gt;&lt;P&gt;*itemx-TARGET_QTY = 'X'.&lt;/P&gt;&lt;P&gt;itemx-MATERIAL = 'X'.&lt;/P&gt;&lt;P&gt;itemx-PLANT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                         .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_CUSTOMERCONTRACT_CHANGE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    salesdocument       = vbeln&lt;/P&gt;&lt;P&gt;    contract_header_in  = header&lt;/P&gt;&lt;P&gt;    contract_header_inx = headerx&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    return              = return&lt;/P&gt;&lt;P&gt;    CONTRACT_ITEM_IN    = item&lt;/P&gt;&lt;P&gt;    CONTRACT_ITEM_INX   = itemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WAIT          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 17:39:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597362#M1083888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T17:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597363#M1083889</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 have tried with the below code the header are being changed but the item values are not getting changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help to change the item values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want the target quantity, material and plant to be changed at the item level.&lt;/P&gt;&lt;P&gt;None of the item values are getting changed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: vbeln TYPE vbeln.&lt;/P&gt;&lt;P&gt;DATA: return TYPE STANDARD TABLE OF bapiret2.&lt;/P&gt;&lt;P&gt;DATA: header TYPE bapisdh1.&lt;/P&gt;&lt;P&gt;DATA: headerx TYPE bapisdh1x.&lt;/P&gt;&lt;P&gt;DATA: item TYPE STANDARD TABLE OF BAPISDITM with header line.&lt;/P&gt;&lt;P&gt;DATA: itemx TYPE STANDARD TABLE OF BAPISDITMX with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*New values &lt;/P&gt;&lt;P&gt;CLEAR: header.&lt;/P&gt;&lt;P&gt;header-CT_VALID_T = '20091231'.&lt;/P&gt;&lt;P&gt;*header-pymt_meth = 'M'.&lt;/P&gt;&lt;P&gt;*CONCATENATE 'MB-' wa_assin-ref_pag INTO header-purch_no_c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbeln = '0040001291'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Refer fields to be changed &lt;/P&gt;&lt;P&gt;CLEAR: headerx.&lt;/P&gt;&lt;P&gt;headerx-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;headerx-CT_VALID_T = 'X'.&lt;/P&gt;&lt;P&gt;*headerx-purch_no_c = 'X'.&lt;/P&gt;&lt;P&gt;*headerx-pymt_meth = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: item.&lt;/P&gt;&lt;P&gt;item-ITM_NUMBER = '000010'.&lt;/P&gt;&lt;P&gt;*item-TARGET_QTY = '120'.&lt;/P&gt;&lt;P&gt;item-MATERIAL = '307'.&lt;/P&gt;&lt;P&gt;item-PLANT = '0548'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: itemx.&lt;/P&gt;&lt;P&gt;itemx-UPDATEFLAG = 'U'.&lt;/P&gt;&lt;P&gt;*itemx-ITM_NUMBER = 'X'.&lt;/P&gt;&lt;P&gt;*itemx-TARGET_QTY = 'X'.&lt;/P&gt;&lt;P&gt;itemx-MATERIAL = 'X'.&lt;/P&gt;&lt;P&gt;itemx-PLANT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_CUSTOMERCONTRACT_CHANGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;salesdocument = vbeln&lt;/P&gt;&lt;P&gt;contract_header_in = header&lt;/P&gt;&lt;P&gt;contract_header_inx = headerx&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;CONTRACT_ITEM_IN = item&lt;/P&gt;&lt;P&gt;CONTRACT_ITEM_INX = itemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;WAIT = &lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;RETURN = &lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 17:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597363#M1083889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T17:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use BAPI_CUSTOMERCONTRACT_CHANGE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597364#M1083890</link>
      <description>&lt;P&gt;Even if this poste has been done in 2008, I am facing the same issue in 2021.&lt;/P&gt;&lt;P&gt;The Target_qty doesn't change. The return table provides all success messages&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;The BAPI_TRANSACTION_COMMIT return no error too.&lt;/P&gt;&lt;P&gt;Any idea to make the BAPI performing the quantity change to the specific Item number?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 18:23:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-customercontract-change/m-p/4597364#M1083890</guid>
      <dc:creator>dstjacques</dc:creator>
      <dc:date>2021-10-20T18:23:06Z</dc:date>
    </item>
  </channel>
</rss>

