DBA Data[Home] [Help]

APPS.OE_INVOICE_PUB dependencies on OE_ORDER_LINES

Line 346: l_existing_fsc oe_order_lines_all.flow_status_code%type; -- Bug 13870263

342: l_header_rec Oe_Order_Pub.Header_Rec_Type;
343: l_line_rec Oe_Order_Pub.Line_Rec_Type;
344: l_ret_stat Varchar2(30);
345: -- 8541809: End
346: l_existing_fsc oe_order_lines_all.flow_status_code%type; -- Bug 13870263
347: --
348: Begin
349: IF l_debug_level > 0 THEN
350: oe_debug_pub.add( 'Inside Update Line Flow Status');

Line 358: FROM oe_order_lines_all

354:
355: ------------ Bug 13870263:: Start
356: BEGIN
357: SELECT flow_status_code INTO l_existing_fsc
358: FROM oe_order_lines_all
359: WHERE line_id = p_line_id;
360: EXCEPTION
361: WHEN Others THEN
362: l_existing_fsc := NULL;

Line 385: Update oe_order_lines_all

381: RETURN;
382: END IF; -- Check on existing and new flow status codes.
383: ------------ Bug 13870263::: END
384:
385: Update oe_order_lines_all
386: Set flow_status_code = p_flow_status_code
387: , last_update_date = sysdate --BUG#9539541
388: , last_updated_by = NVL(oe_standard_wf.g_user_id, fnd_global.user_id) --BUG#9539541
389: Where line_id = p_line_id;

Line 717: FROM oe_order_lines_all ol, mtl_system_items msi

713: BEGIN
714: /*Bug3261460*/
715: SELECT msi.SERVICEABLE_PRODUCT_FLAG
716: INTO l_serviceable_product_flag
717: FROM oe_order_lines_all ol, mtl_system_items msi
718: WHERE ol.line_id = l_service_reference_line_id
719: AND ol.inventory_item_id = msi.inventory_item_id
720: AND msi.organization_id = nvl(ol.ship_from_org_id, oe_sys_parameters.value('MASTER_ORGANIZATION_ID', ol.org_id));
721: EXCEPTION

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

1077: SELECT NVL(lt.cust_trx_type_id, 0)
1078: INTO l_inv_cust_trx_type_id
1079: FROM oe_line_types_v lt
1080: WHERE lt.line_type_id = (SELECT line_type_id
1081: FROM oe_order_lines_all /* MOAC SQL CHANGE */
1082: WHERE line_id = p_line_rec.reference_line_id);
1083: IF l_debug_level > 0 THEN
1084: oe_debug_pub.add( 'CUSTOMER TRANSACTION TYPE ID FROM REFERENCE LINE TYPE : '||L_INV_CUST_TRX_TYPE_ID , 5 ) ;
1085: END IF;

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

1089: FROM oe_order_types_v ot,
1090: oe_order_headers_all oh /* MOAC SQL CHANGE */
1091: WHERE ot.order_type_id = oh.order_type_id
1092: AND oh.header_id = (SELECT header_id
1093: FROM oe_order_lines_all /* MOAC SQL CHANGE */
1094: WHERE line_id = p_line_rec.reference_line_id);
1095: END IF;
1096: IF l_debug_level > 0 THEN
1097: oe_debug_pub.add( 'CUSTOMER TRANSACTION TYPE ID FROM REFERENCE ORDER TYPE : '||L_INV_CUST_TRX_TYPE_ID , 5 ) ;

Line 1450: from OE_ORDER_LINES_ALL

1446: -- Get_Item_Description(l_line_rec, l_item_serviced_desc);
1447: BEGIN
1448: select inventory_item_id,ordered_item_id,sold_to_org_id,item_identifier_type,ordered_item,org_id
1449: into l_inventory_item_id,l_ordered_item_id,l_sold_to_org_id,l_item_identifier_type,l_ordered_item,l_org_id
1450: from OE_ORDER_LINES_ALL
1451: where line_id = l_service_reference_line_id;
1452: EXCEPTION
1453: WHEN NO_DATA_FOUND THEN
1454: IF l_debug_level > 0 THEN

