booking order by using oe_order_pub.process_order

Here post Oracle Order Management related topics.
Post Reply
shekhar_lonkar
Posts: 12
Joined: Mon Mar 26, 2007 4:21 am
Location: India

booking order by using oe_order_pub.process_order

Post by shekhar_lonkar »

Hi..
Good Morning to all of u....
..........................................
Dear All Oracle Apps Guru...

I m facing problem at the time of booking sales order through API(oe_order_pub.process_order).

I am able to enter the order,but i m unable to book the order.
Following are the mandatory coln r hard coded .
*****Header level****
dbms_output.put_line('Header ID = '|| p_header_rec.header_id);
p_api_version_number := 1;
/*header start*/
p_Header_Rec.order_type_id :=1437; --Standard Order
p_Header_Rec.sold_to_org_id :=1290;
p_Header_Rec.ship_to_org_id :=1425;
p_Header_Rec.transactional_curr_code:='USD';
p_header_rec.order_source_id :=0;--1023;
p_header_rec.org_id := 204;
p_header_rec.ship_from_org_id := 204;
p_Header_Rec.invoice_to_org_id :=1424;
p_Header_Rec.ordered_date :=sysdate;
p_Header_Rec.price_list_id :=1000 ;--Corporate Price List
p_Header_Rec.pricing_date :=SYSDATE;
p_header_rec.creation_date := SYSDATE;
p_Header_Rec.salesrep_id :=-3;
p_Header_Rec.tax_exempt_flag :='S';
p_header_rec.payment_term_id := 4;
p_Header_Rec.operation:=OE_GLOBALS.G_OPR_CREATE;
p_header_rec.freight_terms_code := 'Due';
p_header_rec.created_by := 1318;
p_header_rec.last_updated_by := 1318;
p_header_rec.last_update_date := SYSDATE;
p_header_rec.version_number := 1;
p_header_rec.open_flag := 'Y';
p_header_rec.booked_flag := 'Y';
p_header_rec.FLOW_STATUS_CODE := 'BOOKED';--BOOK
p_header_rec.BOOKED_DATE := SYSDATE;
p_Header_Rec.demand_class_code :='WEST';
p_Header_Rec.invoicing_rule_id :=-2;
p_Header_Rec.ACCOUNTING_RULE_ID :=1;
p_Header_Rec.SHIPPING_METHOD_CODE :='DHL';
p_Header_Rec.FOB_POINT_CODE :='Destination';
p_header_rec.cancelled_flag := 'N';
p_header_rec.REQUEST_DATE :=sysdate;
p_header_rec.LOCK_CONTROL :=4;
DBMS_OUTPUT.PUT_LINE('OPERATION IS '||p_header_rec.operation);
/*header end*/

/*line start*/
for icount in 1 .. no_line loop

SELECT OE_ORDER_LINES_S.NEXTVAL INTO p_line_tbl(icount).line_id FROM DUAL;
dbms_output.put_line('Line ID = '|| p_line_tbl(icount).line_id);

p_line_tbl(icount).inventory_item_id := 7977;
p_line_tbl(icount).ordered_quantity := 1;
p_line_tbl(icount).pricing_quantity := 1;
p_line_tbl(icount).line_type_id := 1427;
p_line_tbl(icount).line_number := icount;
p_line_tbl(icount).shipment_number := 1;
p_line_tbl(icount).ship_to_org_id := 1425;
p_line_tbl(icount).sold_to_org_id := 1290;
p_line_tbl(icount).sold_from_org_id := 204;
p_line_tbl(icount).salesrep_id := -3;
p_line_tbl(icount).price_list_id := 1000;
p_line_tbl(icount).operation := OE_GLOBALS.G_OPR_CREATE;
p_line_tbl(icount).open_flag := 'Y';
p_line_tbl(icount).visible_demand_flag := 'Y';
p_line_tbl(icount).CALCULATE_PRICE_FLAG := 'Y';
p_line_tbl(icount).booked_flag := 'Y';--BOOK
p_line_tbl(icount).CANCELLED_FLAG := 'N';
p_line_tbl(icount).SHIPPING_INTERFACED_FLAG := 'Y';--BOOK
p_line_tbl(icount).header_id := p_header_rec.header_id;
p_line_tbl(icount).line_category_code := 'ORDER';
p_line_tbl(icount).order_quantity_uom :='Ea';
p_line_tbl(icount).request_date := SYSDATE;
p_line_tbl(icount).schedule_ship_date := SYSDATE;
p_line_tbl(icount).ship_from_org_id := 207;
p_line_tbl(icount).FLOW_STATUS_CODE := 'BOOKED';--BOOK
p_line_tbl(icount).ship_to_customer_id := 1290;
p_line_tbl(icount).invoice_to_org_id := 1424;
p_line_tbl(icount).tax_exempt_flag := 'S';
p_line_tbl(icount).tax_date := '02-Mar-2006';
p_line_tbl(icount).tax_code := 'Location';
p_line_tbl(icount).SHIPPING_METHOD_CODE :='DHL';
p_line_tbl(icount).TRANSACTION_PHASE_CODE :='F';
p_line_tbl(icount).request_date :=sysdate;
p_line_tbl(icount).PROMISE_DATE :=sysdate;
p_line_tbl(icount).payment_term_id := 4;
p_line_tbl(icount).demand_class_code :='WEST';
p_line_tbl(icount).freight_terms_code := 'Due';
p_line_tbl(icount).FOB_POINT_CODE :='Destination';
p_line_tbl(icount).invoicing_rule_id :=-2;
p_line_tbl(icount).ACCOUNTING_RULE_ID :=1;
--p_line_tbl(icount).SCHEDULE_ARRIVAL_DATE :=sysdate;
--p_line_tbl(icount).SCHEDULE_STATUS_CODE :='SCHEDULED';

/*line start*/

/*price adjustment start*/
SELECT OE_PRICE_ADJUSTMENTS_S.NEXTVAL INTO p_Line_Adj_tbl(icount).price_adjustment_id FROM DUAL;
dbms_output.put_line('Price Adjustment ID = '|| p_Line_Adj_tbl(icount).price_adjustment_id);

p_Line_Adj_tbl(icount).created_by := 1318;
p_Line_Adj_tbl(icount).header_id := p_header_rec.header_id;
p_Line_Adj_tbl(icount).line_id := p_line_tbl(icount).line_id;
p_Line_Adj_tbl(icount).percent := 10;
p_Line_Adj_tbl(icount).operation := OE_GLOBALS.G_OPR_CREATE;
p_Line_Adj_tbl(icount).list_header_id := 8988;
p_Line_Adj_tbl(icount).list_line_id := 16596;
p_Line_Adj_tbl(icount).list_line_type_code := 'DIS';
p_Line_Adj_tbl(icount).arithmetic_operator := 'AMT';
p_Line_Adj_tbl(icount).updated_flag := 'Y';
p_Line_Adj_tbl(icount).update_allowed := 'Y';
p_Line_Adj_tbl(icount).applied_flag := 'Y';
p_Line_Adj_tbl(icount).automatic_flag := 'N';
p_Line_Adj_tbl(icount).OPERAND := 10;
/*price adjustment end*/

end loop;

After changing the Booked_flag='Y' as well as flow_status_code='BOOKED';

Order is changing its Booked_flag='Y' but the flow_status_code remains 'ENTERED'.

Kindly reply..my query...
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests