[Home] [Help]
1816: select 'x'
1817: into l_un_rcvd_lines_exists
1818: from (
1819: select 'x'
1820: from csd_product_transactions cpt
1821: where cpt.repair_line_id = p_repair_line_id and
1822: cpt.action_type = 'RMA' and
1823: cpt.action_code in ('CUST_PROD','EXCHANGE') and
1824: cpt.prod_txn_status <> 'RECEIVED'
2929: END LOOP;
2930: l_create_iso := FALSE;
2931:
2932: FORALL i IN 1 ..l_requisition_id.COUNT
2933: -- insert/update the records in the csd_product_transactions table.
2934: MERGE INTO csd_product_transactions cpt
2935: USING (SELECT ooh.header_id,ool.line_id,prl.requisition_line_id,prl.requisition_header_id,wdd.delivery_detail_id,
2936: ooh.org_id source_ou,prl.org_id destination_ou,prl.destination_organization_id dest_org,prl.source_organization_id source_org,
2937: prl.quantity,prl.item_id
2930: l_create_iso := FALSE;
2931:
2932: FORALL i IN 1 ..l_requisition_id.COUNT
2933: -- insert/update the records in the csd_product_transactions table.
2934: MERGE INTO csd_product_transactions cpt
2935: USING (SELECT ooh.header_id,ool.line_id,prl.requisition_line_id,prl.requisition_header_id,wdd.delivery_detail_id,
2936: ooh.org_id source_ou,prl.org_id destination_ou,prl.destination_organization_id dest_org,prl.source_organization_id source_org,
2937: prl.quantity,prl.item_id
2938: FROM oe_order_headers_all ooh, oe_order_lines_all ool,
2967: req_header_id,
2968: req_line_id,
2969: delivery_detail_id)
2970: VALUES
2971: (csd_product_transactions_s1.nextval,
2972: p_repair_line_id,
2973: a.quantity,
2974: a.item_id,
2975: a.source_ou,
3181:
3182: SELECT cpt.repair_line_id,oeh.header_id,ced.inventory_item_id,cr.incident_id
3183: INTO l_repair_line_id,l_header_id,l_ship_inv_item_id,l_incident_id
3184: FROM oe_order_lines_all oel, oe_order_headers_all oeh,
3185: cs_estimate_details ced, csd_product_transactions cpt,wsh_delivery_details wdd,
3186: csd_repairs cr
3187: WHERE oel.line_id = p_order_line_id
3188: AND oel.header_id = oeh.header_id
3189: AND oeh.header_id = ced.order_header_id