2778: AND subject_cle_id = l.id
2779: AND rownum = 1),0) okc_renewal_flag
2780: , CASE root_temp.lty_code WHEN 'COVER_PROD' THEN
2781: ( select instance_id || '#' || system_id || '#' || inventory_item_id
2782: from csi_item_instances where instance_id = itm2.object1_id1)
2783: END csi_attribs
2784: , h.trn_code hdr_trn_code
2785: , h.date_approved hdr_date_approved
2786: , h.date_terminated hdr_date_terminated
2828: , oat.name agreement_name
2829: from oe_agreements_tl oat,
2830: qp_lookups qpl,
2831: oe_agreements_b oab,
2832: csi_item_instances cii
2833: where oab.agreement_id = oat.agreement_id
2834: and cii.last_oe_agreement_id = oab.agreement_id(+)
2835: and oat.language = userenv('LANG')
2836: and qpl.lookup_type(+) = 'QP_AGREEMENT_TYPE'
5232: , oks_k_lines_b oksl
5233: /*, okc_operation_lines okl
5234: , okc_operation_instances OPINS */
5235: , okc_k_items itm2
5236: , csi_item_instances cii
5237: , ( /* rel objs has multiple entries for the same order number */
5238: Select /*+ no_merge parallel(oehdr) parallel(oelin) parallel(okcrel) */ okcrel.cle_id,max(oehdr.order_number) order_number
5239: from
5240: oe_order_headers_all oehdr