DBA Data[Home] [Help]

APPS.HZ_BES_BO_UTIL_PKG dependencies on HZ_CUST_ACCOUNTS

Line 2162: grand_parent_entity_name aliased as parent_entity_name: HZ_CUST_ACCOUNTS

2158: parent_id aliased as child_id: 234
2159: parent_entity_name aliased as child_entity_name: HZ_CUST_ACCT_SITES_ALL
2160: parent_bo aliased as child_bo: CUST_ACCT_SITE
2161: grand_parent_id aliased as parent id: 456
2162: grand_parent_entity_name aliased as parent_entity_name: HZ_CUST_ACCOUNTS
2163: grand_parent_bo aliased as parent_bo: CUST_ACCT
2164:
2165: Insert statement will take this result and write it as
2166: child record:

Line 2168: child_bo: CUST_ACCT_SITE, parent_bo: CUST_ACCT, parent_entity_name: HZ_CUST_ACCOUNTS,

2164:
2165: Insert statement will take this result and write it as
2166: child record:
2167: child_id: 234, child_entity_name: HZ_CUST_ACCT_SITES_ALL,
2168: child_bo: CUST_ACCT_SITE, parent_bo: CUST_ACCT, parent_entity_name: HZ_CUST_ACCOUNTS,
2169: parent_id: 456
2170: 6. It is non-trivial to figure out the business object codes for both parent
2171: and grand parent, grand parent identifier or grand parent entity name.
2172: To do this, "inner select" uses case statement on parent_entity_name.

Line 2193: ,'HZ_CUST_ACCOUNTS' parent_entity_name -- this is grand parent tbl name of acct site use, written as parent entity name

2189: (SELECT -- inner select
2190: PARENT_ENTITY_NAME child_entity_name
2191: ,PARENT_ID child_id
2192: ,PARENT_BO_CODE CHILD_BO_CODE
2193: ,'HZ_CUST_ACCOUNTS' parent_entity_name -- this is grand parent tbl name of acct site use, written as parent entity name
2194: ,'CUST_ACCT' parent_bo_code -- this is the grand parent bo, written as parent
2195: , CUST_ACCOUNT_ID parent_id -- this is grand parent id of acct roles, written as parent id
2196: ,'U' child_operation_flag
2197: ,'Y' populated_flag

Line 2260: 1. HZ_CUST_ACCOUNTS (CUST_ACCT)

2256: p_module =>'ei_actsite');
2257: END IF;
2258: /*
2259: HZ_CUST_ACCT_SITES_ALL has following parent
2260: 1. HZ_CUST_ACCOUNTS (CUST_ACCT)
2261:
2262: Hence, HZ_CUST_ACCT_SITES_ALL can exist in 2 different scenarios.
2263: The different combinations of (parent, grand parent) are :
2264: 1. (CUST_ACCT, PERSON_CUST) -- tested

Line 2307: child_bo: CUST_ACCT_SITE, parent_bo: CUST_ACCT, parent_entity_name: HZ_CUST_ACCOUNTS,

2303: example:
2304:
2305: child record:
2306: child_id: 123, child_entity_name: HZ_CUST_ACCT_SITES_ALL,
2307: child_bo: CUST_ACCT_SITE, parent_bo: CUST_ACCT, parent_entity_name: HZ_CUST_ACCOUNTS,
2308: parent_id: 234
2309:
2310: The "inner select" fetches above record from BOT and identifies
2311: its parent, grand parent information and present it as follows:

Line 2314: parent_entity_name aliased as child_entity_name: HZ_CUST_ACCOUNTS

2310: The "inner select" fetches above record from BOT and identifies
2311: its parent, grand parent information and present it as follows:
2312:
2313: parent_id aliased as child_id: 234
2314: parent_entity_name aliased as child_entity_name: HZ_CUST_ACCOUNTS
2315: parent_bo aliased as child_bo: CUST_ACCT
2316: grand_parent_id aliased as parent id: 456
2317: grand_parent_entity_name aliased as parent_entity_name: HZ_PARTIES
2318: grand_parent_bo aliased as parent_bo: ORG_CUST

Line 2322: child_id: 234, child_entity_name: HZ_CUST_ACCOUNTS,

2318: grand_parent_bo aliased as parent_bo: ORG_CUST
2319:
2320: Insert statement will take this result and write it as
2321: child record:
2322: child_id: 234, child_entity_name: HZ_CUST_ACCOUNTS,
2323: child_bo: CUST_ACCT, parent_bo: ORG_CUST, pa1rent_entity_name: HZ_PARTIES,
2324: parent_id: 456
2325: */
2326:

