I will not be able to post the complete code here , but if you need send me an email.
To change the Price List at Order header and line
Write a Small Wrapper with the below Logic
- Write a cursor to select all the header/lines record where you want to Change the Price.
- For each record Populate the below PL/SQL table
--For Header
l_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
l_header_rec.header_id := Pass Header ID;
l_header_rec.price_list_id := Pass New Price List;
--For Line
l_line_tbl(index) := oe_order_pub.G_MISS_LINE_REC;
l_line_tbl(index).operation := OE_GLOBALS.G_OPR_UPDATE;
l_line_tbl(index).line_id := Pass Line ID;
l_line_tbl(index).price_list_id := Pass New price List ID;
l_line_tbl(index).calculate_price_flag := 'Y';
---Below is info for l_line_tbl and l_header_rec
l_header_rec oe_order_pub.header_rec_type;
l_line_tbl oe_order_pub.line_tbl_type;
---
And then call oe_order_pub.Process_Order
Please refer my Post
CreateOrderAPI
for the info. on how to use
l_header_rec
l_line_tbl
in OE_ORDER_PUB.
Hope that helps.
Thanks