1487: FROM HZ_CUST_ACCT_SITES_ALL cust_acct,
1488: HZ_CUST_SITE_USES_ALL site_use,
1489: hz_party_site_uses hpsu,
1490: cs_incidents_all cia,
1491: csp_requirement_headers_v req
1492: WHERE req.requirement_header_id = p_rqmt_header_id
1493: and cia.incident_id = req.incident_id
1494: and cust_acct.cust_account_id = cia.bill_to_account_id
1495: and hpsu.party_site_use_id = cia.bill_to_site_use_id
1523: FROM HZ_CUST_ACCT_SITES_ALL cust_acct,
1524: HZ_CUST_SITE_USES_ALL site_use,
1525: hz_party_site_uses hpsu,
1526: cs_incidents_all cia,
1527: csp_requirement_headers_v req
1528: WHERE req.requirement_header_id = v_rqmt_header_id
1529: and req.address_type in ('C', 'T') -- bug # 14743823
1530: and cia.incident_id = req.incident_id
1531: and cust_acct.cust_account_id = cia.bill_to_account_id
1864: l_sr_org_id := null;
1865: SELECT cia.org_id
1866: INTO l_sr_org_id
1867: FROM cs_incidents_all cia,
1868: csp_requirement_headers_v req
1869: WHERE req.requirement_header_id = l_header_rec.requirement_header_id
1870: AND cia.incident_id = req.incident_id;
1871:
1872: if(FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then