Line 1949: FROM OE_ORDER_LINES

1945: --
1946: BEGIN
1947: SELECT item_type_code
1948: INTO l_item_type_code
1949: FROM OE_ORDER_LINES
1950: WHERE line_id = p_line_id;
1951: IF l_item_type_code = 'CLASS' THEN
1952: IF l_debug_level > 0 THEN
1953: oe_debug_pub.add( 'ITEM TYPE OF THIS LINE IS CLASS' , 5 ) ;

Line 1974: FROM oe_order_lines Line,

1970: x_RFR_children_tbl OUT NOCOPY Id_Tbl_Type)
1971: IS
1972: Cursor rfr_child is
1973: SELECT line_id
1974: FROM oe_order_lines Line,
1975: bom_inventory_components bic
1976: WHERE Line.link_to_line_id = p_line_id
1977: AND Line.open_flag || '' = 'Y'
1978: AND bic.component_sequence_id = Line.component_sequence_id

Line 2017: FROM oe_order_lines Line,

2013: -- siblings, to prevent selecting splitted
2014: -- lines
2015: Cursor rfr_sibling is
2016: SELECT line_id
2017: FROM oe_order_lines Line,
2018: bom_inventory_components bic
2019: WHERE Line.link_to_line_id = p_link_to_line_id
2020: AND Line.inventory_item_id <> p_line_inventory_item_id
2021: AND Line.open_flag || '' = 'Y'

Line 2061: FROM oe_order_lines Line,

2057: --
2058: BEGIN
2059: SELECT 'Y'
2060: INTO l_rfr
2061: FROM oe_order_lines Line,
2062: bom_inventory_components bic
2063: WHERE Line.line_id = p_line_id
2064: AND Line.open_flag || '' = 'Y'
2065: AND bic.component_sequence_id = Line.component_sequence_id

Line 2130: from oe_order_lines

2126: IF l_child_rec.inventory_item_id <> l_child_inventory_item_id then
2127: l_child_inventory_item_id := l_child_rec.inventory_item_id;
2128: select nvl(sum(ordered_quantity), 0), nvl(sum(fulfilled_quantity), 0)
2129: into l_child_total_ordered_qty, l_child_total_fulfilled_qty
2130: from oe_order_lines
2131: where link_to_line_id = p_line_rec.line_id
2132: and inventory_item_id = l_child_inventory_item_id;
2133: l_ratio := nvl(p_line_rec.ordered_quantity,0) / l_child_total_ordered_qty;
2134: -- ordered_quantity must be according to ratio

Line 2174: from oe_order_lines

2170: IF l_sibling_rec.inventory_item_id <> l_sibling_inventory_item_id THEN
2171: l_sibling_inventory_item_id := l_sibling_rec.inventory_item_id;
2172: select nvl(sum(ordered_quantity), 0), nvl(sum(fulfilled_quantity), 0)
2173: into l_sibling_total_ordered_qty, l_sibling_total_fulfilled_qty
2174: from oe_order_lines
2175: where link_to_line_id = p_line_rec.link_to_line_id
2176: and inventory_item_id = l_sibling_inventory_item_id;
2177: -- current line may be splitted from the original line
2178: -- just like the sibling line may be splitted

Line 2181: from oe_order_lines

2177: -- current line may be splitted from the original line
2178: -- just like the sibling line may be splitted
2179: select nvl(sum(ordered_quantity), 0), nvl(sum(invoiced_quantity), 0)
2180: into l_total_ordered_qty, l_total_invoiced_qty
2181: from oe_order_lines
2182: where link_to_line_id = p_line_rec.link_to_line_id
2183: and inventory_item_id = p_line_rec.inventory_item_id;
2184: l_ratio := l_total_ordered_qty / l_sibling_total_ordered_qty;
2185: -- ordered_quantity must be according to ratio

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

