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

how to update t.code VA02 from internal table data.

Former Member
0 Likes
747

Hi,

How to update t.code VA02 from internal table data.

For each sales order the kbetr is changng based on exchange rate so it has to update in the VA02.

I prepared report and final data is inthe internal table and internal table with two fields i.e kbetr and kchel.

this two values has to update in va02 n they are running the report.

Thanks,

srii.

4 REPLIES 4
Read only

Former Member
0 Likes
603

Hi,

I think your requirement is to update the condition values KBETR for the Condition types of the items in Sales order.

You can use the FM BAPI_SALESORDER_CHANGE.

use the table parameters ORDER_ITEM_IN, ORDER_ITEM_INX, CONDITIONS_IN, CONDITIONS_INX along with the import parameter(header details)

With Regards,

Dwarakanath.S

Read only

0 Likes
603

Hi,

Yes i want to update the condtion values for condition types of the items for sales order.

I'm using FM BAPI_SALESORDER_CHANGE. but i have to update to condtion type(Z02 & Z03)

while doing at a time two sales orders only second sales order condtion values are updation for both the sales orders.

Please help me on this,

Thanks,

srii.

Read only

0 Likes
603

Hi,

you need to call the FM BAPI_SALESORDER_CHANGE for one sales order data at a time.

In the internal table IT_SALES you have to get the sales order header and item data

For example with sales order number VBELN as the first field.

loop at it_sales into wa_sales.

wa_sales_temp = wa_sales.

at new vbeln.

fill header structures.

endat.

fill table parameters.

at end vbeln.

call function BAPI_SALESORDER_CHANGE.

if successful

call function BAPI_TRANSACTION_COMMIT.

endif.

refresh parameters passed to BAPI_SALESORDER_CHANGE.

endat.

endloop.

Read only

Former Member
0 Likes
603

Thanks for u help and awarded points.