Line 2350: FROM HZ_BUS_OBJ_TRACKING t, HZ_CUST_ACCOUNTS ac, HZ_PARTIES p

2346: ,t.LAST_UPDATE_DATE
2347: ,RANK()
2348: OVER (PARTITION BY PARENT_BO_CODE, PARENT_ID
2349: ORDER BY t.LAST_UPDATE_DATE, child_id) as acrrank
2350: FROM HZ_BUS_OBJ_TRACKING t, HZ_CUST_ACCOUNTS ac, HZ_PARTIES p
2351: WHERE t.CHILD_ENTITY_NAME = 'HZ_CUST_ACCT_SITES_ALL'
2352: AND t.event_id IS NULL
2353: AND t.parent_id = ac.CUST_ACCOUNT_ID
2354: AND ac.party_id = p.party_id) temp

Line 2410: 2. HZ_CUST_ACCOUNTS (CUST_ACCT)

2406: END IF;
2407: /*
2408: Party Site has following parents
2409: 1. HZ_CUST_ACCT_SITES_ALL (CUST_ACCT_SITE)
2410: 2. HZ_CUST_ACCOUNTS (CUST_ACCT)
2411:
2412: Hence, HZ_CUST_ACCOUNT_ROLES can exist in 3 different scenarios.
2413: The different combinations of (parent, grand parent) are :
2414: 1. (CUST_ACCT_SITE, CUST_ACCT)

Line 2469: grand_parent_entity_name aliased as parent_entity_name: HZ_CUST_ACCOUNTS

2465: parent_id aliased as child_id: 234
2466: parent_entity_name aliased as child_entity_name: HZ_CUST_ACCT_SITES_ALL
2467: parent_bo aliased as child_bo: CUST_ACCT_SITE
2468: grand_parent_id aliased as parent id: 456
2469: grand_parent_entity_name aliased as parent_entity_name: HZ_CUST_ACCOUNTS
2470: grand_parent_bo aliased as parent_bo: CUST_ACCT
2471:
2472: Insert statement will take this result and write it as
2473: child record:

Line 2475: child_bo: CUST_ACCT_SITE, parent_bo: CUST_ACCT, parent_entity_name: HZ_CUST_ACCOUNTS,

2471:
2472: Insert statement will take this result and write it as
2473: child record:
2474: child_id: 234, child_entity_name: HZ_CUST_ACCT_SITES_ALL,
2475: child_bo: CUST_ACCT_SITE, parent_bo: CUST_ACCT, parent_entity_name: HZ_CUST_ACCOUNTS,
2476: parent_id: 456
2477: 6. It is non-trivial to figure out the business object codes for both parent
2478: and grand parent, grand parent identifier or grand parent entity name.
2479: To do this, "inner select" uses case statement on parent_entity_name.

Line 2507: WHEN 'CUST_ACCT_SITE' THEN 'HZ_CUST_ACCOUNTS'

2503: ,RANK()
2504: OVER (PARTITION BY PARENT_BO_CODE, PARENT_ID
2505: ORDER BY LAST_UPDATE_DATE, child_id) as acrrank
2506: ,CASE PARENT_BO_CODE
2507: WHEN 'CUST_ACCT_SITE' THEN 'HZ_CUST_ACCOUNTS'
2508: WHEN 'CUST_ACCT' THEN 'HZ_PARTIES'
2509: ELSE NULL
2510: END parent_entity_name -- this is grand parent tbl name of acct roles, written as parent entity name
2511: ,CASE PARENT_BO_CODE

Line 2518: FROM HZ_CUST_ACCOUNTS

2514: FROM HZ_CUST_ACCT_SITES_ALL
2515: WHERE CUST_ACCT_SITE_ID = PARENT_ID)
2516: WHEN 'CUST_ACCT' THEN
2517: (SELECT PARTY_ID
2518: FROM HZ_CUST_ACCOUNTS
2519: WHERE CUST_ACCOUNT_ID = PARENT_ID)
2520: ELSE NULL
2521: END parent_id -- this is grand parent id of acct roles, written as parent id
2522: ,CASE PARENT_BO_CODE

Line 2531: FROM hz_parties p, HZ_CUST_ACCOUNTS c

2527: WHEN 'ORGANIZATION' THEN 'ORG_CUST'
2528: WHEN 'PERSON' THEN 'PERSON_CUST'
2529: ELSE NULL
2530: END
2531: FROM hz_parties p, HZ_CUST_ACCOUNTS c
2532: WHERE p.party_id = c.party_id
2533: AND c.CUST_ACCOUNT_ID = PARENT_ID)
2534: ELSE NULL
2535: END parent_bo_code -- this is the grand parent bo, written as parent

Line 2569: Procedure name: PROCEDURE ei_HZ_CUST_ACCOUNTS()

2565: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2566: END ei_HZ_CUST_ACCOUNT_ROLES;
2567: -----------------------------------------------------------------
2568: /*
2569: Procedure name: PROCEDURE ei_HZ_CUST_ACCOUNTS()
2570: Purpose: Writes the parent node record for HZ_CUST_ACCOUNTS in BOT
2571: Scope: internal
2572: Called From: This pkg
2573: Called By: populate_missing_links()

Line 2570: Purpose: Writes the parent node record for HZ_CUST_ACCOUNTS in BOT

2566: END ei_HZ_CUST_ACCOUNT_ROLES;
2567: -----------------------------------------------------------------
2568: /*
2569: Procedure name: PROCEDURE ei_HZ_CUST_ACCOUNTS()
2570: Purpose: Writes the parent node record for HZ_CUST_ACCOUNTS in BOT
2571: Scope: internal
2572: Called From: This pkg
2573: Called By: populate_missing_links()
2574: */

