DBA Data[Home] [Help]

APPS.CSD_RULES_ENGINE_PVT dependencies on CSD_REPAIRS

Line 1141: FROM CSD_INCIDENTS_V a, CSD_REPAIRS b, CS_INCIDENTS_B_SEC c

1137: a.contract_id,
1138: a.problem_code,
1139: a.customer_product_id,
1140: b.inventory_item_id -- swai: 12.1.1 ER 7233924
1141: FROM CSD_INCIDENTS_V a, CSD_REPAIRS b, CS_INCIDENTS_B_SEC c
1142: WHERE a.incident_id = b.incident_id
1143: AND a.incident_id = c.incident_id
1144: AND b.repair_line_Id = p_repair_line_id;
1145: BEGIN

Line 1455: FROM csd_repairs

1451:
1452: ---- cursors ----
1453: CURSOR cur_get_promise_date(p_repair_line_id NUMBER) IS
1454: SELECT promise_date
1455: FROM csd_repairs
1456: WHERE repair_line_id = p_repair_line_id
1457: ; --* end CURSOR get_promise_date *--
1458: BEGIN
1459: IF (p_repair_line_id IS NOT NULL) THEN

Line 1508: FROM csd_repairs

1504: l_date_field DATE := NULL;
1505: ---- cursors ----
1506: CURSOR cur_get_resolve_by_date(p_repair_line_id NUMBER) IS
1507: SELECT resolve_by_date
1508: FROM csd_repairs
1509: WHERE repair_line_id = p_repair_line_id
1510: ; --* end CURSOR get_resolve_by_date *--
1511:
1512: BEGIN

Line 1642: FROM csd_repairs a

1638: ---- cursors ----
1639: -- need to redo this query based on ship date, could return
1640: CURSOR cur_get_latest_repair_date(p_instance_id NUMBER) IS
1641: SELECT MAX(a.date_closed)
1642: FROM csd_repairs a
1643: WHERE a.customer_product_id = p_instance_id
1644: AND a.date_closed IS NOT NULL
1645: ; --* end cur_get_latest_repair_date *--
1646:

Line 1649: FROM csd_repairs

1645: ; --* end cur_get_latest_repair_date *--
1646:
1647: CURSOR cur_get_creation_date(p_repair_line_id NUMBER) IS
1648: SELECT creation_date
1649: FROM csd_repairs
1650: WHERE repair_line_id = p_repair_line_id
1651: ; -- end* cur_get_creation_date*--
1652: BEGIN
1653: IF (p_repair_Line_id IS NOT NULL) THEN

Line 1721: FROM csd_repairs a

1717: -- need to redo this query based on ship date
1718: CURSOR cur_get_chronic_repairs(p_instance_id NUMBER,
1719: p_period NUMBER) IS
1720: SELECT count(a.repair_line_id)
1721: FROM csd_repairs a
1722: WHERE a.customer_product_id = p_instance_id
1723: AND a.date_closed BETWEEN sysdate - p_period
1724: AND sysdate
1725: ; --* end cur_get_chronic_repairs *--

Line 1788: FROM csd_repairs

1784:
1785: ---- cursors ----
1786: CURSOR cur_get_ro_contract_id(p_repair_line_id NUMBER) IS
1787: SELECT contract_line_id
1788: FROM csd_repairs
1789: WHERE repair_line_id = p_repair_line_id
1790: ; --* end cur_get_ro_contract_id *--
1791:
1792: -- bug 7323831 - contract line can expire if either end date or termination date

Line 1862: FROM csd_repairs

1858: l_instance_id NUMBER := NULL;
1859: ---- cursors ----
1860: CURSOR cur_get_instance_id(p_repair_line_id NUMBER) IS
1861: SELECT customer_product_id
1862: FROM csd_repairs
1863: WHERE repair_line_id = p_repair_line_id
1864: ;--* end cur_get_instance_id *--
1865: BEGIN
1866: IF (p_repair_Line_id IS NOT NULL) THEN

Line 1936: l_sql_query := 'select dra.repair_line_id from csd_repairs dra, cs_incidents_b_sec csb '

1932: l_str_condition VARCHAR2(3000); -- for conditions that match a string type
1933: l_condition_count NUMBER :=0;
1934:
1935: BEGIN
1936: l_sql_query := 'select dra.repair_line_id from csd_repairs dra, cs_incidents_b_sec csb '
1937: || 'where csb.incident_id = dra.incident_id';
1938: OPEN c_rule_conditions(p_rule_id);
1939: LOOP
1940: FETCH c_rule_conditions into l_rule_condition_rec;

Line 2052: || ' FROM csd_repairs dra2 '

2048: || l_num_condition || ')';
2049: -- end swai: bug 7524870
2050: when 'RO_REPEAT_REPAIR_THRESHOLD' then
2051: l_join_stmt := 'sysdate - ( SELECT MAX(dra2.date_closed)'
2052: || ' FROM csd_repairs dra2 '
2053: || ' WHERE dra2.customer_product_id = dra.customer_product_id '
2054: || ' AND dra2.date_closed IS NOT NULL) '
2055: || l_num_condition;
2056: when 'RO_CHRONIC_REPAIR_THRESHOLD' then

Line 2058: || ' FROM csd_repairs dra2 '

2054: || ' AND dra2.date_closed IS NOT NULL) '
2055: || l_num_condition;
2056: when 'RO_CHRONIC_REPAIR_THRESHOLD' then
2057: l_join_stmt := '(SELECT count(dra2.repair_line_id) '
2058: || ' FROM csd_repairs dra2 '
2059: || ' WHERE dra2.customer_product_id = dra.customer_product_id '
2060: || ' AND dra2.date_closed BETWEEN sysdate - '
2061: || ' nvl(FND_PROFILE.VALUE(''CSD_QUALITY_CHECK_PERIOD''), 0) '
2062: || ' AND sysdate) ' || l_num_condition;