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 299: FROM HZ_CUST_ACCOUNTS HCA,

295: IF p_party_name_from = p_party_name_to THEN
296: v_party_name_clause :=
297: 'AND EXISTS (
298: SELECT HCA.cust_account_id
299: FROM HZ_CUST_ACCOUNTS HCA,
300: HZ_PARTIES HP
301: WHERE HCA.party_id = HP.party_id
302: AND HCA.cust_account_id = OH.sold_to_org_id
303: AND HP.party_name = :party_name_from

Line 309: FROM HZ_CUST_ACCOUNTS HCA,

305: ELSIF p_party_name_to IS NULL THEN
306: v_party_name_clause :=
307: 'AND EXISTS (
308: SELECT HCA.cust_account_id
309: FROM HZ_CUST_ACCOUNTS HCA,
310: HZ_PARTIES HP
311: WHERE HCA.party_id = HP.party_id
312: AND HCA.cust_account_id = OH.sold_to_org_id
313: AND HP.party_name >= :party_name_from

Line 319: FROM HZ_CUST_ACCOUNTS HCA,

315: ELSIF p_party_name_from IS NULL THEN
316: v_party_name_clause :=
317: 'AND EXISTS (
318: SELECT HCA.cust_account_id
319: FROM HZ_CUST_ACCOUNTS HCA,
320: HZ_PARTIES HP
321: WHERE HCA.party_id = HP.party_id
322: AND HCA.cust_account_id = OH.sold_to_org_id
323: AND HP.party_name <= :party_name_to

Line 329: FROM HZ_CUST_ACCOUNTS HCA,

325: ELSE
326: v_party_name_clause :=
327: 'AND EXISTS (
328: SELECT HCA.cust_account_id
329: FROM HZ_CUST_ACCOUNTS HCA,
330: HZ_PARTIES HP
331: WHERE HCA.party_id = HP.party_id
332: AND HCA.cust_account_id = OH.sold_to_org_id
333: AND HP.party_name BETWEEN :party_name_from AND :party_name_to

Line 345: FROM HZ_CUST_ACCOUNTS HCA

341: IF p_cust_acct_number_from = p_cust_acct_number_to THEN
342: v_cust_acct_number_clause :=
343: 'AND EXISTS (
344: SELECT HCA.cust_account_id
345: FROM HZ_CUST_ACCOUNTS HCA
346: WHERE HCA.cust_account_id = OH.sold_to_org_id
347: AND HCA.account_number = :cust_acct_number_from
348: ) ';
349: ELSIF p_cust_acct_number_to IS NULL THEN

Line 353: FROM HZ_CUST_ACCOUNTS HCA

349: ELSIF p_cust_acct_number_to IS NULL 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_from IS NULL THEN

Line 361: FROM HZ_CUST_ACCOUNTS HCA

357: ELSIF p_cust_acct_number_from 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_to
364: ) ';
365: ELSE

Line 369: FROM HZ_CUST_ACCOUNTS HCA

365: ELSE
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 BETWEEN :cust_acct_number_from AND :cust_acct_number_to
372: ) ';
373: END IF;

Line 1644: customer_id hz_cust_accounts.cust_account_id%TYPE,

1640: cust_cur cust_cur_type;
1641:
1642: TYPE cust_type is RECORD (
1643: customer VARCHAR2(150),
1644: customer_id hz_cust_accounts.cust_account_id%TYPE,
1645: customer_number hz_cust_accounts.account_number%TYPE);
1646:
1647: cust_csr_rec cust_type;
1648:

Line 1645: customer_number hz_cust_accounts.account_number%TYPE);

1641:
1642: TYPE cust_type is RECORD (
1643: customer VARCHAR2(150),
1644: customer_id hz_cust_accounts.cust_account_id%TYPE,
1645: customer_number hz_cust_accounts.account_number%TYPE);
1646:
1647: cust_csr_rec cust_type;
1648:
1649: l_input NUMBER := 0;

Line 1818: hz_cust_accounts c

1814: SUBSTRB(p.party_name,1,50) ||'('||c.account_number||')' Customer
1815: , c.cust_account_id customer_id
1816: , c.account_number customer_number
1817: FROM
1818: hz_cust_accounts c
1819: , hz_parties p
1820: WHERE c.status='A'
1821: AND c.party_id = p.party_id
1822: AND p.party_id= p_party_id;

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 1834: hz_cust_accounts c

1830: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
1831: , c.cust_account_id customer_id
1832: , c.account_number customer_number
1833: FROM
1834: hz_cust_accounts c
1835: , hz_parties party
1836: WHERE c.status='A'
1837: AND c.party_id = party.party_id
1838: AND party.party_name BETWEEN NVL(p_customer_name_low, party.party_name )

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 3571: hz_cust_accounts c

3567: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3568: , c.cust_account_id customer_id
3569: , c.account_number customer_number
3570: FROM
3571: hz_cust_accounts c
3572: , hz_parties party
3573: WHERE c.status='A'
3574: AND c.party_id = party.party_id
3575: AND party.party_name BETWEEN p_customer_name_low

Line 3594: hz_cust_accounts c

3590: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3591: , c.cust_account_id customer_id
3592: , c.account_number customer_number
3593: FROM
3594: hz_cust_accounts c
3595: , hz_parties party
3596: WHERE c.status='A'
3597: AND c.party_id = party.party_id
3598: AND party.party_name <= p_customer_name_high

Line 3616: hz_cust_accounts c

3612: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3613: , c.cust_account_id customer_id
3614: , c.account_number customer_number
3615: FROM
3616: hz_cust_accounts c
3617: , hz_parties party
3618: WHERE c.status='A'
3619: AND c.party_id = party.party_id
3620: AND party.party_name BETWEEN p_customer_name_low

Line 3638: hz_cust_accounts c

3634: SUBSTRB(party.party_name,1,50) ||'('||c.account_number||')' Customer
3635: , c.cust_account_id customer_id
3636: , c.account_number customer_number
3637: FROM
3638: hz_cust_accounts c
3639: , hz_parties party
3640: WHERE c.status='A'
3641: AND c.party_id = party.party_id
3642: AND party.party_name <= p_customer_name_high

Line 3658: hz_cust_accounts c

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

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 <= p_customer_name_high

Line 3697: hz_cust_accounts c

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

Line 3717: hz_cust_accounts c

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

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.cust_account_id IN (SELECT cp.cust_account_id

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;