Search 800 + Posts

Apr 23, 2010

Update Price List on Order Header and Lines for Book Sales Order

If requirement is to change the Price List on the Order Header and Lines and you don't want to do that from Mass Change UI, then other option is to use Process Order API to perform same function.

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
for the info. on  how to use


Hope that helps.


1 comment:

  1. Hi,

    I am looking to update price list and unit selling price at Sales Order Quote line level, Could you please send me the complete code to ''.