Line 2577: PROCEDURE ei_HZ_CUST_ACCOUNTS IS

2573: Called By: populate_missing_links()
2574: */
2575: -----------------------------------------------------------------
2576:
2577: PROCEDURE ei_HZ_CUST_ACCOUNTS IS
2578:
2579: -- local variables
2580: l_debug_prefix VARCHAR2(40) := 'EI_HZ_CUST_ACCOUNTS';
2581:

Line 2580: l_debug_prefix VARCHAR2(40) := 'EI_HZ_CUST_ACCOUNTS';

2576:
2577: PROCEDURE ei_HZ_CUST_ACCOUNTS IS
2578:
2579: -- local variables
2580: l_debug_prefix VARCHAR2(40) := 'EI_HZ_CUST_ACCOUNTS';
2581:
2582: BEGIN
2583: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
2584: hz_utility_v2pub.DEBUG

Line 2585: (p_message=>'ei_HZ_CUST_ACCOUNTS+',

2581:
2582: BEGIN
2583: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
2584: hz_utility_v2pub.DEBUG
2585: (p_message=>'ei_HZ_CUST_ACCOUNTS+',
2586: p_prefix=>l_debug_prefix,
2587: p_msg_level=>fnd_log.level_procedure,
2588: p_module_prefix => 'HZ_BES_BO_UTIL_PKG',
2589: p_module =>'ei_act');

Line 2592: HZ_CUST_ACCOUNTS has following parents

2588: p_module_prefix => 'HZ_BES_BO_UTIL_PKG',
2589: p_module =>'ei_act');
2590: END IF;
2591: /*
2592: HZ_CUST_ACCOUNTS has following parents
2593: 1. HZ_PARTIES (ORG_CUST)
2594: 2. HZ_PARTIES (PERSON_CUST)
2595:
2596: Hence, HZ_CUST_ACCOUNTS can exist in 2 different scenarios.

Line 2596: Hence, HZ_CUST_ACCOUNTS can exist in 2 different scenarios.

2592: HZ_CUST_ACCOUNTS has following parents
2593: 1. HZ_PARTIES (ORG_CUST)
2594: 2. HZ_PARTIES (PERSON_CUST)
2595:
2596: Hence, HZ_CUST_ACCOUNTS can exist in 2 different scenarios.
2597: The different combinations of (parent, grand parent) are :
2598: 1. (ORG_CUST, NULL)
2599: 2. (PERSON_CUST, NULL)
2600:

Line 2601: The following SQL gets the Parent and Grand parent info of each HZ_CUST_ACCOUNTS

2597: The different combinations of (parent, grand parent) are :
2598: 1. (ORG_CUST, NULL)
2599: 2. (PERSON_CUST, NULL)
2600:
2601: The following SQL gets the Parent and Grand parent info of each HZ_CUST_ACCOUNTS
2602: record that was not already processed in BOT.
2603:
2604: Test Cases for the following SQL are:
2605: Create HZ_CUST_ACCOUNTS rec in BOT with (Parent, Grand Parent)

Line 2605: Create HZ_CUST_ACCOUNTS rec in BOT with (Parent, Grand Parent)

2601: The following SQL gets the Parent and Grand parent info of each HZ_CUST_ACCOUNTS
2602: record that was not already processed in BOT.
2603:
2604: Test Cases for the following SQL are:
2605: Create HZ_CUST_ACCOUNTS rec in BOT with (Parent, Grand Parent)
2606: combinations existing in TCA data model
2607: 1. (ORG_CUST, NULL) -- tested
2608: 2. (PERSON_CUST, NULL) -- tested
2609: */

