DBA Data[Home] [Help]

APPS.OE_INVOICE_PUB dependencies on OE_ORDER_LINES

Line 294: Update oe_order_lines_all

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:

Line 511: FROM oe_order_lines_all ol, mtl_system_items msi

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

Line 866: FROM oe_order_lines_all /* MOAC SQL CHANGE */

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;

Line 878: FROM oe_order_lines_all /* MOAC SQL CHANGE */

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 ) ;

Line 1233: from OE_ORDER_LINES_ALL

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

Line 1732: FROM OE_ORDER_LINES

1728: --
1729: BEGIN
1730: SELECT item_type_code
1731: INTO l_item_type_code
1732: FROM OE_ORDER_LINES
1733: WHERE line_id = p_line_id;
1734: IF l_item_type_code = 'CLASS' THEN
1735: IF l_debug_level > 0 THEN
1736: oe_debug_pub.add( 'ITEM TYPE OF THIS LINE IS CLASS' , 5 ) ;

Line 1757: FROM oe_order_lines Line,

1753: x_RFR_children_tbl OUT NOCOPY Id_Tbl_Type)
1754: IS
1755: Cursor rfr_child is
1756: SELECT line_id
1757: FROM oe_order_lines Line,
1758: bom_inventory_components bic
1759: WHERE Line.link_to_line_id = p_line_id
1760: AND Line.open_flag || '' = 'Y'
1761: AND bic.component_sequence_id = Line.component_sequence_id

Line 1800: FROM oe_order_lines Line,

1796: -- siblings, to prevent selecting splitted
1797: -- lines
1798: Cursor rfr_sibling is
1799: SELECT line_id
1800: FROM oe_order_lines Line,
1801: bom_inventory_components bic
1802: WHERE Line.link_to_line_id = p_link_to_line_id
1803: AND Line.inventory_item_id <> p_line_inventory_item_id
1804: AND Line.open_flag || '' = 'Y'

Line 1844: FROM oe_order_lines Line,

1840: --
1841: BEGIN
1842: SELECT 'Y'
1843: INTO l_rfr
1844: FROM oe_order_lines Line,
1845: bom_inventory_components bic
1846: WHERE Line.line_id = p_line_id
1847: AND Line.open_flag || '' = 'Y'
1848: AND bic.component_sequence_id = Line.component_sequence_id

Line 1913: from oe_order_lines

1909: IF l_child_rec.inventory_item_id <> l_child_inventory_item_id then
1910: l_child_inventory_item_id := l_child_rec.inventory_item_id;
1911: select nvl(sum(ordered_quantity), 0), nvl(sum(fulfilled_quantity), 0)
1912: into l_child_total_ordered_qty, l_child_total_fulfilled_qty
1913: from oe_order_lines
1914: where link_to_line_id = p_line_rec.line_id
1915: and inventory_item_id = l_child_inventory_item_id;
1916: l_ratio := nvl(p_line_rec.ordered_quantity,0) / l_child_total_ordered_qty;
1917: -- ordered_quantity must be according to ratio

Line 1957: from oe_order_lines

1953: IF l_sibling_rec.inventory_item_id <> l_sibling_inventory_item_id THEN
1954: l_sibling_inventory_item_id := l_sibling_rec.inventory_item_id;
1955: select nvl(sum(ordered_quantity), 0), nvl(sum(fulfilled_quantity), 0)
1956: into l_sibling_total_ordered_qty, l_sibling_total_fulfilled_qty
1957: from oe_order_lines
1958: where link_to_line_id = p_line_rec.link_to_line_id
1959: and inventory_item_id = l_sibling_inventory_item_id;
1960: -- current line may be splitted from the original line
1961: -- just like the sibling line may be splitted

Line 1964: from oe_order_lines

1960: -- current line may be splitted from the original line
1961: -- just like the sibling line may be splitted
1962: select nvl(sum(ordered_quantity), 0), nvl(sum(invoiced_quantity), 0)
1963: into l_total_ordered_qty, l_total_invoiced_qty
1964: from oe_order_lines
1965: where link_to_line_id = p_line_rec.link_to_line_id
1966: and inventory_item_id = p_line_rec.inventory_item_id;
1967: l_ratio := l_total_ordered_qty / l_sibling_total_ordered_qty;
1968: -- ordered_quantity must be according to ratio

