283: CURSOR csr_local_rules_templates IS
284: -- Templates on Local Rules
285: SELECT DISTINCT to_char(r.template_id)
286: FROM okc_terms_templates_all t,
287: okc_xprt_template_rules r,
288: okc_xprt_rule_hdrs_all h
289: WHERE r.template_id = t.template_id
290: AND r.rule_id = h.rule_id
291: AND t.status_code IN ('APPROVED','ON_HOLD')
1453: FROM okc_terms_templates_all
1454: WHERE xprt_request_id = FND_GLOBAL.CONC_REQUEST_ID
1455: );
1456:
1457: -- Delete from okc_xprt_template_rules
1458: DELETE FROM okc_xprt_template_rules
1459: WHERE NVL(deleted_flag,'N') = 'Y'
1460: AND template_id IN ( SELECT template_id
1461: FROM okc_terms_templates_all
1454: WHERE xprt_request_id = FND_GLOBAL.CONC_REQUEST_ID
1455: );
1456:
1457: -- Delete from okc_xprt_template_rules
1458: DELETE FROM okc_xprt_template_rules
1459: WHERE NVL(deleted_flag,'N') = 'Y'
1460: AND template_id IN ( SELECT template_id
1461: FROM okc_terms_templates_all
1462: WHERE xprt_request_id = FND_GLOBAL.CONC_REQUEST_ID
1461: FROM okc_terms_templates_all
1462: WHERE xprt_request_id = FND_GLOBAL.CONC_REQUEST_ID
1463: );
1464:
1465: -- Update published_flag in okc_xprt_template_rules
1466: UPDATE okc_xprt_template_rules
1467: SET published_flag = 'Y'
1468: WHERE template_id IN ( SELECT template_id
1469: FROM okc_terms_templates_all
1462: WHERE xprt_request_id = FND_GLOBAL.CONC_REQUEST_ID
1463: );
1464:
1465: -- Update published_flag in okc_xprt_template_rules
1466: UPDATE okc_xprt_template_rules
1467: SET published_flag = 'Y'
1468: WHERE template_id IN ( SELECT template_id
1469: FROM okc_terms_templates_all
1470: WHERE xprt_request_id = FND_GLOBAL.CONC_REQUEST_ID