2277: -- line is splitted
2278: -- get the total amounts
2279: select sum(nvl(ordered_quantity,0)), sum(nvl(fulfilled_quantity,nvl(shipped_quantity,0))), sum(nvl(invoiced_quantity,0))
2280: into l_unsplit_ordered_qty , l_unsplit_fulfilled_qty, l_unsplit_invoiced_qty
2281: from oe_order_lines_all where header_id = p_line_rec.header_id and line_set_id = p_line_rec.line_set_id;
2282: else
2283: l_unsplit_ordered_qty := nvl(p_line_rec.ordered_quantity,0);
2284: l_unsplit_fulfilled_qty := nvl(p_line_rec.fulfilled_quantity,nvl(p_line_rec.shipped_quantity,0));
2285: l_unsplit_invoiced_qty := nvl(p_line_rec.invoiced_quantity,0);

Line 2432: from oe_order_lines

2428: IF l_child_rec.inventory_item_id <> l_child_inventory_item_id then
2429: l_child_inventory_item_id := l_child_rec.inventory_item_id;
2430: select nvl(sum(ordered_quantity), 0), nvl(sum(fulfilled_quantity), 0)
2431: into l_child_total_ordered_qty, l_child_total_fulfilled_qty
2432: from oe_order_lines
2433: where link_to_line_id = p_line_rec.line_id
2434: and inventory_item_id = l_child_inventory_item_id;
2435: IF l_debug_level > 0 THEN
2436: 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 2519: FROM oe_order_lines

2515: SELECT NVL(SUM(ordered_quantity),0)
2516: ,NVL(SUM(fulfilled_quantity),0)
2517: INTO l_sibling_total_ordered_qty
2518: ,l_sibling_total_fulfilled_qty
2519: FROM oe_order_lines
2520: WHERE link_to_line_id = p_line_rec.link_to_line_id
2521: AND inventory_item_id = l_sibling_inventory_item_id;
2522:
2523: -- current line may be splitted from the original line

Line 2532: FROM oe_order_lines

2528: ,NVL(SUM(fulfilled_quantity),0)
2529: INTO l_total_ordered_qty
2530: ,l_total_invoiced_qty
2531: ,l_total_fulfilled_qty
2532: FROM oe_order_lines
2533: WHERE link_to_line_id = p_line_rec.link_to_line_id
2534: AND inventory_item_id = p_line_rec.inventory_item_id;
2535:
2536: l_ratio := l_total_ordered_qty/l_sibling_total_ordered_qty;

Line 4183: FROM oe_order_lines_all /*Bug3261460*/

4179: -- Check if service parent has parent (In case if service parent is an option, class, kit etc)
4180: BEGIN
4181: SELECT top_model_line_id
4182: INTO service_grand_parent_id
4183: FROM oe_order_lines_all /*Bug3261460*/
4184: WHERE line_id = l_service_reference_line_id;
4185: EXCEPTION
4186: WHEN NO_DATA_FOUND THEN
4187: IF l_debug_level > 0 THEN

Line 4716: from oe_order_lines_all

4712:
4713: cursor order_info(c_line_id number)
4714: is
4715: select header_id, line_id
4716: from oe_order_lines_all
4717: where line_id = c_line_id;
4718: --
4719: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
4720: --

Line 5119: FROM oe_order_lines ool,

5115: SELECT ooh.header_id
5116: , ool.line_id
5117: , ooh.order_number
5118: , ott.name order_type
5119: FROM oe_order_lines ool,
5120: oe_order_headers_all ooh, /* MOAC SQL CHANGE */
5121: oe_transaction_types_tl ott
5122: WHERE ool.line_id = c_line_id
5123: AND ooh.header_id = ool.header_id

Line 5457: FROM OE_ORDER_LINES

5453: for update nowait; -- Bug #3686558
5454:
5455: CURSOR config_for_model (l_line_id NUMBER) IS
5456: SELECT LINE_ID
5457: FROM OE_ORDER_LINES
5458: WHERE LINK_TO_LINE_ID = l_line_id
5459: AND ITEM_TYPE_CODE = 'CONFIG';
5460:
5461: --

