290: oe_debug_pub.add( 'Inside Update Line Flow Status');
291: oe_debug_pub.add( 'line id : ' || p_line_id);
292: oe_debug_pub.add( 'flow status code : ' || p_flow_status_code);
293: END IF;
294: Update oe_order_lines_all
295: Set flow_status_code = p_flow_status_code
296: Where line_id = p_line_id;
297: End Update_line_flow_status;
298:
507: BEGIN
508: /*Bug3261460*/
509: SELECT msi.SERVICEABLE_PRODUCT_FLAG
510: INTO l_serviceable_product_flag
511: FROM oe_order_lines_all ol, mtl_system_items msi
512: WHERE ol.line_id = l_service_reference_line_id
513: AND ol.inventory_item_id = msi.inventory_item_id
514: AND msi.organization_id = nvl(ol.ship_from_org_id, oe_sys_parameters.value('MASTER_ORGANIZATION_ID', ol.org_id));
515: EXCEPTION
862: SELECT NVL(lt.cust_trx_type_id, 0)
863: INTO l_inv_cust_trx_type_id
864: FROM oe_line_types_v lt
865: WHERE lt.line_type_id = (SELECT line_type_id
866: FROM oe_order_lines_all /* MOAC SQL CHANGE */
867: WHERE line_id = p_line_rec.reference_line_id);
868: IF l_debug_level > 0 THEN
869: oe_debug_pub.add( 'CUSTOMER TRANSACTION TYPE ID FROM REFERENCE LINE TYPE : '||L_INV_CUST_TRX_TYPE_ID , 5 ) ;
870: END IF;
874: FROM oe_order_types_v ot,
875: oe_order_headers_all oh /* MOAC SQL CHANGE */
876: WHERE ot.order_type_id = oh.order_type_id
877: AND oh.header_id = (SELECT header_id
878: FROM oe_order_lines_all /* MOAC SQL CHANGE */
879: WHERE line_id = p_line_rec.reference_line_id);
880: END IF;
881: IF l_debug_level > 0 THEN
882: oe_debug_pub.add( 'CUSTOMER TRANSACTION TYPE ID FROM REFERENCE ORDER TYPE : '||L_INV_CUST_TRX_TYPE_ID , 5 ) ;
1229: -- Get_Item_Description(l_line_rec, l_item_serviced_desc);
1230: BEGIN
1231: select inventory_item_id,ordered_item_id,sold_to_org_id,item_identifier_type,ordered_item,org_id
1232: into l_inventory_item_id,l_ordered_item_id,l_sold_to_org_id,l_item_identifier_type,l_ordered_item,l_org_id
1233: from OE_ORDER_LINES_ALL
1234: where line_id = l_service_reference_line_id;
1235: EXCEPTION
1236: WHEN NO_DATA_FOUND THEN
1237: IF l_debug_level > 0 THEN
2060: -- line is splitted
2061: -- get the total amounts
2062: select sum(nvl(ordered_quantity,0)), sum(nvl(fulfilled_quantity,nvl(shipped_quantity,0))), sum(nvl(invoiced_quantity,0))
2063: into l_unsplit_ordered_qty , l_unsplit_fulfilled_qty, l_unsplit_invoiced_qty
2064: from oe_order_lines_all where header_id = p_line_rec.header_id and line_set_id = p_line_rec.line_set_id;
2065: else
2066: l_unsplit_ordered_qty := nvl(p_line_rec.ordered_quantity,0);
2067: l_unsplit_fulfilled_qty := nvl(p_line_rec.fulfilled_quantity,nvl(p_line_rec.shipped_quantity,0));
2068: l_unsplit_invoiced_qty := nvl(p_line_rec.invoiced_quantity,0);
3950: -- Check if service parent has parent (In case if service parent is an option, class, kit etc)
3951: BEGIN
3952: SELECT top_model_line_id
3953: INTO service_grand_parent_id
3954: FROM oe_order_lines_all /*Bug3261460*/
3955: WHERE line_id = l_service_reference_line_id;
3956: EXCEPTION
3957: WHEN NO_DATA_FOUND THEN
3958: IF l_debug_level > 0 THEN
4481:
4482: cursor order_info(c_line_id number)
4483: is
4484: select header_id, line_id
4485: from oe_order_lines_all
4486: where line_id = c_line_id;
4487: --
4488: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
4489: --
5984:
5985: BEGIN
5986: SELECT max(actual_shipment_date)
5987: INTO l_max_actual_shipment_date
5988: FROM oe_order_lines_all ool,
5989: oe_line_sets ols
5990: WHERE ool.shippable_flag = 'Y'
5991: AND ool.line_id = ols.line_id
5992: AND ols.set_id IN (SELECT os.set_id
6902: IF l_parent_line_id IS NOT NULL THEN
6903: BEGIN
6904: Select top_model_line_id
6905: into l_top_model_line_id
6906: from oe_order_lines_all
6907: where line_id = l_parent_line_id ;
6908: EXCEPTION WHEN NO_DATA_FOUND THEN
6909: p_x_interface_line_rec.parent_line_id := l_parent_line_id ;
6910: END;
7522: oe_debug_pub.add( ' UPDATING p_line_rec.SERVICE_START_DATE = '||p_line_rec.SERVICE_START_DATE , 5 ) ; -- bug# 7231974
7523: oe_debug_pub.add( ' p_line_rec.SERVICE_END_DATE = '|| p_line_rec.SERVICE_END_DATE , 5 ) ;
7524: END IF;
7525:
7526: UPDATE OE_ORDER_LINES_ALL
7527: SET INVOICE_INTERFACE_STATUS_CODE = p_invoice_interface_status,
7528: INVOICED_QUANTITY = l_invoiced_quantity,
7529: FLOW_STATUS_CODE = l_flow_status_code,
7530: SERVICE_START_DATE = p_line_rec.SERVICE_START_DATE, --bug# 7231974 :- as srvc_dates are derived in OE_INVOICE_PUB, they should be updated in OM tables as well
8569: --bug 5336623
8570: begin
8571:
8572: select line_id, lock_control into v_line_id, v_lock_control
8573: from oe_order_lines_all where line_id = l_line_rec.line_id
8574: FOR UPDATE NOWAIT;
8575:
8576: IF l_debug_level > 0 THEN
8577: oe_debug_pub.add('Locking successful');