‎2018 Oct 31 2:58 PM
Hi!
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:
010008Condition record exists (removed manually)
However, If I update the prices with the pricing type G (Copy pricing elements unchanged and redetermine taxes), the tax is determined correctly:
010208Condition record has been found
When I call the function module I used the following code:
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.
Please, can you help me with this issue?
Thanks in advanced!
Best regards,