Line 6233: FROM oe_order_lines_all ool,

6229:
6230: BEGIN
6231: SELECT max(actual_shipment_date)
6232: INTO l_max_actual_shipment_date
6233: FROM oe_order_lines_all ool,
6234: oe_line_sets ols
6235: WHERE ool.shippable_flag = 'Y'
6236: AND ool.line_id = ols.line_id
6237: AND ols.set_id IN (SELECT os.set_id

Line 7191: from oe_order_lines_all

7187: IF l_parent_line_id IS NOT NULL THEN
7188: BEGIN
7189: Select top_model_line_id
7190: into l_top_model_line_id
7191: from oe_order_lines_all
7192: where line_id = l_parent_line_id ;
7193: EXCEPTION WHEN NO_DATA_FOUND THEN
7194: p_x_interface_line_rec.parent_line_id := l_parent_line_id ;
7195: END;

Line 7826: UPDATE OE_ORDER_LINES_ALL

7822: oe_debug_pub.add( ' UPDATING p_line_rec.SERVICE_START_DATE = '||p_line_rec.SERVICE_START_DATE , 5 ) ; -- bug# 7231974
7823: oe_debug_pub.add( ' p_line_rec.SERVICE_END_DATE = '|| p_line_rec.SERVICE_END_DATE , 5 ) ;
7824: END IF;
7825:
7826: UPDATE OE_ORDER_LINES_ALL
7827: SET INVOICE_INTERFACE_STATUS_CODE = p_invoice_interface_status,
7828: INVOICED_QUANTITY = l_invoiced_quantity,
7829: FLOW_STATUS_CODE = l_flow_status_code,
7830: 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 8076: FROM oe_order_lines

8072: oe_debug_pub.add( 'ENTER HEADER_ACTIVITY ( ) PROCEDURE ' , 5 ) ;
8073: END IF;
8074: SELECT header_id
8075: INTO l_header_id
8076: FROM oe_order_lines
8077: WHERE line_id = p_line_id;
8078: RETURN( WF_ENGINE.Activity_Exist_In_Process(
8079: p_item_type => OE_GLOBALS.G_WFI_HDR
8080: ,p_item_key => to_char(l_header_id)

Line 8359: FROM oe_order_lines Line

8355: l_freight_count NUMBER;
8356:
8357: CURSOR Pending_Lines IS
8358: SELECT Line.line_id --SQL# 16487863 Added the UNION clause to avoid FTS
8359: FROM oe_order_lines Line
8360: WHERE (Line.link_to_line_id = p_line_rec.link_to_line_id)
8361: AND invoice_interface_status_code = 'RFR-PENDING'
8362: UNION
8363: SELECT Line.line_id

Line 8364: FROM oe_order_lines Line

8360: WHERE (Line.link_to_line_id = p_line_rec.link_to_line_id)
8361: AND invoice_interface_status_code = 'RFR-PENDING'
8362: UNION
8363: SELECT Line.line_id
8364: FROM oe_order_lines Line
8365: WHERE (Line.line_id = p_line_rec.link_to_line_id)
8366: AND invoice_interface_status_code = 'RFR-PENDING';
8367:
8368: l_pending_line_id NUMBER;

Line 8909: FROM oe_order_lines Line

8905: for update of dd.source_line_id nowait;
8906:
8907: CURSOR Pending_Lines IS
8908: SELECT Line.line_id
8909: FROM oe_order_lines Line
8910: WHERE (Line.link_to_line_id = l_line_rec.link_to_line_id
8911: OR Line.line_id = l_line_rec.link_to_line_id)
8912: AND invoice_interface_status_code = 'RFR-PENDING';
8913: --

Line 8993: from oe_order_lines_all where line_id = l_line_rec.line_id

8989: --bug 5336623
8990: begin
8991:
8992: select line_id, lock_control into v_line_id, v_lock_control
8993: from oe_order_lines_all where line_id = l_line_rec.line_id
8994: FOR UPDATE NOWAIT;
8995:
8996: IF l_debug_level > 0 THEN
8997: oe_debug_pub.add('Locking successful');

Line 9100: UPDATE oe_order_lines_all

9096: ||'and End Date'
9097: ||to_char(l_line_rec.SERVICE_END_DATE,'DD-MON-YYYY HH24:MI:SS')
9098: ||' for line_id= '||l_line_rec.line_id);
9099: End IF;
9100: UPDATE oe_order_lines_all
9101: SET SERVICE_START_DATE = l_line_rec.SERVICE_START_DATE,
9102: SERVICE_END_DATE = l_line_rec.SERVICE_END_DATE
9103: WHERE line_id = l_line_rec.line_id;
9104: l_old_line_tbl(1) := l_line_rec;

Line 9147: from oe_order_lines_all l

9143: -- there is no requery happening within the current procedure
9144: BEGIN
9145: Select l.service_first_period_amount , l.service_first_period_enddate
9146: into l_line_rec.service_first_period_amount , l_line_rec.service_first_period_enddate
9147: from oe_order_lines_all l
9148: where l.line_id = l_line_rec.line_id;
9149: EXCEPTION
9150: WHEN NO_DATA_FOUND THEN
9151: IF l_debug_level > 0 THEN

Line 9539: FROM oe_order_lines

9535: FETCH delivery_lines_cursor INTO l_line_id;
9536: EXIT WHEN delivery_lines_cursor%NOTFOUND;
9537: SELECT invoice_interface_status_code, open_flag
9538: INTO l_interface_status_code, l_open_flag
9539: FROM oe_order_lines
9540: WHERE line_id = l_line_id;
9541: IF l_debug_level > 0 THEN
9542: oe_debug_pub.add( 'LINE ID : '||L_LINE_ID , 5 ) ;
9543: END IF;

Line 10140: FROM oe_order_lines ol

10136: l_result_out VARCHAR2(30);
10137: l_flow_status_code VARCHAR2(30);
10138: CURSOR order_line_cursor IS
10139: SELECT ol.line_id
10140: FROM oe_order_lines ol
10141: WHERE ol.header_id = p_header_id
10142: AND ol.open_flag = 'Y';
10143: l_line_id NUMBER;
10144:

Line 10354: FROM OE_ORDER_LINES L

10350:
10351: BEGIN
10352: SELECT 1
10353: INTO line_payment_not_exists
10354: FROM OE_ORDER_LINES L
10355: WHERE HEADER_ID = l_header_id
10356: AND invoice_interface_status_code = 'YES'
10357: AND NOT EXISTS
10358: (select 'x' from oe_payments

Line 10383: FROM OE_ORDER_LINES

10379: ELSE
10380: BEGIN
10381: SELECT 1
10382: INTO any_line_interfaced
10383: FROM OE_ORDER_LINES
10384: WHERE HEADER_ID = l_header_id
10385: AND invoice_interface_status_code = 'YES'
10386: AND ROWNUM = 1;
10387: EXCEPTION

Line 10437: from oe_order_lines

10433: l_header_id <> FND_API.G_MISS_NUM THEN
10434:
10435: BEGIN
10436: select 1 into l_lines_exist
10437: from oe_order_lines
10438: where header_id = l_header_id
10439: and rownum = 1;
10440:
10441: EXCEPTION

Line 10455: FROM OE_ORDER_LINES

10451:
10452: BEGIN
10453: SELECT 1
10454: INTO any_line_not_interfaced
10455: FROM OE_ORDER_LINES
10456: WHERE HEADER_ID = l_header_id
10457: AND NVL(invoice_interface_status_code, 'NO') in ('NO', 'MANUAL-PENDING', 'RFR-PENDING', 'ACCEPTANCE-PENDING')
10458: AND
10459: ( --Bug 5230279

Line 10511: FROM OE_ORDER_LINES

10507:
10508: BEGIN
10509: SELECT 1
10510: INTO this_line_interfaced
10511: FROM OE_ORDER_LINES
10512: WHERE LINE_ID = l_line_id
10513: AND invoice_interface_status_code = 'YES';
10514:
10515: EXCEPTION