DBA Data[Home] [Help]

APPS.OE_CREDIT_CHECK_RPT dependencies on HZ_CUST_PROFILE_CLASSES

Line 181: cust_prof_class_from HZ_CUST_PROFILE_CLASSES.name%TYPE;

177: v_order_date_clause VARCHAR2(1000);
178:
179: --Variables for input of dynamic sql
180: profile_org_id NUMBER;
181: cust_prof_class_from HZ_CUST_PROFILE_CLASSES.name%TYPE;
182: cust_prof_class_to HZ_CUST_PROFILE_CLASSES.name%TYPE;
183: party_name_from HZ_PARTIES.party_name%TYPE;
184: party_name_to HZ_PARTIES.party_name%TYPE;
185: cust_acct_number_from HZ_CUST_ACCOUNTS_ALL.account_number%TYPE;

Line 182: cust_prof_class_to HZ_CUST_PROFILE_CLASSES.name%TYPE;

178:
179: --Variables for input of dynamic sql
180: profile_org_id NUMBER;
181: cust_prof_class_from HZ_CUST_PROFILE_CLASSES.name%TYPE;
182: cust_prof_class_to HZ_CUST_PROFILE_CLASSES.name%TYPE;
183: party_name_from HZ_PARTIES.party_name%TYPE;
184: party_name_to HZ_PARTIES.party_name%TYPE;
185: cust_acct_number_from HZ_CUST_ACCOUNTS_ALL.account_number%TYPE;
186: cust_acct_number_to HZ_CUST_ACCOUNTS_ALL.account_number%TYPE;

Line 259: HZ_CUST_PROFILE_CLASSES HCPC

255: IF p_cust_prof_class_name_from = p_cust_prof_class_name_to THEN
256: v_cust_prof_class_clause := 'AND EXISTS
257: (SELECT HCP.cust_account_id
258: FROM HZ_CUSTOMER_PROFILES HCP,
259: HZ_CUST_PROFILE_CLASSES HCPC
260: WHERE HCP.profile_class_id = HCPC.profile_class_id
261: AND HCP.cust_account_id = OH.sold_to_org_id
262: AND HCPC.name = :cust_prof_class_from) ';
263: ELSIF p_cust_prof_class_name_to IS NULL THEN

Line 267: HZ_CUST_PROFILE_CLASSES HCPC

263: ELSIF p_cust_prof_class_name_to IS NULL THEN
264: v_cust_prof_class_clause := 'AND EXISTS
265: (SELECT HCP.cust_account_id
266: FROM HZ_CUSTOMER_PROFILES HCP,
267: HZ_CUST_PROFILE_CLASSES HCPC
268: WHERE HCP.profile_class_id = HCPC.profile_class_id
269: AND HCP.cust_account_id = OH.sold_to_org_id
270: AND HCPC.name >= :cust_prof_class_from) ';
271: ELSIF p_cust_prof_class_name_from IS NULL THEN

Line 275: HZ_CUST_PROFILE_CLASSES HCPC

271: ELSIF p_cust_prof_class_name_from IS NULL THEN
272: v_cust_prof_class_clause := 'AND EXISTS
273: (SELECT HCP.cust_account_id
274: FROM HZ_CUSTOMER_PROFILES HCP,
275: HZ_CUST_PROFILE_CLASSES HCPC
276: WHERE HCP.profile_class_id = HCPC.profile_class_id
277: AND HCP.cust_account_id = OH.sold_to_org_id
278: AND HCPC.name <= :cust_prof_class_to) ';
279: ELSE

Line 283: HZ_CUST_PROFILE_CLASSES HCPC

279: ELSE
280: v_cust_prof_class_clause := 'AND EXISTS
281: (SELECT HCP.cust_account_id
282: FROM HZ_CUSTOMER_PROFILES HCP,
283: HZ_CUST_PROFILE_CLASSES HCPC
284: WHERE HCP.profile_class_id = HCPC.profile_class_id
285: AND HCP.cust_account_id = OH.sold_to_org_id
286: AND HCPC.name BETWEEN :cust_prof_class_from AND
287: :cust_prof_class_to) ';

Line 1826: --Performance issue (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)

1822: AND p.party_id= p_party_id;
1823:
1824: ---cursor to select all eligible customers
1825: /*
1826: --Performance issue (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)
1827: CURSOR cust_csr
1828: IS
1829: SELECT
1830: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer

Line 1843: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

1839: AND NVL(p_customer_name_high, party.party_name)
1840: AND c.account_number BETWEEN NVL(p_cust_number_low, c.account_number )
1841: AND NVL(p_cust_number_high, c.account_number )
1842: AND c.cust_account_id IN (SELECT cp.cust_account_id
1843: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
1844: WHERE cp.profile_class_id=cpc.profile_class_id
1845: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
1846: AND NVL(p_prof_class_high, cpc.name));
1847: */

Line 3560: --Performance issue: start (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)

3556: THEN
3557:
3558: OE_DEBUG_PUB.ADD('IN Cust Summary Report');
3559:
3560: --Performance issue: start (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)
3561: IF (p_customer_name_low IS NOT NULL) AND (p_cust_number_low IS NOT NULL) THEN
3562: OE_DEBUG_PUB.ADD('Customer name-LOW :' || p_customer_name_low);
3563: OE_DEBUG_PUB.ADD('Customer number-LOW :' || p_cust_number_low);
3564:

Line 3580: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3576: AND NVL(p_customer_name_high, party.party_name)
3577: AND c.account_number BETWEEN p_cust_number_low
3578: AND NVL(p_cust_number_high, c.account_number )
3579: AND c.cust_account_id IN (SELECT cp.cust_account_id
3580: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3581: WHERE cp.profile_class_id=cpc.profile_class_id
3582: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3583: AND NVL(p_prof_class_high, cpc.name)) ;
3584: ELSIF (p_customer_name_high IS NOT NULL) AND (p_cust_number_low IS NOT NULL) THEN

Line 3602: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3598: AND party.party_name <= p_customer_name_high
3599: AND c.account_number BETWEEN p_cust_number_low
3600: AND NVL(p_cust_number_high, c.account_number )
3601: AND c.cust_account_id IN (SELECT cp.cust_account_id
3602: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3603: WHERE cp.profile_class_id=cpc.profile_class_id
3604: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3605: AND NVL(p_prof_class_high, cpc.name)) ;
3606: ELSIF (p_customer_name_low IS NOT NULL) AND (p_cust_number_high IS NOT NULL) THEN

Line 3624: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3620: AND party.party_name BETWEEN p_customer_name_low
3621: AND NVL(p_customer_name_high, party.party_name)
3622: AND c.account_number <=p_cust_number_high
3623: AND c.cust_account_id IN (SELECT cp.cust_account_id
3624: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3625: WHERE cp.profile_class_id=cpc.profile_class_id
3626: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3627: AND NVL(p_prof_class_high, cpc.name)) ;
3628: ELSIF (p_customer_name_high IS NOT NULL) AND (p_cust_number_high IS NOT NULL) THEN

Line 3645: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3641: AND c.party_id = party.party_id
3642: AND party.party_name <= p_customer_name_high
3643: AND c.account_number <= p_cust_number_high
3644: AND c.cust_account_id IN (SELECT cp.cust_account_id
3645: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3646: WHERE cp.profile_class_id=cpc.profile_class_id
3647: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3648: AND NVL(p_prof_class_high, cpc.name)) ;
3649: ELSIF (p_customer_name_low IS NOT NULL) THEN

Line 3665: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3661: AND c.party_id = party.party_id
3662: AND party.party_name BETWEEN p_customer_name_low
3663: AND NVL(p_customer_name_high, party.party_name)
3664: AND c.cust_account_id IN (SELECT cp.cust_account_id
3665: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3666: WHERE cp.profile_class_id=cpc.profile_class_id
3667: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3668: AND NVL(p_prof_class_high, cpc.name)) ;
3669: ELSIF (p_customer_name_high IS NOT NULL) THEN

Line 3684: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3680: WHERE c.status='A'
3681: AND c.party_id = party.party_id
3682: AND party.party_name <= p_customer_name_high
3683: AND c.cust_account_id IN (SELECT cp.cust_account_id
3684: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3685: WHERE cp.profile_class_id=cpc.profile_class_id
3686: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3687: AND NVL(p_prof_class_high, cpc.name)) ;
3688: ELSIF (p_cust_number_low IS NOT NULL) THEN

Line 3704: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3700: AND c.party_id = party.party_id
3701: AND c.account_number BETWEEN p_cust_number_low
3702: AND NVL(p_cust_number_high, c.account_number )
3703: AND c.cust_account_id IN (SELECT cp.cust_account_id
3704: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3705: WHERE cp.profile_class_id=cpc.profile_class_id
3706: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3707: AND NVL(p_prof_class_high, cpc.name)) ;
3708: ELSIF (p_cust_number_high IS NOT NULL) THEN

Line 3723: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3719: WHERE c.status='A'
3720: AND c.party_id = party.party_id
3721: AND c.account_number <= p_cust_number_high
3722: AND c.cust_account_id IN (SELECT cp.cust_account_id
3723: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3724: WHERE cp.profile_class_id=cpc.profile_class_id
3725: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3726: AND NVL(p_prof_class_high, cpc.name)) ;
3727: ELSIF (p_customer_name_low IS NULL) AND (p_customer_name_high IS NULL) AND

Line 3745: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp

3741: , hz_parties party
3742: WHERE c.status='A'
3743: AND c.party_id = party.party_id
3744: AND c.cust_account_id IN (SELECT cp.cust_account_id
3745: FROM hz_cust_profile_classes cpc,hz_customer_profiles cp
3746: WHERE cp.profile_class_id=cpc.profile_class_id
3747: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3748: AND NVL(p_prof_class_high, cpc.name)) ;
3749: END IF ;

Line 3750: --Performance issue: end (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)

3746: WHERE cp.profile_class_id=cpc.profile_class_id
3747: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3748: AND NVL(p_prof_class_high, cpc.name)) ;
3749: END IF ;
3750: --Performance issue: end (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)
3751:
3752: ------start loop for customers
3753: LOOP
3754: FETCH cust_cur INTO cust_csr_rec;