Line 2064: from oe_order_lines_all where header_id = p_line_rec.header_id and line_set_id = p_line_rec.line_set_id;

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);

Line 2215: from oe_order_lines

2211: IF l_child_rec.inventory_item_id <> l_child_inventory_item_id then
2212: l_child_inventory_item_id := l_child_rec.inventory_item_id;
2213: select nvl(sum(ordered_quantity), 0), nvl(sum(fulfilled_quantity), 0)
2214: into l_child_total_ordered_qty, l_child_total_fulfilled_qty
2215: from oe_order_lines
2216: where link_to_line_id = p_line_rec.line_id
2217: and inventory_item_id = l_child_inventory_item_id;
2218: IF l_debug_level > 0 THEN
2219: oe_debug_pub.add( 'RFR: L_CHILD_TOTAL_ORDERED_QTY: '||L_CHILD_TOTAL_ORDERED_QTY||' L_CHILD_TOTAL_FULFILLED_QTY:'||L_CHILD_TOTAL_FULFILLED_QTY , 5 ) ;

Line 2302: FROM oe_order_lines

2298: SELECT NVL(SUM(ordered_quantity),0)
2299: ,NVL(SUM(fulfilled_quantity),0)
2300: INTO l_sibling_total_ordered_qty
2301: ,l_sibling_total_fulfilled_qty
2302: FROM oe_order_lines
2303: WHERE link_to_line_id = p_line_rec.link_to_line_id
2304: AND inventory_item_id = l_sibling_inventory_item_id;
2305:
2306: -- current line may be splitted from the original line

Line 2315: FROM oe_order_lines

2311: ,NVL(SUM(fulfilled_quantity),0)
2312: INTO l_total_ordered_qty
2313: ,l_total_invoiced_qty
2314: ,l_total_fulfilled_qty
2315: FROM oe_order_lines
2316: WHERE link_to_line_id = p_line_rec.link_to_line_id
2317: AND inventory_item_id = p_line_rec.inventory_item_id;
2318:
2319: l_ratio := l_total_ordered_qty/l_sibling_total_ordered_qty;

Line 3954: FROM oe_order_lines_all /*Bug3261460*/

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

Line 4485: from oe_order_lines_all

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: --

Line 4888: FROM oe_order_lines ool,

4884: SELECT ooh.header_id
4885: , ool.line_id
4886: , ooh.order_number
4887: , ott.name order_type
4888: FROM oe_order_lines ool,
4889: oe_order_headers_all ooh, /* MOAC SQL CHANGE */
4890: oe_transaction_types_tl ott
4891: WHERE ool.line_id = c_line_id
4892: AND ooh.header_id = ool.header_id

Line 5213: FROM OE_ORDER_LINES

5209: for update nowait; -- Bug #3686558
5210:
5211: CURSOR config_for_model (l_line_id NUMBER) IS
5212: SELECT LINE_ID
5213: FROM OE_ORDER_LINES
5214: WHERE LINK_TO_LINE_ID = l_line_id
5215: AND ITEM_TYPE_CODE = 'CONFIG';
5216:
5217: --

Line 5988: FROM oe_order_lines_all ool,

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

Line 6906: from oe_order_lines_all

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;

Line 7526: UPDATE OE_ORDER_LINES_ALL

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

Line 7692: FROM oe_order_lines

7688: oe_debug_pub.add( 'ENTER HEADER_ACTIVITY ( ) PROCEDURE ' , 5 ) ;
7689: END IF;
7690: SELECT header_id
7691: INTO l_header_id
7692: FROM oe_order_lines
7693: WHERE line_id = p_line_id;
7694: RETURN( WF_ENGINE.Activity_Exist_In_Process(
7695: p_item_type => OE_GLOBALS.G_WFI_HDR
7696: ,p_item_key => to_char(l_header_id)

Line 7975: FROM oe_order_lines Line

7971: l_freight_count NUMBER;
7972:
7973: CURSOR Pending_Lines IS
7974: SELECT Line.line_id --SQL# 16487863 Added the UNION clause to avoid FTS
7975: FROM oe_order_lines Line
7976: WHERE (Line.link_to_line_id = p_line_rec.link_to_line_id)
7977: AND invoice_interface_status_code = 'RFR-PENDING'
7978: UNION
7979: SELECT Line.line_id

Line 7980: FROM oe_order_lines Line

7976: WHERE (Line.link_to_line_id = p_line_rec.link_to_line_id)
7977: AND invoice_interface_status_code = 'RFR-PENDING'
7978: UNION
7979: SELECT Line.line_id
7980: FROM oe_order_lines Line
7981: WHERE (Line.line_id = p_line_rec.link_to_line_id)
7982: AND invoice_interface_status_code = 'RFR-PENDING';
7983:
7984: l_pending_line_id NUMBER;

Line 8495: FROM oe_order_lines Line

8491: for update of dd.source_line_id nowait;
8492:
8493: CURSOR Pending_Lines IS
8494: SELECT Line.line_id
8495: FROM oe_order_lines Line
8496: WHERE (Line.link_to_line_id = l_line_rec.link_to_line_id
8497: OR Line.line_id = l_line_rec.link_to_line_id)
8498: AND invoice_interface_status_code = 'RFR-PENDING';
8499: --

Line 8573: from oe_order_lines_all where line_id = l_line_rec.line_id

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');

Line 8979: FROM oe_order_lines

8975: FETCH delivery_lines_cursor INTO l_line_id;
8976: EXIT WHEN delivery_lines_cursor%NOTFOUND;
8977: SELECT invoice_interface_status_code, open_flag
8978: INTO l_interface_status_code, l_open_flag
8979: FROM oe_order_lines
8980: WHERE line_id = l_line_id;
8981: IF l_debug_level > 0 THEN
8982: oe_debug_pub.add( 'LINE ID : '||L_LINE_ID , 5 ) ;
8983: END IF;

Line 9578: FROM oe_order_lines ol

9574: l_result_out VARCHAR2(30);
9575: l_flow_status_code VARCHAR2(30);
9576: CURSOR order_line_cursor IS
9577: SELECT ol.line_id
9578: FROM oe_order_lines ol
9579: WHERE ol.header_id = p_header_id
9580: AND ol.open_flag = 'Y';
9581: l_line_id NUMBER;
9582: --

Line 9748: FROM OE_ORDER_LINES L

9744:
9745: BEGIN
9746: SELECT 1
9747: INTO line_payment_not_exists
9748: FROM OE_ORDER_LINES L
9749: WHERE HEADER_ID = l_header_id
9750: AND invoice_interface_status_code = 'YES'
9751: AND NOT EXISTS
9752: (select 'x' from oe_payments

Line 9777: FROM OE_ORDER_LINES

9773: ELSE
9774: BEGIN
9775: SELECT 1
9776: INTO any_line_interfaced
9777: FROM OE_ORDER_LINES
9778: WHERE HEADER_ID = l_header_id
9779: AND invoice_interface_status_code = 'YES'
9780: AND ROWNUM = 1;
9781: EXCEPTION

Line 9829: from oe_order_lines

9825: l_header_id <> FND_API.G_MISS_NUM THEN
9826:
9827: BEGIN
9828: select 1 into l_lines_exist
9829: from oe_order_lines
9830: where header_id = l_header_id
9831: and rownum = 1;
9832:
9833: EXCEPTION

Line 9847: FROM OE_ORDER_LINES

9843:
9844: BEGIN
9845: SELECT 1
9846: INTO any_line_not_interfaced
9847: FROM OE_ORDER_LINES
9848: WHERE HEADER_ID = l_header_id
9849: AND NVL(invoice_interface_status_code, 'NO') in ('NO', 'MANUAL-PENDING', 'RFR-PENDING', 'ACCEPTANCE-PENDING')
9850: AND
9851: ( --Bug 5230279

Line 9903: FROM OE_ORDER_LINES

9899:
9900: BEGIN
9901: SELECT 1
9902: INTO this_line_interfaced
9903: FROM OE_ORDER_LINES
9904: WHERE LINE_ID = l_line_id
9905: AND invoice_interface_status_code = 'YES';
9906:
9907: EXCEPTION