<?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 Unexpected Condition Delete with BAPI_CONTRACT_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unexpected-condition-delete-with-bapi-contract-change/m-p/533413#M19517</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I'm new of this community, so, if I do something wrong, please tell me.&lt;/P&gt;
  &lt;P&gt;I've a problem with BAPI_CONTRACT_CHANGE:&lt;/P&gt;
  &lt;P&gt;I've created a program for insert new conditions in a contract (like t-code ME32K). During test of this program, I've tried to delete a condition already in contract and I've tried to insert the same condition in the same contract using the program. Launching the t-code ME33K, I seen the condition has been perfectly added but another one has been deleted and re-added.&lt;/P&gt;
  &lt;P&gt;This is what I passed in the BAPI:&lt;/P&gt;
  &lt;P&gt;SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }&lt;/P&gt;
  &lt;P&gt; CALL FUNCTION 'BAPI_CONTRACT_CHANGE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; purchasingdocument = ls_ebeln&lt;BR /&gt; header = ls_header&lt;BR /&gt; headerx = ls_headerx&lt;BR /&gt; TABLES&lt;BR /&gt; item = lt_item&lt;BR /&gt; itemx = lt_itemx&lt;BR /&gt; item_cond_validity = lt_item_cond_validity&lt;BR /&gt; item_cond_validityx = lt_item_cond_validityx&lt;BR /&gt; item_condition = lt_item_condition&lt;BR /&gt; item_conditionx = lt_item_conditionx&lt;BR /&gt; item_cond_scale_quan = lt_item_scale_quan&lt;BR /&gt; return = lt_return.&lt;/P&gt;
  &lt;P&gt;In table lt_item_condition I have all the conditions, also the one deleted (with a flag in DELETION_IND), also the one that I want to insert (with 'I' in CHANGE_ID field).&lt;/P&gt;
  &lt;P&gt;In table lt_item_conditionx I have just the condition that I want to insert (The COND_COUNT in lt_item_conditionx is the same of lt_item_condition).&lt;/P&gt;
  &lt;P&gt;VALID_FROM field of lt_item_cond_validity is enhanced by sy-udate, and VALID_TO of the same table is enhanced by 99991231.&lt;/P&gt;
  &lt;P&gt;In debug mode I've tried to delete in lt_item_condition the condition with a flag in DELETION_IND but nothing. I've also tried to insert rows in lt_item_conditionx but I have the same problem.&lt;/P&gt;
  &lt;P&gt;Is there anyone who has the same problem? How can I solve it?&lt;/P&gt;
  &lt;P&gt;Certain of your kind reply,&lt;/P&gt;
  &lt;P&gt;Best Regards&lt;/P&gt;
  &lt;P&gt;Alessio&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2018 11:04:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-01-12T11:04:30Z</dc:date>
    <item>
      <title>Unexpected Condition Delete with BAPI_CONTRACT_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unexpected-condition-delete-with-bapi-contract-change/m-p/533413#M19517</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I'm new of this community, so, if I do something wrong, please tell me.&lt;/P&gt;
  &lt;P&gt;I've a problem with BAPI_CONTRACT_CHANGE:&lt;/P&gt;
  &lt;P&gt;I've created a program for insert new conditions in a contract (like t-code ME32K). During test of this program, I've tried to delete a condition already in contract and I've tried to insert the same condition in the same contract using the program. Launching the t-code ME33K, I seen the condition has been perfectly added but another one has been deleted and re-added.&lt;/P&gt;
  &lt;P&gt;This is what I passed in the BAPI:&lt;/P&gt;
  &lt;P&gt;SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }&lt;/P&gt;
  &lt;P&gt; CALL FUNCTION 'BAPI_CONTRACT_CHANGE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; purchasingdocument = ls_ebeln&lt;BR /&gt; header = ls_header&lt;BR /&gt; headerx = ls_headerx&lt;BR /&gt; TABLES&lt;BR /&gt; item = lt_item&lt;BR /&gt; itemx = lt_itemx&lt;BR /&gt; item_cond_validity = lt_item_cond_validity&lt;BR /&gt; item_cond_validityx = lt_item_cond_validityx&lt;BR /&gt; item_condition = lt_item_condition&lt;BR /&gt; item_conditionx = lt_item_conditionx&lt;BR /&gt; item_cond_scale_quan = lt_item_scale_quan&lt;BR /&gt; return = lt_return.&lt;/P&gt;
  &lt;P&gt;In table lt_item_condition I have all the conditions, also the one deleted (with a flag in DELETION_IND), also the one that I want to insert (with 'I' in CHANGE_ID field).&lt;/P&gt;
  &lt;P&gt;In table lt_item_conditionx I have just the condition that I want to insert (The COND_COUNT in lt_item_conditionx is the same of lt_item_condition).&lt;/P&gt;
  &lt;P&gt;VALID_FROM field of lt_item_cond_validity is enhanced by sy-udate, and VALID_TO of the same table is enhanced by 99991231.&lt;/P&gt;
  &lt;P&gt;In debug mode I've tried to delete in lt_item_condition the condition with a flag in DELETION_IND but nothing. I've also tried to insert rows in lt_item_conditionx but I have the same problem.&lt;/P&gt;
  &lt;P&gt;Is there anyone who has the same problem? How can I solve it?&lt;/P&gt;
  &lt;P&gt;Certain of your kind reply,&lt;/P&gt;
  &lt;P&gt;Best Regards&lt;/P&gt;
  &lt;P&gt;Alessio&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 11:04:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unexpected-condition-delete-with-bapi-contract-change/m-p/533413#M19517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-01-12T11:04:30Z</dc:date>
    </item>
  </channel>
</rss>

