DBA Data[Home] [Help]

APPS.OE_UPG_SO_NEW dependencies on OE_ORDER_LINES_ALL

Line 1582: from oe_order_lines_all l

1578:
1579: if v_reference_line_id is not null then
1580: begin
1581: select l.header_id into v_reference_header_id
1582: from oe_order_lines_all l
1583: where line_id = v_reference_line_id;
1584: exception
1585: when no_data_found then
1586: G_ERROR_MESSAGE := 'Referenced Order of the RMA'

Line 2080: insert into oe_order_lines_all

2076: THEN
2077: G_OPEN_ATO_MODEL := 1;
2078: END IF;
2079:
2080: insert into oe_order_lines_all
2081: (
2082: line_id,
2083: org_id,
2084: header_id,

Line 5211: UPDATE /*+ INDEX(OE_ORDER_LINES_N10) */ OE_ORDER_LINES_ALL

5207: -- Update remnant_flag in oe_order_lines
5208:
5209: l_count := l_count + 1;
5210:
5211: UPDATE /*+ INDEX(OE_ORDER_LINES_N10) */ OE_ORDER_LINES_ALL
5212: SET model_remnant_flag='Y'
5213: WHERE top_model_line_id=l_parent_line_id
5214: AND model_remnant_flag is null ;
5215:

Line 5272: oe_order_lines_all

5268: ship_to_org_id,
5269: schedule_ship_date,
5270: schedule_status_code
5271: from
5272: oe_order_lines_all
5273: where
5274: header_id = G_HEADER_ID;
5275:
5276: cursor service_product_lines (p_serviceable_line_id IN NUMBER) IS

Line 5371: FROM oe_order_lines_all

5367:
5368: SELECT /*+ INDEX(OE_ORDER_LINES_N1) */
5369: count(*)
5370: INTO l_count
5371: FROM oe_order_lines_all
5372: WHERE ato_line_id = l_temp_record.ato_line_id
5373: AND top_model_line_id = l_temp_record.top_model_line_id
5374: AND header_id = G_HEADER_ID;
5375:

Line 5460: -- in oe_order_lines_all table

5456: into l_old_line_id2, l_new_line_id2;
5457: EXIT WHEN log_service_lines%NOTFOUND;
5458:
5459: -- Now update the service line
5460: -- in oe_order_lines_all table
5461:
5462: l_update_table(l_new_line_id2).service_reference_line_id := l_new_line_id1;
5463: l_update_table(l_new_line_id2).temp_update_flag := 'Y';
5464:

Line 5582: FROM OE_ORDER_LINES_ALL

5578: IF l_get_table(l_temp_index).ato_line_id is not NULL THEN
5579: BEGIN
5580: SELECT /*+ INDEX(OE_ORDER_LINES_N1) */ ACTUAL_SHIPMENT_DATE
5581: INTO l_update_table(l_temp_index).actual_shipment_date
5582: FROM OE_ORDER_LINES_ALL
5583: WHERE TOP_MODEL_LINE_ID = l_get_table(l_temp_index).top_model_line_id
5584: AND ATO_LINE_ID = l_get_table(l_temp_index).ato_line_id
5585: AND ITEM_TYPE_CODE='CONFIG'
5586: AND header_id=G_HEADER_ID;

Line 5809: UPDATE /*+ INDEX(OE_ORDER_LINES_U1) */ OE_ORDER_LINES_ALL

5805: LOOP
5806:
5807: IF l_update_table(l_update_index).temp_update_flag = 'Y' THEN
5808:
5809: UPDATE /*+ INDEX(OE_ORDER_LINES_U1) */ OE_ORDER_LINES_ALL
5810: SET SHIPPED_QUANTITY = l_update_table(l_update_index).shipped_quantity,
5811: FULFILLED_FLAG = l_update_table(l_update_index).fulfilled_flag,
5812: FULFILLED_QUANTITY = l_update_table(l_update_index).fulfilled_quantity,
5813: ACTUAL_SHIPMENT_DATE = l_update_table(l_update_index).actual_shipment_date,

Line 5872: oe_order_lines_all oeol

5868: sla1.inventory_item_id,
5869: sla1.unit_code
5870: from
5871: so_lines_all sla1, so_lines_all sla2, oe_upgrade_log upg,
5872: oe_order_lines_all oeol
5873: where sla1.header_id = G_HEADER_ID
5874: and sla1.line_type_code = 'PARENT'
5875: and sla1.item_type_code in ('KIT','MODEL','STANDARD')
5876: and sla1.parent_line_id is null -- To filter out option lines

Line 5889: FROM OE_ORDER_LINES_ALL OOLA,

5885:
5886: SELECT /*+ ORDERED USE_NL(OOLA SLA UPG) INDEX(oola OE_ORDER_LINES_N1)
5887: INDEX(upg OE_UPGRADE_LOG_N6) index(sla SO_LINES_U1) */
5888: OOLA.LINE_ID,OOLA.LINE_NUMBER
5889: FROM OE_ORDER_LINES_ALL OOLA,
5890: OE_UPGRADE_LOG UPG ,
5891: SO_LINES_ALL SLA
5892: WHERE OOLA.HEADER_ID = G_HEADER_ID AND
5893: OOLA.LINE_ID = UPG.NEW_LINE_ID AND

Line 5916: from oe_upgrade_log_v lg, oe_order_lines_all ln

5912: and parent_line_id is null -- To filter out options (included on Leena's instn.)
5913: -- and sla.line_id in
5914: and exists
5915: (select /*+ INDEX(ln OE_ORDER_LINES_N1) */lg.old_line_id
5916: from oe_upgrade_log_v lg, oe_order_lines_all ln
5917: where ln.header_id = sla.header_id
5918: and lg.old_line_id = sla.line_id
5919: and lg.new_line_id = ln.line_id
5920: and ln.item_type_code not in ('INCLUDED','CONFIG')

Line 6007: update oe_order_lines_all

6003: for c4 in c3 loop
6004:
6005: v_shipment_number := v_shipment_number + 1;
6006:
6007: update oe_order_lines_all
6008: set line_set_id = v_set_id,
6009: line_number = p_line_number,
6010: shipment_number = v_shipment_number
6011: where line_id = c4.line_id;

Line 6090: oe_order_lines_all

6086: begin
6087: v_item_type_code := null;
6088: select item_type_code into
6089: v_item_type_code from
6090: oe_order_lines_all
6091: where
6092: line_id = c8.line_id;
6093: exception
6094: when no_data_found then

Line 6103: update oe_order_lines_all ooal

6099: v_item_type_code = 'KIT' THEN
6100:
6101: v_shipment_number := v_shipment_number + 1;
6102:
6103: update oe_order_lines_all ooal
6104: set line_set_id = v_set_id,
6105: line_number = p_line_number,
6106: shipment_number = v_shipment_number
6107: where ooal.line_id = c8.line_id;

Line 6146: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */ line_id,ordered_quantity,shipped_quantity

6142:
6143: PROCEDURE insert_multiple_models IS
6144:
6145: cursor multiple_cfg_detail(p_ato_line_id IN NUMBER) IS
6146: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */ line_id,ordered_quantity,shipped_quantity
6147: from oe_order_lines_all
6148: where header_id = G_HEADER_ID
6149: and ato_line_id=p_ato_line_id
6150: and item_type_code = 'CONFIG';

Line 6147: from oe_order_lines_all

6143: PROCEDURE insert_multiple_models IS
6144:
6145: cursor multiple_cfg_detail(p_ato_line_id IN NUMBER) IS
6146: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */ line_id,ordered_quantity,shipped_quantity
6147: from oe_order_lines_all
6148: where header_id = G_HEADER_ID
6149: and ato_line_id=p_ato_line_id
6150: and item_type_code = 'CONFIG';
6151:

Line 6153: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */

6149: and ato_line_id=p_ato_line_id
6150: and item_type_code = 'CONFIG';
6151:
6152: cursor multiple_cfg_parent IS
6153: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
6154: ato_line_id
6155: from oe_order_lines_all
6156: where header_id = G_HEADER_ID
6157: group by ato_line_id,item_type_code

Line 6155: from oe_order_lines_all

6151:
6152: cursor multiple_cfg_parent IS
6153: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
6154: ato_line_id
6155: from oe_order_lines_all
6156: where header_id = G_HEADER_ID
6157: group by ato_line_id,item_type_code
6158: having item_type_code = 'CONFIG'
6159: and count(*) > 1;

Line 6162: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */

6158: having item_type_code = 'CONFIG'
6159: and count(*) > 1;
6160:
6161: cursor model_and_options(p_ato_line_id IN NUMBER) IS
6162: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
6163: line_id
6164: from oe_order_lines_all
6165: where header_id = G_HEADER_ID
6166: and ato_line_id=p_ato_line_id

Line 6164: from oe_order_lines_all

6160:
6161: cursor model_and_options(p_ato_line_id IN NUMBER) IS
6162: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
6163: line_id
6164: from oe_order_lines_all
6165: where header_id = G_HEADER_ID
6166: and ato_line_id=p_ato_line_id
6167: and item_type_code <> 'CONFIG'
6168: order by component_code;

Line 6171: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */

6167: and item_type_code <> 'CONFIG'
6168: order by component_code;
6169:
6170: cursor service_lines(p_service_reference_line_id IN NUMBER) IS
6171: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
6172: line_id
6173: from oe_order_lines_all
6174: where header_id = G_HEADER_ID
6175: and service_reference_line_id = p_service_reference_line_id;

Line 6173: from oe_order_lines_all

6169:
6170: cursor service_lines(p_service_reference_line_id IN NUMBER) IS
6171: select /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
6172: line_id
6173: from oe_order_lines_all
6174: where header_id = G_HEADER_ID
6175: and service_reference_line_id = p_service_reference_line_id;
6176:
6177: l_cfg_line_id NUMBER;

Line 6210: FROM oe_order_lines_all

6206:
6207: BEGIN
6208: SELECT ordered_quantity
6209: INTO l_orig_model_quantity
6210: FROM oe_order_lines_all
6211: WHERE line_id=p_ato_line_id;
6212: EXCEPTION
6213: WHEN OTHERS THEN
6214: l_orig_model_quantity := 0;

Line 6235: UPDATE OE_ORDER_LINES_ALL

6231: BEGIN
6232:
6233: IF l_orig_model_quantity > 0 THEN
6234:
6235: UPDATE OE_ORDER_LINES_ALL
6236:
6237: SET ordered_quantity = ordered_quantity/l_orig_model_quantity *
6238: l_cfg_ordered_quantity,
6239: shipped_quantity = ordered_quantity/l_orig_model_quantity *

Line 6252: UPDATE OE_ORDER_LINES_ALL OOL

6248: WHERE header_id=G_HEADER_ID
6249: AND ato_line_id=p_ato_line_id
6250: AND item_type_code <> 'CONFIG';
6251:
6252: UPDATE OE_ORDER_LINES_ALL OOL
6253: SET OOL.ORDERED_QUANTITY = (SELECT ORDERED_QUANTITY
6254: FROM OE_ORDER_LINES_ALL OOL1
6255: WHERE OOL1.LINE_ID = OOL.SERVICE_REFERENCE_LINE_ID)
6256: WHERE OOL.HEADER_ID = G_HEADER_ID

Line 6254: FROM OE_ORDER_LINES_ALL OOL1

6250: AND item_type_code <> 'CONFIG';
6251:
6252: UPDATE OE_ORDER_LINES_ALL OOL
6253: SET OOL.ORDERED_QUANTITY = (SELECT ORDERED_QUANTITY
6254: FROM OE_ORDER_LINES_ALL OOL1
6255: WHERE OOL1.LINE_ID = OOL.SERVICE_REFERENCE_LINE_ID)
6256: WHERE OOL.HEADER_ID = G_HEADER_ID
6257: AND OOL.ITEM_TYPE_CODE = 'SERVICE';
6258:

Line 6264: FROM oe_order_lines_all

6260:
6261: BEGIN
6262: SELECT ordered_quantity
6263: INTO l_orig_model_quantity
6264: FROM oe_order_lines_all
6265: WHERE line_id=p_ato_line_id;
6266: EXCEPTION
6267: WHEN OTHERS THEN
6268: l_orig_model_quantity := 0;

Line 6366: UPDATE oe_order_lines_all

6362: INSERT_ROW(l_new_line_rec, l_line_id);
6363:
6364: -- Update the config item to point to the new model.
6365:
6366: UPDATE oe_order_lines_all
6367: SET ato_line_id = l_model_rec.line_id,
6368: top_model_line_id = l_model_rec.top_model_line_id,
6369: link_to_line_id = l_model_rec.line_id
6370: WHERE line_id=l_cfg_line_id;

Line 6372: UPDATE oe_order_lines_all

6368: top_model_line_id = l_model_rec.top_model_line_id,
6369: link_to_line_id = l_model_rec.line_id
6370: WHERE line_id=l_cfg_line_id;
6371: /*
6372: UPDATE oe_order_lines_all
6373: SET link_to_line_id = l_model_rec.line_id
6374: WHERE line_id=l_cfg_line_id;
6375: */
6376: OPEN service_lines(l_line_id);

Line 6473: UPDATE OE_ORDER_LINES_ALL OEOPT

6469:
6470: /* Update LINK_TO_LINE_ID for all the new classes and options
6471: created */
6472:
6473: UPDATE OE_ORDER_LINES_ALL OEOPT
6474: SET LINK_TO_LINE_ID = (
6475: SELECT OELNK.LINE_ID
6476: FROM OE_ORDER_LINES_ALL OELNK
6477: WHERE( OELNK.LINE_ID = OEOPT.TOP_MODEL_LINE_ID

Line 6476: FROM OE_ORDER_LINES_ALL OELNK

6472:
6473: UPDATE OE_ORDER_LINES_ALL OEOPT
6474: SET LINK_TO_LINE_ID = (
6475: SELECT OELNK.LINE_ID
6476: FROM OE_ORDER_LINES_ALL OELNK
6477: WHERE( OELNK.LINE_ID = OEOPT.TOP_MODEL_LINE_ID
6478: OR OELNK.TOP_MODEL_LINE_ID = OEOPT.TOP_MODEL_LINE_ID )
6479: AND OELNK.COMPONENT_CODE =
6480: SUBSTR( OEOPT.COMPONENT_CODE,

Line 6803: FROM OE_ORDER_LINES_ALL

6799: , CALCULATE_PRICE_FLAG
6800: , COMMITMENT_ID
6801: , UPGRADED_FLAG
6802: , ORDER_SOURCE_ID -- aksingh
6803: FROM OE_ORDER_LINES_ALL
6804: WHERE LINE_ID = p_line_id ;
6805:
6806:
6807: --

Line 7150: INSERT INTO OE_ORDER_LINES_ALL

7146: when others then
7147: G_OLD_LINE_ID := 0;
7148: end;
7149:
7150: INSERT INTO OE_ORDER_LINES_ALL
7151: ( ORG_ID
7152: , ACCOUNTING_RULE_ID
7153: , ACTUAL_ARRIVAL_DATE
7154: , ACTUAL_SHIPMENT_DATE

Line 8413: from oe_order_lines_all

8409: l_line_number := g_Last_Line_Number;
8410: else
8411: begin
8412: Select max(line_number) into l_line_number
8413: from oe_order_lines_all
8414: where header_id = l_line_rec.header_id;
8415:
8416: l_line_number := l_line_number + 1;
8417: exception

Line 8543: from oe_order_lines_all l1, oe_order_lines_all l2

8539: l_header_id number;
8540: v_error_code number;
8541: Cursor C1 is
8542: Select/*+ INDEX(l1 OE_ORDER_LINES_N1) INDEX(l2 OE_ORDER_LINES_U1) */ l1.line_id,l1.header_id
8543: from oe_order_lines_all l1, oe_order_lines_all l2
8544: where l1.reference_line_id = l2.line_id
8545: and l2.item_type_code in ('MODEL','CLASS','KIT')
8546: and l2.ato_line_id is null
8547: and l1.line_category_code = 'RETURN'

Line 8608: from oe_order_lines_all l1, oe_order_lines_all l2

8604: l_fulfillment_set_id number;
8605: l_fulfillment_ref_line_id number;
8606: Cursor C1 is
8607: Select /*+ INDEX(l1 OE_ORDER_LINES_N1) INDEX(l2 OE_ORDER_LINES_U1) */ l1.header_id
8608: from oe_order_lines_all l1, oe_order_lines_all l2
8609: where l1.header_id = p_header_id
8610: and l1.reference_line_id = l2.line_id
8611: and nvl(l1.open_flag,'-') = 'Y'
8612: and l2.item_type_code in ('MODEL','CLASS','KIT')

Line 8618: from oe_order_lines_all l1, oe_order_lines_all l2

8614:
8615: Cursor C2 is
8616: Select /*+ INDEX(l1 OE_ORDER_LINES_N1) INDEX(l2 OE_ORDER_LINES_U1) */
8617: l1.line_id,l2.item_type_code,l2.line_id ref_line_id,l2.header_id ref_header_id
8618: from oe_order_lines_all l1, oe_order_lines_all l2
8619: where l1.reference_line_id = l2.line_id
8620: and l1.inventory_item_id = l2.inventory_item_id
8621: and nvl(l1.open_flag,'-') = 'Y'
8622: and l2.item_type_code in ('MODEL','CLASS')

Line 8627: from oe_order_lines_all

8623: and l2.ato_line_id = l2.line_id
8624: and l1.header_id = l_header_id;
8625: Cursor C3_1 is
8626: Select /*+ INDEX(OE_ORDER_LINES_N1) */ line_id
8627: from oe_order_lines_all
8628: where ato_line_id = l_ref_line_id
8629: and header_id = l_ref_header_id
8630: and item_type_code = 'CONFIG';
8631: Cursor C3_2 is

Line 8633: from oe_order_lines_all

8629: and header_id = l_ref_header_id
8630: and item_type_code = 'CONFIG';
8631: Cursor C3_2 is
8632: Select /*+ INDEX(OE_ORDER_LINES_N1) */ line_id
8633: from oe_order_lines_all
8634: where item_type_code in ('CLASS','CONFIG','OPTION')
8635: and header_id = l_ref_header_id
8636: and ato_line_id = l_ref_line_id
8637: and ato_line_id <> line_id;

Line 8640: from oe_order_lines_all

8636: and ato_line_id = l_ref_line_id
8637: and ato_line_id <> line_id;
8638: Cursor C3_3 is
8639: Select /*+ INDEX(OE_ORDER_LINES_N1) */ line_id
8640: from oe_order_lines_all
8641: where reference_line_id = l_fulfillment_ref_line_id
8642: and header_id = l_header_id;
8643: Cursor C4 is
8644: Select /*+ INDEX(l1 OE_ORDER_LINES_N1) INDEX(l2 OE_ORDER_LINES_U1) */

Line 8646: from oe_order_lines_all l1, oe_order_lines_all l2

8642: and header_id = l_header_id;
8643: Cursor C4 is
8644: Select /*+ INDEX(l1 OE_ORDER_LINES_N1) INDEX(l2 OE_ORDER_LINES_U1) */
8645: l1.line_id,l2.item_type_code,l2.line_id ref_line_id,l2.header_id ref_header_id
8646: from oe_order_lines_all l1, oe_order_lines_all l2
8647: where l1.reference_line_id = l2.line_id
8648: and l1.inventory_item_id = l2.inventory_item_id
8649: and l2.item_type_code in ('MODEL','CLASS','KIT')
8650: and l2.ato_line_id is null

Line 8656: from oe_order_lines_all

8652: and l1.header_id = l_header_id;
8653: Cursor C5 is
8654: Select /*+ INDEX(OE_ORDER_LINES_N1) */
8655: line_id,inventory_item_id
8656: from oe_order_lines_all
8657: where item_type_code in ('INCLUDED')
8658: and header_id = l_ref_header_id
8659: and link_to_line_id = l_ref_line_id;
8660: Cursor C5_1 is

Line 8663: from oe_order_lines_all

8659: and link_to_line_id = l_ref_line_id;
8660: Cursor C5_1 is
8661: Select /*+ INDEX(OE_ORDER_LINES_N1) */
8662: line_id
8663: from oe_order_lines_all
8664: where reference_line_id = l_fulfillment_ref_line_id
8665: and header_id = l_header_id;
8666: l_temp_rec C1%ROWTYPE;
8667: --

Line 8700: Update /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */

8696: Fetch C3_1 into l_config_line_id;
8697: Close C3_1;
8698:
8699: IF l_config_line_id is not null THEN
8700: Update /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
8701: oe_order_lines_all
8702: set reference_line_id = l_config_line_id,
8703: ordered_item_id = inventory_item_id,
8704: unit_list_price = null,

Line 8701: oe_order_lines_all

8697: Close C3_1;
8698:
8699: IF l_config_line_id is not null THEN
8700: Update /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
8701: oe_order_lines_all
8702: set reference_line_id = l_config_line_id,
8703: ordered_item_id = inventory_item_id,
8704: unit_list_price = null,
8705: unit_selling_price = null

Line 8712: from oe_order_lines_all

8708: and header_id = l_header_id;
8709: /*
8710: delete from oe_price_adjustments
8711: where line_id in (select line_id
8712: from oe_order_lines_all
8713: where reference_line_id = l_config_line_id);
8714: */
8715: END IF;
8716:

Line 8769: Update /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */

8765: -- Fix References for Included Items
8766: --
8767:
8768: FOR l_rec1_1 in C5 LOOP
8769: Update /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
8770: oe_order_lines_all
8771: set reference_line_id = l_rec1_1.line_id
8772: where reference_line_id = l_ref_line_id
8773: and inventory_item_id = l_rec1_1.inventory_item_id

Line 8770: oe_order_lines_all

8766: --
8767:
8768: FOR l_rec1_1 in C5 LOOP
8769: Update /*+ INDEX(OE_ORDER_LINES_ALL OE_ORDER_LINES_N1) */
8770: oe_order_lines_all
8771: set reference_line_id = l_rec1_1.line_id
8772: where reference_line_id = l_ref_line_id
8773: and inventory_item_id = l_rec1_1.inventory_item_id
8774: and line_id <> l_line_id

Line 8835: select line_id from oe_order_lines_all

8831:
8832: Procedure Upgrade_Upd_Serv_Ref_line_id
8833: IS
8834: cursor serviceable_lines is
8835: select line_id from oe_order_lines_all
8836: where item_type_code <> 'SERVICE';
8837:
8838: cursor service_product_lines (p_serviceable_line_id IN NUMBER) IS
8839: select line_id , service_parent_line_id

Line 8908: -- in oe_order_lines_all table

8904: EXIT WHEN log_service_lines%NOTFOUND;
8905:
8906:
8907: -- Now update the service line
8908: -- in oe_order_lines_all table
8909:
8910: update oe_order_lines_all
8911: set service_reference_line_id = l_new_line_id1
8912: where line_id = l_new_line_id2;

Line 8910: update oe_order_lines_all

8906:
8907: -- Now update the service line
8908: -- in oe_order_lines_all table
8909:
8910: update oe_order_lines_all
8911: set service_reference_line_id = l_new_line_id1
8912: where line_id = l_new_line_id2;
8913:
8914: END LOOP;