Line 2640: child_id: 123, child_entity_name: HZ_CUST_ACCOUNTS,

2636:
2637: example:
2638:
2639: child record:
2640: child_id: 123, child_entity_name: HZ_CUST_ACCOUNTS,
2641: child_bo: CUST_ACCT, parent_bo: ORG_CUST_ACCT, parent_entity_name: HZ_PARTIES,
2642: parent_id: 234
2643:
2644: The "inner select" fetches above record from BOT and identifies

Line 2685: WHERE t.CHILD_ENTITY_NAME = 'HZ_CUST_ACCOUNTS'

2681: ,RANK()
2682: OVER (PARTITION BY PARENT_BO_CODE, PARENT_ID
2683: ORDER BY t.LAST_UPDATE_DATE, child_id) as acrrank
2684: FROM HZ_BUS_OBJ_TRACKING t
2685: WHERE t.CHILD_ENTITY_NAME = 'HZ_CUST_ACCOUNTS'
2686: AND t.event_id IS NULL) temp
2687: WHERE NOT EXISTS
2688: (SELECT 1 FROM HZ_BUS_OBJ_TRACKING bot --select to exclude the parents that were already written to BOT
2689: WHERE bot.event_id IS NULL

Line 2701: (p_message=>'ei_HZ_CUST_ACCOUNTS-',

2697: -- save the records populated
2698: COMMIT;
2699: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
2700: hz_utility_v2pub.DEBUG
2701: (p_message=>'ei_HZ_CUST_ACCOUNTS-',
2702: p_prefix=>l_debug_prefix,
2703: p_msg_level=>fnd_log.level_procedure,
2704: p_module_prefix => 'HZ_BES_BO_UTIL_PKG',
2705: p_module =>'ei_act');

Line 2709: LOG( message => 'ei_HZ_CUST_ACCOUNTS:'||SQLERRM,

2705: p_module =>'ei_act');
2706: END IF;
2707: EXCEPTION
2708: WHEN OTHERS THEN
2709: LOG( message => 'ei_HZ_CUST_ACCOUNTS:'||SQLERRM,
2710: p_prefix =>l_debug_prefix,
2711: p_module =>'ei_act');
2712: ROLLBACK;
2713: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2714: END ei_HZ_CUST_ACCOUNTS;

2710: p_prefix =>l_debug_prefix,
2711: p_module =>'ei_act');
2712: ROLLBACK;
2713: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2714: END ei_HZ_CUST_ACCOUNTS;
2715: -----------------------------------------------------------------
2716: /*
2717: Procedure name: PROCEDURE ei_HZ_CUSTOMER_PROFILES()
2718: Purpose: Writes the parent node record for HZ_CUSTOMER_PROFILES in BOT

Line 2742: 2. HZ_CUST_ACCOUNTS (CUST_ACCT)

2738: END IF;
2739: /*
2740: Party Site has following parents
2741: 1. HZ_CUST_ACCT_SITE_USES_ALL (CUST_ACCT_SITE_USE)
2742: 2. HZ_CUST_ACCOUNTS (CUST_ACCT)
2743:
2744: Hence, HZ_CUSTOMER_PROFILES can exist in 4 different scenarios.
2745: The different combinations of (parent, grand parent) are :
2746: 1. (CUST_ACCT_SITE_USE, CUST_ACCT_SITE)

Line 2853: FROM HZ_CUST_ACCOUNTS

2849: FROM HZ_CUST_SITE_USES_ALL
2850: WHERE SITE_USE_ID = PARENT_ID)
2851: WHEN 'CUST_ACCT' THEN
2852: (SELECT PARTY_ID
2853: FROM HZ_CUST_ACCOUNTS
2854: WHERE CUST_ACCOUNT_ID = PARENT_ID)
2855: ELSE NULL
2856: END parent_id -- this is grand parent id of acct roles, written as parent id
2857: ,CASE PARENT_BO_CODE

Line 2866: FROM hz_parties p, HZ_CUST_ACCOUNTS c

2862: WHEN 'ORGANIZATION' THEN 'ORG_CUST'
2863: WHEN 'PERSON' THEN 'PERSON_CUST'
2864: ELSE NULL
2865: END
2866: FROM hz_parties p, HZ_CUST_ACCOUNTS c
2867: WHERE p.party_id = c.party_id
2868: AND c.CUST_ACCOUNT_ID = PARENT_ID)
2869: ELSE NULL
2870: END parent_bo_code -- this is the grand parent bo, written as parent

Line 3438: 16. HZ_CUST_ACCOUNTS

3434: 12. HZ_CUST_ACCOUNT_ROLES
3435: 13. HZ_CUSTOMER_PROFILES
3436: 14. HZ_CUST_SITE_USES_ALL
3437: 15. HZ_CUST_ACCT_SITES_ALL
3438: 16. HZ_CUST_ACCOUNTS
3439: */
3440: -- Insert the parent record
3441: -- 1. HZ_CONTACT_PREFERENCES
3442: /* LOG(

Line 3682: -- 16. HZ_CUST_ACCOUNTS

3678: p_module =>'pop_missing_lnks');
3679: END IF;
3680:
3681: ei_HZ_CUST_ACCT_SITES_ALL;
3682: -- 16. HZ_CUST_ACCOUNTS
3683: /*
3684: LOG(
3685: message => 'bfr calling ei_HZ_CUST_ACCOUNTS()',
3686: p_prefix =>l_debug_prefix,

Line 3685: message => 'bfr calling ei_HZ_CUST_ACCOUNTS()',

3681: ei_HZ_CUST_ACCT_SITES_ALL;
3682: -- 16. HZ_CUST_ACCOUNTS
3683: /*
3684: LOG(
3685: message => 'bfr calling ei_HZ_CUST_ACCOUNTS()',
3686: p_prefix =>l_debug_prefix,
3687: p_module => l_module);
3688: */
3689: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN

Line 3691: (p_message=>'bfr calling ei_HZ_CUST_ACCOUNTS()',

3687: p_module => l_module);
3688: */
3689: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN
3690: hz_utility_v2pub.DEBUG
3691: (p_message=>'bfr calling ei_HZ_CUST_ACCOUNTS()',
3692: p_prefix=>l_debug_prefix,
3693: p_msg_level=>fnd_log.level_procedure,
3694: p_module_prefix => 'HZ_BES_BO_UTIL_PKG',
3695: p_module =>'pop_missing_lnks');

Line 3698: ei_HZ_CUST_ACCOUNTS;

3694: p_module_prefix => 'HZ_BES_BO_UTIL_PKG',
3695: p_module =>'pop_missing_lnks');
3696: END IF;
3697:
3698: ei_HZ_CUST_ACCOUNTS;
3699: COMMIT;
3700: LOG( message => 'populate_missing_links()-',
3701: p_prefix =>l_debug_prefix,
3702: p_module => l_module);