140:
141: CURSOR l_order_hdr_csr (p_ordlineid NUMBER)
142: IS
143: SELECT oh.header_id, oh.order_number
144: FROM oe_order_lines_all ol, oe_order_headers_all oh
145: WHERE ol.line_id = (p_ordlineid)
146: AND oh.org_id = okc_context.get_okc_org_id
147: AND oh.header_id = ol.header_id;
148:
168: IS
169: SELECT comms_nl_trackable_flag
170: FROM mtl_system_items_b
171: WHERE inventory_item_id = (SELECT inventory_item_id
172: FROM oe_order_lines_all
173: WHERE line_id = l_ref_order_line_id)
174: AND organization_id = l_organization_id
175: AND serviceable_product_flag = 'Y' ; /*BUG6181908 -- FP Bug#6006309*/
176:
747: /*cgopinee bugfix for bug 8276025*/
748: /* CURSOR l_pricing_qty_csr(p_ordline_id Number)
749: IS
750: SELECT pricing_quantity
751: FROM oe_order_lines_all
752: WHERE line_id=p_ordline_id;*/
753:
754: /* Commented above cursor as part of bug#13655785 */
755: CURSOR l_ordered_qty_csr(p_ordline_id Number)
754: /* Commented above cursor as part of bug#13655785 */
755: CURSOR l_ordered_qty_csr(p_ordline_id Number)
756: IS
757: SELECT ordered_quantity
758: FROM oe_order_lines_all
759: WHERE line_id=p_ordline_id;
760:
761: --General
762: l_index NUMBER;
820: IS
821: SELECT csi.install_date, ol.actual_shipment_date,
822: mtl.service_starting_delay
823: FROM csi_item_instances csi,
824: oe_order_lines_all ol,
825: okx_system_items_v mtl
826: WHERE csi.instance_id = p_cp_id
827: AND csi.last_oe_order_line_id = ol.line_id
828: AND csi.inventory_item_id = mtl.id1
936:
937: /*Added for CLOUD ER 16039680*/
938: CURSOR get_item_type(l_instance_id NUMBER) IS
939: SELECT b.contract_item_type_code
940: FROM csi_item_instances csi,oe_order_lines_all ol,
941: mtl_system_items_b_kfv b,
942: mtl_system_items_tl t
943: WHERE csi.last_oe_order_line_id=ol.line_id
944: AND csi.instance_id = l_instance_id
949: AND b.organization_id = okc_context.get_okc_organization_id;
950:
951: CURSOR Check_Contract_Exists(p_instance_id NUMBER,p_order_header_id NUMBER) IS
952: SELECT okro.chr_id
953: FROM okc_k_rel_objs okro,oe_order_lines_all ol,csi_item_instances csi
954: WHERE ol.line_id=okro.object1_id1
955: AND csi.last_oe_order_line_id=ol.line_id
956: AND csi.instance_id=p_instance_id
957: AND ol.header_id=p_order_header_id;
958:
959: CURSOR get_billing_dtls_OM(p_order_line_id NUMBER)
960: IS
961: SELECT Nvl(SERVICE_BILL_OPTION_CODE,'FBOM'),SERVICE_BILL_PROFILE_ID,ordered_quantity
962: FROM oe_order_lines_all
963: WHERE line_id=p_order_line_id;
964:
965:
966:
3067: CURSOR get_order_lines_csr (p_ord_num NUMBER)
3068: IS
3069: SELECT ol.line_id, NVL (fulfilled_quantity, 0),
3070: service_reference_type_code, service_reference_line_id
3071: FROM oe_order_lines_all ol, oe_order_headers oh
3072: WHERE oh.header_id = ol.header_id
3073: AND oh.order_number = p_ord_num;
3074:
3075: --and Oh.org_id = okc_context.get_okc_org_id;
3077: /*
3078: Cursor get_ordlines_dtls_csr(p_ord_line_id NUMBER)
3079: Is
3080: Select Nvl(FULFILLED_QUANTITY,0),SERVICE_REFERENCE_TYPE_CODE,SERVICE_REFERENCE_LINE_ID
3081: From oe_order_lines_all
3082: Where line_id = p_ord_line_id
3083: and header_id IN (select header_id from oe_order_headers_all where org_id = okc_context.get_okc_org_id);
3084: */
3085:
4488:
4489: CURSOR l_order_hdr_csr (p_ordlineid NUMBER)
4490: IS
4491: SELECT oh.header_id, oh.order_number
4492: FROM oe_order_lines_all ol, oe_order_headers_all oh
4493: WHERE ol.line_id = (p_ordlineid)
4494: AND oh.org_id = okc_context.get_okc_org_id
4495: AND oh.header_id = ol.header_id;
4496:
4516: IS
4517: SELECT comms_nl_trackable_flag
4518: FROM mtl_system_items_b
4519: WHERE inventory_item_id = (SELECT inventory_item_id
4520: FROM oe_order_lines_all
4521: WHERE line_id = l_ref_order_line_id)
4522: AND organization_id = l_organization_id;
4523:
4524: l_order_rec l_order_csr%ROWTYPE;