Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_SALESORDER_CHANGE

Former Member
0 Likes
1,925

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,655

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

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,655

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.

Read only

Former Member
0 Likes
1,655

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

Read only

Former Member
0 Likes
1,656

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

Read only

0 Likes
1,655

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.