DBA Data[Home] [Help]

APPS.OE_CREDIT_CHECK_RPT dependencies on HZ_CUST_ACCOUNTS

Line 53: FROM HZ_CUST_ACCOUNTS HCA,

49: SELECT SUBSTRB(HP.PARTY_NAME,1,50) NAME,
50: HCA.ACCOUNT_NUMBER
51: INTO l_party_name,
52: l_account_number
53: FROM HZ_CUST_ACCOUNTS HCA,
54: HZ_PARTIES HP
55: WHERE HCA.PARTY_ID = HP.PARTY_ID
56: AND HCA.CUST_ACCOUNT_ID = l_header_rec.sold_to_org_id;
57: OE_DEBUG_PUB.ADD('Customer Name/Number = '||l_party_name||'/'||l_account_number);

Line 185: cust_acct_number_from HZ_CUST_ACCOUNTS_ALL.account_number%TYPE;

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;
187: order_date_from DATE;
188: order_date_to DATE;
189: gl_currency_code FND_CURRENCIES.currency_code%TYPE;

Line 186: cust_acct_number_to HZ_CUST_ACCOUNTS_ALL.account_number%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;
187: order_date_from DATE;
188: order_date_to DATE;
189: gl_currency_code FND_CURRENCIES.currency_code%TYPE;
190:

Line 307: FROM HZ_CUST_ACCOUNTS HCA,

303: IF p_party_name_from = p_party_name_to THEN
304: v_party_name_clause :=
305: 'AND EXISTS (
306: SELECT HCA.cust_account_id
307: FROM HZ_CUST_ACCOUNTS HCA,
308: HZ_PARTIES HP
309: WHERE HCA.party_id = HP.party_id
310: AND HCA.cust_account_id = OH.sold_to_org_id
311: AND HP.party_name = :party_name_from

Line 317: FROM HZ_CUST_ACCOUNTS HCA,

313: ELSIF p_party_name_to IS NULL THEN
314: v_party_name_clause :=
315: 'AND EXISTS (
316: SELECT HCA.cust_account_id
317: FROM HZ_CUST_ACCOUNTS HCA,
318: HZ_PARTIES HP
319: WHERE HCA.party_id = HP.party_id
320: AND HCA.cust_account_id = OH.sold_to_org_id
321: AND HP.party_name >= :party_name_from

Line 327: FROM HZ_CUST_ACCOUNTS HCA,

323: ELSIF p_party_name_from IS NULL THEN
324: v_party_name_clause :=
325: 'AND EXISTS (
326: SELECT HCA.cust_account_id
327: FROM HZ_CUST_ACCOUNTS HCA,
328: HZ_PARTIES HP
329: WHERE HCA.party_id = HP.party_id
330: AND HCA.cust_account_id = OH.sold_to_org_id
331: AND HP.party_name <= :party_name_to

Line 337: FROM HZ_CUST_ACCOUNTS HCA,

333: ELSE
334: v_party_name_clause :=
335: 'AND EXISTS (
336: SELECT HCA.cust_account_id
337: FROM HZ_CUST_ACCOUNTS HCA,
338: HZ_PARTIES HP
339: WHERE HCA.party_id = HP.party_id
340: AND HCA.cust_account_id = OH.sold_to_org_id
341: AND HP.party_name BETWEEN :party_name_from AND :party_name_to

Line 353: FROM HZ_CUST_ACCOUNTS HCA

349: IF p_cust_acct_number_from = p_cust_acct_number_to THEN
350: v_cust_acct_number_clause :=
351: 'AND EXISTS (
352: SELECT HCA.cust_account_id
353: FROM HZ_CUST_ACCOUNTS HCA
354: WHERE HCA.cust_account_id = OH.sold_to_org_id
355: AND HCA.account_number = :cust_acct_number_from
356: ) ';
357: ELSIF p_cust_acct_number_to IS NULL THEN

Line 361: FROM HZ_CUST_ACCOUNTS HCA

357: ELSIF p_cust_acct_number_to IS NULL THEN
358: v_cust_acct_number_clause :=
359: 'AND EXISTS (
360: SELECT HCA.cust_account_id
361: FROM HZ_CUST_ACCOUNTS HCA
362: WHERE HCA.cust_account_id = OH.sold_to_org_id
363: AND HCA.account_number >= :cust_acct_number_from
364: ) ';
365: ELSIF p_cust_acct_number_from IS NULL THEN

Line 369: FROM HZ_CUST_ACCOUNTS HCA

365: ELSIF p_cust_acct_number_from IS NULL THEN
366: v_cust_acct_number_clause :=
367: 'AND EXISTS (
368: SELECT HCA.cust_account_id
369: FROM HZ_CUST_ACCOUNTS HCA
370: WHERE HCA.cust_account_id = OH.sold_to_org_id
371: AND HCA.account_number <= :cust_acct_number_to
372: ) ';
373: ELSE

Line 377: FROM HZ_CUST_ACCOUNTS HCA

373: ELSE
374: v_cust_acct_number_clause :=
375: 'AND EXISTS (
376: SELECT HCA.cust_account_id
377: FROM HZ_CUST_ACCOUNTS HCA
378: WHERE HCA.cust_account_id = OH.sold_to_org_id
379: AND HCA.account_number BETWEEN :cust_acct_number_from AND :cust_acct_number_to
380: ) ';
381: END IF;

Line 1652: customer_id hz_cust_accounts.cust_account_id%TYPE,

1648: cust_cur cust_cur_type;
1649:
1650: TYPE cust_type is RECORD (
1651: customer VARCHAR2(150),
1652: customer_id hz_cust_accounts.cust_account_id%TYPE,
1653: customer_number hz_cust_accounts.account_number%TYPE);
1654:
1655: cust_csr_rec cust_type;
1656:

Line 1653: customer_number hz_cust_accounts.account_number%TYPE);

1649:
1650: TYPE cust_type is RECORD (
1651: customer VARCHAR2(150),
1652: customer_id hz_cust_accounts.cust_account_id%TYPE,
1653: customer_number hz_cust_accounts.account_number%TYPE);
1654:
1655: cust_csr_rec cust_type;
1656:
1657: l_input NUMBER := 0;

Line 1827: hz_cust_accounts c

1823: SUBSTRB(p.party_name,1,50) ||'('||c.account_number||')' Customer
1824: , c.cust_account_id customer_id
1825: , c.account_number customer_number
1826: FROM
1827: hz_cust_accounts c
1828: , hz_parties p
1829: WHERE c.status='A'
1830: AND c.party_id = p.party_id
1831: AND p.party_id= p_party_id;

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

1831: AND p.party_id= p_party_id;
1832:
1833: ---cursor to select all eligible customers
1834: /*
1835: --Performance issue (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)
1836: CURSOR cust_csr
1837: IS
1838: SELECT
1839: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer

Line 1843: hz_cust_accounts c

1839: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
1840: , c.cust_account_id customer_id
1841: , c.account_number customer_number
1842: FROM
1843: hz_cust_accounts c
1844: , hz_parties party
1845: WHERE c.status='A'
1846: AND c.party_id = party.party_id
1847: AND party.party_name BETWEEN NVL(p_customer_name_low, party.party_name )

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

3572: THEN
3573:
3574: OE_DEBUG_PUB.ADD('IN Cust Summary Report');
3575:
3576: --Performance issue: start (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)
3577: IF (p_customer_name_low IS NOT NULL) AND (p_cust_number_low IS NOT NULL) THEN
3578: OE_DEBUG_PUB.ADD('Customer name-LOW :' || p_customer_name_low);
3579: OE_DEBUG_PUB.ADD('Customer number-LOW :' || p_cust_number_low);
3580:

Line 3587: hz_cust_accounts c

3583: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3584: , c.cust_account_id customer_id
3585: , c.account_number customer_number
3586: FROM
3587: hz_cust_accounts c
3588: , hz_parties party
3589: WHERE c.status='A'
3590: AND c.party_id = party.party_id
3591: AND party.party_name BETWEEN p_customer_name_low

Line 3611: hz_cust_accounts c

3607: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3608: , c.cust_account_id customer_id
3609: , c.account_number customer_number
3610: FROM
3611: hz_cust_accounts c
3612: , hz_parties party
3613: WHERE c.status='A'
3614: AND c.party_id = party.party_id
3615: AND party.party_name <= p_customer_name_high

Line 3634: hz_cust_accounts c

3630: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3631: , c.cust_account_id customer_id
3632: , c.account_number customer_number
3633: FROM
3634: hz_cust_accounts c
3635: , hz_parties party
3636: WHERE c.status='A'
3637: AND c.party_id = party.party_id
3638: AND party.party_name BETWEEN p_customer_name_low

Line 3657: hz_cust_accounts c

3653: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3654: , c.cust_account_id customer_id
3655: , c.account_number customer_number
3656: FROM
3657: hz_cust_accounts c
3658: , hz_parties party
3659: WHERE c.status='A'
3660: AND c.party_id = party.party_id
3661: AND party.party_name <= p_customer_name_high

Line 3678: hz_cust_accounts c

3674: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3675: , c.cust_account_id customer_id
3676: , c.account_number customer_number
3677: FROM
3678: hz_cust_accounts c
3679: , hz_parties party
3680: WHERE c.status='A'
3681: AND c.party_id = party.party_id
3682: AND party.party_name BETWEEN p_customer_name_low

Line 3699: hz_cust_accounts c

3695: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3696: , c.cust_account_id customer_id
3697: , c.account_number customer_number
3698: FROM
3699: hz_cust_accounts c
3700: , hz_parties party
3701: WHERE c.status='A'
3702: AND c.party_id = party.party_id
3703: AND party.party_name <= p_customer_name_high

Line 3719: hz_cust_accounts c

3715: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3716: , c.cust_account_id customer_id
3717: , c.account_number customer_number
3718: FROM
3719: hz_cust_accounts c
3720: , hz_parties party
3721: WHERE c.status='A'
3722: AND c.party_id = party.party_id
3723: AND c.account_number BETWEEN p_cust_number_low

Line 3740: hz_cust_accounts c

3736: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3737: , c.cust_account_id customer_id
3738: , c.account_number customer_number
3739: FROM
3740: hz_cust_accounts c
3741: , hz_parties party
3742: WHERE c.status='A'
3743: AND c.party_id = party.party_id
3744: AND c.account_number <= p_cust_number_high

Line 3764: hz_cust_accounts c

3760: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3761: , c.cust_account_id customer_id
3762: , c.account_number customer_number
3763: FROM
3764: hz_cust_accounts c
3765: , hz_parties party
3766: WHERE c.status='A'
3767: AND c.party_id = party.party_id
3768: AND c.cust_account_id IN (SELECT cp.cust_account_id

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

3771: AND cp.STATUS='A' --14699527
3772: AND cpc.name BETWEEN NVL(p_prof_class_low, cpc.name)
3773: AND NVL(p_prof_class_high, cpc.name)) ;
3774: END IF ;
3775: --Performance issue: end (SQL ID-16485806 FTS on HZ_CUST_ACCOUNTS and HZ_CUST_PROFILE_CLASSES)
3776:
3777: ------start loop for customers
3778: LOOP
3779: FETCH cust_cur INTO cust_csr_rec;