<?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 BAPI_SALESORDER_CREATEFROMDAT2 - Condition record exists (removed manually) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-condition-record-exists-removed-manually/m-p/672052#M29614</link>
    <description>&lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Hi!&lt;/P&gt;
  &lt;P&gt;I'm creating a sales order with the function module BAPI_SALESORDER_CREATEFROMDAT2 but in the conditions the taxes are not defined. When I analysis the tax the condition SAP shows the following:&lt;/P&gt;
  &lt;P&gt;010008Condition record exists (removed manually)&lt;/P&gt;
  &lt;P&gt;However, If I update the prices with the pricing type G (Copy pricing elements unchanged and redetermine taxes), the tax is determined correctly:&lt;/P&gt;
  &lt;P&gt;010208Condition record has been found&lt;/P&gt;
  &lt;P&gt;When I call the function module I used the following code:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; xl_logic_switch-pricing = 'G'. 

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
 order_header_in = x_order_header_in
 order_header_inx = x_order_header_inx
 logic_switch = xl_logic_switch
IMPORTING
 salesdocument = pc_vbeln
TABLES
 return = t_return
 order_items_in = t_order_items_in
 order_items_inx = t_order_items_inx
 order_partners = t_order_partners
 order_schedules_in = t_order_schedules_in
 order_schedules_inx = t_order_schedules_inx
 order_conditions_in = t_order_conditions_in
 order_conditions_inx = t_order_conditions_inx
 order_text = t_order_text
 partneraddresses = t_partners_addr.
IF pc_vbeln IS NOT INITIAL.
   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
   EXPORTING
       wait = 'X'.
ELSE.
   CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Please, can you help me with this issue?&lt;/P&gt;
  &lt;P&gt;Thanks in advanced!&lt;/P&gt;
  &lt;P&gt;Best regards,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2018 14:58:16 GMT</pubDate>
    <dc:creator>lydia_martinezmartinez</dc:creator>
    <dc:date>2018-10-31T14:58:16Z</dc:date>
    <item>
      <title>BAPI_SALESORDER_CREATEFROMDAT2 - Condition record exists (removed manually)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-condition-record-exists-removed-manually/m-p/672052#M29614</link>
      <description>&lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Hi!&lt;/P&gt;
  &lt;P&gt;I'm creating a sales order with the function module BAPI_SALESORDER_CREATEFROMDAT2 but in the conditions the taxes are not defined. When I analysis the tax the condition SAP shows the following:&lt;/P&gt;
  &lt;P&gt;010008Condition record exists (removed manually)&lt;/P&gt;
  &lt;P&gt;However, If I update the prices with the pricing type G (Copy pricing elements unchanged and redetermine taxes), the tax is determined correctly:&lt;/P&gt;
  &lt;P&gt;010208Condition record has been found&lt;/P&gt;
  &lt;P&gt;When I call the function module I used the following code:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; xl_logic_switch-pricing = 'G'. 

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
 order_header_in = x_order_header_in
 order_header_inx = x_order_header_inx
 logic_switch = xl_logic_switch
IMPORTING
 salesdocument = pc_vbeln
TABLES
 return = t_return
 order_items_in = t_order_items_in
 order_items_inx = t_order_items_inx
 order_partners = t_order_partners
 order_schedules_in = t_order_schedules_in
 order_schedules_inx = t_order_schedules_inx
 order_conditions_in = t_order_conditions_in
 order_conditions_inx = t_order_conditions_inx
 order_text = t_order_text
 partneraddresses = t_partners_addr.
IF pc_vbeln IS NOT INITIAL.
   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
   EXPORTING
       wait = 'X'.
ELSE.
   CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Please, can you help me with this issue?&lt;/P&gt;
  &lt;P&gt;Thanks in advanced!&lt;/P&gt;
  &lt;P&gt;Best regards,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 14:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-condition-record-exists-removed-manually/m-p/672052#M29614</guid>
      <dc:creator>lydia_martinezmartinez</dc:creator>
      <dc:date>2018-10-31T14:58:16Z</dc:date>
    </item>
  </channel>
</rss>

