2009 Dec 14 4:18 PM
Hi I have a requirement to update the price condistions for sales orders using the Update step 'G'. However I just discovered this step appears in a different position for different order types, so going down a BDC route is going to be difficult. So I was wondering if I can use the above BAPI but unsrue how to populate the segments.
All I want to do is drill into the each line item, and from the conditions tab, choose the update button and selct Price type 'G'. So can someone tell me how I go about populating the structure BAPICOND to achieve this?
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on Dec 15, 2009 9:12 AM
2009 Dec 17 11:03 AM
Okay I now have it working to an extent but I am getting the below messages related to the condition I am trying to change - I am basically trying to simulate the pressing of the update button - so is this not possible via the BAPI
205 |Condition MWST cannot be processed manually
219 |Sales document 0004208540 was not changed
Hi I have a requirement to update the price condistions for sales orders using the Update step 'G'. However I just discovered this step appears in a different position for different order types, so going down a BDC route is going to be difficult. So I was wondering if I can use the above BAPI but unsrue how to populate the segments.
All I want to do is drill into the each line item, and from the conditions tab, choose the update button and selct Price type 'G'. So can someone tell me how I go about populating the structure BAPICOND to achieve this?
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on Dec 15, 2009 9:12 AM
2009 Dec 16 12:10 PM
Hi
Declare work area as
DATA wa_cond type bapicond,
wa_condx type bapicondx.
Pass the required value as mentioned below as per the requirement.
wa_cond-itm_number = wa_konv-kposn.
wa_cond-cond_type = wa_konv-kschl.
wa_cond-cond_value = wa_konv-kbetr / 10.
wa_cond-stat_con = 'X'.
wa_cond-CONBASEVAL = wa_konv-kawrt.
wa_cond-COND_NO = wa_konv-knumh.
APPEND wa_cond TO i_cond.
wa_condx-itm_number = wa_konv-kposn.
wa_condx-cond_type = wa_konv-kschl.
wa_condx-updateflag = c_x.
wa_condx-cond_value = c_x.
APPEND wa_condx TO i_condx.
Call the fm BAPI_SALESORDER_CHANGE.
U can get the log in BAPIRET structure
Regards,
Bysani.
2009 Dec 17 10:45 AM
HI thanks for this. I am getting issues with the below import parameters that are mandatory. The error is: Field header_inx-updateflag is not an input field - yet I am not populating this parameter...
ORDER_HEADER_IN = ls_order
order_header_inx = ls_orderx
2009 Dec 17 11:03 AM
Okay I now have it working to an extent but I am getting the below messages related to the condition I am trying to change - I am basically trying to simulate the pressing of the update button - so is this not possible via the BAPI
205 |Condition MWST cannot be processed manually
219 |Sales document 0004208540 was not changed
2009 Dec 17 11:35 AM
It sounds like you are performing the same task as myself getting ready for the UK vat rate change.
I am performing the same process of updating on 'G' to update the taxes to the revised 17.5 % rate.
I am using BAPI_SALESORDER_CHANGE, and it does appear to be working okay.
Are you setting the LOGIC_SWITCH parameters on the call to the BAPI.
logic_switch-pricing = 'G' allows the update mode to be set.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |