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 Custom fields added at line item level and req.code

Former Member
0 Likes
1,060

Hi Friends

I need to change sales order line item data. Those fields are custom added fields. I tried to fill

all possible tables. No use.

If any provide sample code that will be highley appreciated.

t_order_item_inx-ITM_NUMBER = p_it_ads_posnr.

t_order_item_inx-UPDATEFLAG = c_bapi_update.

append t_order_item_inx.

wa_bape_vbap-vbeln = e_salesdocument.

wa_bape_vbap-posnr = p_it_ads_posnr.

clear: wa_bape_vbap-print_date.

clear: wa_bape_vbap-print_time.

wa_bape_vbapx-print_date = c_bapi_change.

wa_bape_vbapx-print_time = c_bapi_change.

t_extensionin-structure = c_bape_vbapx.

t_extensionin+30(*) = wa_bape_vbapx.

append t_extensionin.

Hi Friends

I need to change sales order line item data. Those fields are custom added fields. I tried to fill

all possible tables. No use.

If any provide sample code that will be highley appreciated.

t_order_item_inx-ITM_NUMBER = p_it_ads_posnr.

t_order_item_inx-UPDATEFLAG = c_bapi_update.

append t_order_item_inx.

wa_bape_vbap-vbeln = e_salesdocument.

wa_bape_vbap-posnr = p_it_ads_posnr.

clear: wa_bape_vbap-print_date.

clear: wa_bape_vbap-print_time.

wa_bape_vbapx-print_date = c_bapi_change.

wa_bape_vbapx-print_time = c_bapi_change.

t_extensionin-structure = c_bape_vbapx.

t_extensionin+30(*) = wa_bape_vbapx.

append t_extensionin.

2 REPLIES 2
Read only

Former Member
0 Likes
626

There is good documentation for this BAPI. I have solved it myself.

Read only

Former Member
0 Likes
626

Hi K.R.Reddy,

Can you kindly provide me with a working solution for this? I'm currently facing a similar issue for a similar BAPI (in my case it's BAPI_CUSTOMERRETURN_CHANGE) and can't seem to update the custom fields in VBAK. I have put in necessary values in the EXTENSIONIN table as well as updated the UPDATEFLAG indicator to 'U' and although it says that the order is saved, it seems to overwrite the custom field with its original value.

The custom field seems to get updated correctly when I use BAPI_CUSTOMERRETURN_CREATE but when I make changes using BAPI_CUSTOMERRETURN_CHANGE, it gets overwritten with the original value.

Any help is appreciated.

Thanks and regards,

Adeline.