<?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_CONTRACT_CHANGE doesn't work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481938#M2001864</link>
    <description>&lt;P&gt;Hi Simone;&lt;/P&gt;&lt;P&gt;:Why are you passing t_item_conditionx-cond_value = 'X'. ?&lt;/P&gt;&lt;P&gt;Because when i search about this bapi , some developer use like this and he get success. So ı used to.&lt;/P&gt;&lt;P&gt;Actually ; I just want to put a deletion mark in the specific area I specified in the picture.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 07:28:32 GMT</pubDate>
    <dc:creator>former_member780881</dc:creator>
    <dc:date>2022-03-09T07:28:32Z</dc:date>
    <item>
      <title>BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481934#M2001860</link>
      <description>&lt;P&gt;Hi guys ;&lt;/P&gt;
  &lt;P&gt;I have a question about ME32K. When ı enter transaction via purchase document number to me32k. I see a lot of item.&lt;/P&gt;
  &lt;P&gt;Example; When i enter the program and i select just item_no "9810" and "9870" , program will delete flag just 9810 and 9870 in ME32K. The picture is like that;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2028518-inkedme32k-df-li.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;First of ; ı use to BAPI_CONTRACT_GET_DETAIL bapi and ı get all of item_no and details for my Purchase document.&lt;/P&gt;
  &lt;P&gt;After ı use to BAPI_CONTRACT_CHANGE bapi . But nothing gonna be changed. &lt;/P&gt;
  &lt;P&gt;My code part like this basically ;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;call function 'BAPI_CONTRACT_GETDETAIL'&lt;BR /&gt;    exporting&lt;BR /&gt;      purchasingdocument          = ld_purchasingdocument&lt;BR /&gt;   item_data                   = 'X'&lt;BR /&gt;   condition_data              = 'X'&lt;BR /&gt;   importing&lt;BR /&gt;     header                      = ld_header&lt;BR /&gt;     tables&lt;BR /&gt;     item                        = it_item&lt;BR /&gt;     item_condition              = t_item_condition_s&lt;BR /&gt;    return                      = t_return&lt;BR /&gt;            .&lt;BR /&gt;  commit work and wait .&lt;BR /&gt;  check sy-subrc eq 0.&lt;BR /&gt;&lt;BR /&gt;  read table t_item_condition_s index 1.&lt;BR /&gt;  read table t_item_cond_validity index 1.&lt;BR /&gt;&lt;BR /&gt;  t_item_cond_validityx-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_cond_validityx-item_no = 9810.&lt;BR /&gt;&lt;BR /&gt;  append t_item_cond_validityx.&lt;BR /&gt;&lt;BR /&gt;  t_item_condition-item_no = 9810.&lt;BR /&gt;  t_item_condition-deletion_ind = 'X'.&lt;BR /&gt;  t_item_condition-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_condition-cond_count = t_item_condition_s-cond_count.&lt;BR /&gt;  t_item_condition-change_id = 'U'.&lt;BR /&gt;  append t_item_condition.&lt;BR /&gt;  t_item_conditionx-item_no = 9810.&lt;BR /&gt;  t_item_conditionx-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_conditionx-cond_count = t_item_condition_s-cond_count.&lt;BR /&gt;  t_item_conditionx-cond_value = 'X'.&lt;BR /&gt;  append t_item_conditionx.&lt;BR /&gt;  call function 'BAPI_CONTRACT_CHANGE'&lt;BR /&gt;    exporting&lt;BR /&gt;      purchasingdocument          = ld_purchasingdocument&lt;BR /&gt;   tables&lt;BR /&gt;     item                        = it_item&lt;BR /&gt;     item_condition              = t_item_condition&lt;BR /&gt;     item_conditionx             = t_item_conditionx&lt;BR /&gt;     return                      = t_return.&lt;BR /&gt;  .&lt;BR /&gt;  commit work and wait.&lt;BR /&gt;  check sy-subrc eq 0.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Feb 2022 13:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481934#M2001860</guid>
      <dc:creator>former_member780881</dc:creator>
      <dc:date>2022-02-25T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481935#M2001861</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;did you check your return table?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 14:27:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481935#M2001861</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2022-02-25T14:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481936#M2001862</link>
      <description>&lt;P&gt;Actually, i didn' t check my return table. I check that items in ME32k and ME3M after when i run bapi_contract_change and i get sy-subrc eq 0. After my control in that transaction, i saw nothing change&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 21:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481936#M2001862</guid>
      <dc:creator>former_member780881</dc:creator>
      <dc:date>2022-02-25T21:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481937#M2001863</link>
      <description>&lt;P&gt;Well, first step is to check return table: it contains all the messages (informative, warnings, errors and so on).&lt;BR /&gt;&lt;BR /&gt;I'm not sure about this piece of code, because it looks to me you are adding flag/removing flag.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;t_item_cond_validityx-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_cond_validityx-item_no = 9810.&lt;BR /&gt;&lt;BR /&gt;  append t_item_cond_validityx.&lt;BR /&gt;&lt;BR /&gt;  t_item_condition-item_no = 9810.&lt;BR /&gt;  t_item_condition-deletion_ind = 'X'.&lt;BR /&gt;  t_item_condition-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_condition-cond_count = t_item_condition_s-cond_count.&lt;BR /&gt;  t_item_condition-change_id = 'U'.&lt;BR /&gt;  append t_item_condition.&lt;BR /&gt;  t_item_conditionx-item_no = 9810.&lt;BR /&gt;  t_item_conditionx-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_conditionx-cond_count = t_item_condition_s-cond_count.&lt;BR /&gt;  t_item_conditionx-cond_value = 'X'.&lt;BR /&gt;  append t_item_conditionx.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Why are you passing t_item_conditionx-cond_value = 'X'. ?&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 08:24:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481937#M2001863</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2022-02-28T08:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481938#M2001864</link>
      <description>&lt;P&gt;Hi Simone;&lt;/P&gt;&lt;P&gt;:Why are you passing t_item_conditionx-cond_value = 'X'. ?&lt;/P&gt;&lt;P&gt;Because when i search about this bapi , some developer use like this and he get success. So ı used to.&lt;/P&gt;&lt;P&gt;Actually ; I just want to put a deletion mark in the specific area I specified in the picture.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 07:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481938#M2001864</guid>
      <dc:creator>former_member780881</dc:creator>
      <dc:date>2022-03-09T07:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481939#M2001865</link>
      <description>&lt;P&gt;Hello!&lt;BR /&gt;Before putting flags, it's better to understand what they do &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;The 'X' on ...X structures are usually used to tell the system which field you want to update: in your case, you are not trying to update the value, correct?&lt;/P&gt;&lt;P&gt;You are passing &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; t_item_condition-deletion_ind = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;so you have to fill the corresponding&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; t_item_conditionX-deletion_ind = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Get rid of useless lines like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; t_item_cond_validityx-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_cond_validityx-item_no = 9810.&lt;BR /&gt;&lt;BR /&gt;  append t_item_cond_validityx.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;because they mean nothing then try in the following way&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  t_item_condition-item_no = 9810.&lt;BR /&gt;  t_item_condition-deletion_ind = 'X'.&lt;BR /&gt;  t_item_condition-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_condition-cond_count = t_item_condition_s-cond_count.&lt;BR /&gt;  t_item_condition-change_id = 'U'.&lt;BR /&gt;  append t_item_condition.&lt;BR /&gt;  t_item_conditionx-item_no = 9810.&lt;BR /&gt;  t_item_conditionx-serial_id = t_item_condition_s-serial_id.&lt;BR /&gt;  t_item_conditionx-cond_count = t_item_condition_s-cond_count.&lt;BR /&gt;  t_item_conditionx-deletion_ind = 'X'.&lt;BR /&gt;  append t_item_conditionx.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And check the table returns to see if you have any error and rollback the work or commit if all ok.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 08:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481939#M2001865</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2022-03-09T08:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481940#M2001866</link>
      <description>&lt;P&gt;Thanks your comment and attention &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What is your suggest code piece for solving problem ?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 09:15:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481940#M2001866</guid>
      <dc:creator>former_member780881</dc:creator>
      <dc:date>2022-03-09T09:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481941#M2001867</link>
      <description>&lt;P&gt;With my last reply you should be able to delete 1 condition on item 9810.&lt;/P&gt;&lt;P&gt;If you want to delete the item you have to work with ITEM table instead of ITEM_CONDITION&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 11:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481941#M2001867</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2022-03-09T11:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481942#M2001868</link>
      <description>&lt;P&gt;I tried item table in bapi but i guess , i didn't get result.&lt;/P&gt;&lt;P&gt;So ı guess ; according to your comment;&lt;/P&gt;&lt;P&gt;when i define to item_no = 9819 and put to delete_ind = 'X' in item table&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2028900-image.png" /&gt;&lt;/P&gt;&lt;P&gt;i can get result; ????&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; call function 'BAPI_CONTRACT_CHANGE'&lt;BR /&gt;    exporting&lt;BR /&gt;      purchasingdocument         = ld_purchasingdocument&lt;BR /&gt;   tables&lt;BR /&gt;     item                        = it_item&lt;BR /&gt;     return                      = t_return.&lt;BR /&gt;  commit work and wait.&lt;BR /&gt;  check sy-subrc eq 0.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 16:28:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481942#M2001868</guid>
      <dc:creator>former_member780881</dc:creator>
      <dc:date>2022-03-09T16:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481943#M2001869</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;As thumb rule, BAPIs that change data (like this one) usually (there are exceptions!!!) rely on tables working in couples.&lt;/P&gt;&lt;P&gt;In your case, you have ITEM and ITEMX:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;in table ITEM, you add rows you want to change with the values you want to update (in your case the deletion flag)&lt;/LI&gt;&lt;LI&gt;in table ITEMX, you add rows you are changing (the same in table rows, passing the key aka ITEM_NO) and for each row you fill the corresponding field you are updating with an 'X'&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;They have the same field list, if you check, but, as i explained in my previous replies, the...X table's fields are all flags, key fields apart, and they are used to tell the system which fields you are updating.&lt;/P&gt;&lt;P&gt;So, no, your example is not working because you are invoking the BAPI without ITEMX table.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 11:09:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481943#M2001869</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2022-03-10T11:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_CONTRACT_CHANGE doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481944#M2001870</link>
      <description>&lt;P&gt;Thanks to your comment   &lt;SPAN class="mention-scrubbed"&gt;simone.milesi&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;(As thumb rule, BAPIs that change data (like this one) usually (there are exceptions!!!) rely on tables working in couples.&lt;/P&gt;&lt;P&gt;In your case, you have ITEM and ITEMX:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;in table ITEM, you add rows you want to change with the values you want to update (in your case the deletion flag)&lt;/LI&gt;&lt;LI&gt;in table ITEMX, you add rows you are changing (the same in table rows, passing the key aka ITEM_NO) and for each row you fill the corresponding field you are updating with an 'X'&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;They have the same field list, if you check, but, as i explained in my previous replies, the...X table's fields are all flags, key fields apart, and they are used to tell the system which fields you are updating.&lt;/P&gt;&lt;P&gt;So, no, your example is not working because you are invoking the BAPI without ITEMX table.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Problem is solved thanks to you.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 06:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-contract-change-doesn-t-work/m-p/12481944#M2001870</guid>
      <dc:creator>former_member780881</dc:creator>
      <dc:date>2022-09-02T06:13:31Z</dc:date>
    </item>
  </channel>
</rss>

