DBA Data[Home] [Help]

APPS.HZ_POPULATE_BOT_PKG dependencies on HZ_CUST_ACCOUNTS

Line 218: decode(car.cust_acct_site_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_ACCT_SITES_ALL') car_parent_entity,

214: -- cursor statement to select the info from child table
215: CURSOR c_child IS
216: SELECT rr.LAST_UPDATE_DATE lud, rr.CUST_ACCOUNT_ROLE_ID parent_id, rr.RESPONSIBILITY_ID child_id,
217: nvl(car.cust_acct_site_id, car.cust_account_id) car_parent_id,
218: decode(car.cust_acct_site_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_ACCT_SITES_ALL') car_parent_entity,
219: decode(car.cust_acct_site_id, null, 'CUST_ACCT', 'CUST_ACCT_SITE') car_parent_bo
220: FROM HZ_ROLE_RESPONSIBILITY rr, HZ_CUST_ACCOUNT_ROLES car
221: WHERE rr.RESPONSIBILITY_ID = P_RESPONSIBILITY_ID
222: AND rr.cust_account_role_id = car.cust_account_role_id

Line 2206: decode(cp.site_use_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') cp_parent_entity,

2202: CURSOR C_child IS
2203: SELECT cpa.LAST_UPDATE_DATE lud, cpa.CUST_ACCOUNT_PROFILE_ID parent_id,
2204: cpa.CUST_ACCT_PROFILE_AMT_ID child_id,
2205: nvl(cp.site_use_id, cp.cust_account_id) cp_parent_id,
2206: decode(cp.site_use_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') cp_parent_entity,
2207: decode(cp.site_use_id, null, 'CUST_ACCT', 'CUST_ACCT_SITE_USE') cp_parent_bo
2208: FROM HZ_CUST_PROFILE_AMTS cpa, HZ_CUSTOMER_PROFILES cp
2209: WHERE cpa.CUST_ACCT_PROFILE_AMT_ID = P_CUST_ACCT_PROFILE_AMT_ID
2210: AND cpa.cust_account_profile_id = cp.cust_account_profile_id

Line 2317: FROM HZ_CUST_ACCT_SITES_ALL cas, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p

2313: CURSOR C_child IS
2314: SELECT cas.LAST_UPDATE_DATE lud, cas.CUST_ACCOUNT_ID parent_id, cas.CUST_ACCT_SITE_ID child_id,
2315: ca.party_id ca_parent_id,
2316: decode(p.party_type, 'ORGANIZATION', 'ORG', 'PERSON', 'PERSON', NULL) ca_parent_bo
2317: FROM HZ_CUST_ACCT_SITES_ALL cas, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p
2318: WHERE cas.CUST_ACCT_SITE_ID = P_CUST_ACCT_SITE_ID
2319: AND cas.cust_account_id = ca.cust_account_id
2320: AND ca.party_id = p.party_id
2321: AND p.party_type in ('ORGANIZATION', 'PERSON')

Line 2388: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_parent_id, 'CUST_ACCT');

2384: ( POPULATED_FLAG, CHILD_OPERATION_FLAG, CHILD_ID, CHILD_ENTITY_NAME, CHILD_BO_CODE,
2385: LAST_UPDATE_DATE, CREATION_DATE, PARENT_ENTITY_NAME, PARENT_ID, PARENT_BO_CODE
2386: ) VALUES (
2387: 'N', p_operation, l_child_id, 'HZ_CUST_ACCT_SITES_ALL', 'CUST_ACCT_SITE',
2388: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_parent_id, 'CUST_ACCT');
2389: END ; -- anonymous block end
2390: END LOOP;
2391:
2392: hz_utility_v2pub.DEBUG(p_message=>'pop_hz_cust_acct_sites_all-',

Line 2432: FROM HZ_CUST_ACCT_RELATE_ALL car, HZ_CUST_ACCOUNTS ca, HZ_CUST_ACCOUNTS rel_ca,

2428: car.related_cust_account_id rcap_id,
2429: decode(p.party_type, 'ORGANIZATION', 'ORG_CUST', 'PERSON', 'PERSON_CUST', NULL) pbo,
2430: decode(rel_p.party_type, 'ORGANIZATION', 'ORG_CUST', 'PERSON', 'PERSON_CUST', NULL) rel_pbo,
2431: p.party_id pid, rel_p.party_id rel_pid
2432: FROM HZ_CUST_ACCT_RELATE_ALL car, HZ_CUST_ACCOUNTS ca, HZ_CUST_ACCOUNTS rel_ca,
2433: HZ_PARTIES p, HZ_PARTIES rel_p
2434: WHERE car.cust_acct_relate_id = p_cust_acct_relate_id
2435: AND car.cust_account_id = ca.cust_account_id
2436: AND car.related_cust_account_id = rel_ca.cust_account_id

Line 2503: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_cap_id, 'CUST_ACCT');

2499: ( POPULATED_FLAG, CHILD_OPERATION_FLAG, CHILD_ID, CHILD_ENTITY_NAME, CHILD_BO_CODE,
2500: LAST_UPDATE_DATE, CREATION_DATE, PARENT_ENTITY_NAME, PARENT_ID, PARENT_BO_CODE
2501: ) VALUES (
2502: 'N', p_operation, l_child_id, 'HZ_CUST_ACCT_RELATE_ALL', NULL,
2503: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_cap_id, 'CUST_ACCT');
2504:
2505: pop_parent_record(p_child_id => l_cap_id,
2506: p_lud => l_lud,
2507: p_centity_name => 'HZ_CUST_ACCOUNTS',

Line 2507: p_centity_name => 'HZ_CUST_ACCOUNTS',

2503: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_cap_id, 'CUST_ACCT');
2504:
2505: pop_parent_record(p_child_id => l_cap_id,
2506: p_lud => l_lud,
2507: p_centity_name => 'HZ_CUST_ACCOUNTS',
2508: p_cbo_code => 'CUST_ACCT',
2509: p_parent_id => l_pid,
2510: p_pentity_name => 'HZ_PARTIES',
2511: p_pbo_code => l_pbo);

Line 2526: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_rcap_id, 'CUST_ACCT');

2522: ( POPULATED_FLAG, CHILD_OPERATION_FLAG, CHILD_ID, CHILD_ENTITY_NAME, CHILD_BO_CODE,
2523: LAST_UPDATE_DATE, CREATION_DATE, PARENT_ENTITY_NAME, PARENT_ID, PARENT_BO_CODE
2524: ) VALUES (
2525: 'N', p_operation, l_child_id, 'HZ_CUST_ACCT_RELATE_ALL', NULL,
2526: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_rcap_id, 'CUST_ACCT');
2527:
2528: pop_parent_record(p_child_id => l_rcap_id,
2529: p_lud => l_lud,
2530: p_centity_name => 'HZ_CUST_ACCOUNTS',

Line 2530: p_centity_name => 'HZ_CUST_ACCOUNTS',

2526: l_lud, l_lud, 'HZ_CUST_ACCOUNTS', l_rcap_id, 'CUST_ACCT');
2527:
2528: pop_parent_record(p_child_id => l_rcap_id,
2529: p_lud => l_lud,
2530: p_centity_name => 'HZ_CUST_ACCOUNTS',
2531: p_cbo_code => 'CUST_ACCT',
2532: p_parent_id => l_rel_pid,
2533: p_pentity_name => 'HZ_PARTIES',
2534: p_pbo_code => l_rel_pbo);

Line 2582: decode(car.cust_acct_site_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_ACCT_SITES_ALL') parent_entity,

2578: CURSOR C_child IS
2579: SELECT car.LAST_UPDATE_DATE lud, car.CUST_ACCOUNT_ROLE_ID child_id,
2580: nvl(car.cust_acct_site_id, car.cust_account_id) parent_id,
2581: decode(car.cust_acct_site_id, null, 'CUST_ACCT', 'CUST_ACCT_SITE') parent_bo,
2582: decode(car.cust_acct_site_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_ACCT_SITES_ALL') parent_entity,
2583: ca.cust_account_id ca_id
2584: FROM HZ_CUST_ACCOUNT_ROLES car, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p
2585: WHERE car.CUST_ACCOUNT_ROLE_ID = P_CUST_ACCOUNT_ROLE_ID
2586: AND car.cust_account_id = ca.cust_account_id

Line 2584: FROM HZ_CUST_ACCOUNT_ROLES car, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p

2580: nvl(car.cust_acct_site_id, car.cust_account_id) parent_id,
2581: decode(car.cust_acct_site_id, null, 'CUST_ACCT', 'CUST_ACCT_SITE') parent_bo,
2582: decode(car.cust_acct_site_id, null, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_ACCT_SITES_ALL') parent_entity,
2583: ca.cust_account_id ca_id
2584: FROM HZ_CUST_ACCOUNT_ROLES car, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p
2585: WHERE car.CUST_ACCOUNT_ROLE_ID = P_CUST_ACCOUNT_ROLE_ID
2586: AND car.cust_account_id = ca.cust_account_id
2587: AND ca.party_id = p.party_id
2588: AND p.party_type in ('ORGANIZATION', 'PERSON')

Line 2671: -- Procedure name: pop_hz_cust_accounts()

2667: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2668: END pop_hz_cust_account_roles;
2669:
2670: -----------------------------------------------------------------
2671: -- Procedure name: pop_hz_cust_accounts()
2672: -- Purpose: populates BOT for HZ_CUST_ACCOUNTS create or update
2673: -- Scope: internal
2674: -- Called From: V2 API
2675: -- Called By: HZ_CUST_ACCOUNTS create or update APIs

Line 2672: -- Purpose: populates BOT for HZ_CUST_ACCOUNTS create or update

2668: END pop_hz_cust_account_roles;
2669:
2670: -----------------------------------------------------------------
2671: -- Procedure name: pop_hz_cust_accounts()
2672: -- Purpose: populates BOT for HZ_CUST_ACCOUNTS create or update
2673: -- Scope: internal
2674: -- Called From: V2 API
2675: -- Called By: HZ_CUST_ACCOUNTS create or update APIs
2676: -- Input Parameters:

Line 2675: -- Called By: HZ_CUST_ACCOUNTS create or update APIs

2671: -- Procedure name: pop_hz_cust_accounts()
2672: -- Purpose: populates BOT for HZ_CUST_ACCOUNTS create or update
2673: -- Scope: internal
2674: -- Called From: V2 API
2675: -- Called By: HZ_CUST_ACCOUNTS create or update APIs
2676: -- Input Parameters:
2677: -- p_operation -- contains I or U. 'I' if create API is calling this otherwise 'U'.
2678: -- p_cust_account_id IN NUMBER
2679: --

Line 2681: -- Following are the allowed PARENT and CHILD BO combinations for HZ_CUST_ACCOUNTS

2677: -- p_operation -- contains I or U. 'I' if create API is calling this otherwise 'U'.
2678: -- p_cust_account_id IN NUMBER
2679: --
2680: -- Note:
2681: -- Following are the allowed PARENT and CHILD BO combinations for HZ_CUST_ACCOUNTS
2682: -- This procedure must ensure that the combination is valid before populating BOT
2683: --
2684: -- PARENT BO: ORG_CUST :: CHILD BO: CUST_ACCT
2685: -- PARENT BO: PERSON_CUST :: CHILD BO: CUST_ACCT

Line 2687: PROCEDURE pop_hz_cust_accounts(p_operation IN VARCHAR2, p_cust_account_id IN NUMBER) IS

2683: --
2684: -- PARENT BO: ORG_CUST :: CHILD BO: CUST_ACCT
2685: -- PARENT BO: PERSON_CUST :: CHILD BO: CUST_ACCT
2686: -----------------------------------------------------------------
2687: PROCEDURE pop_hz_cust_accounts(p_operation IN VARCHAR2, p_cust_account_id IN NUMBER) IS
2688:
2689: -- cursor statement to select the info from child table
2690: CURSOR C_child IS
2691: SELECT ca.LAST_UPDATE_DATE lud, ca.PARTY_ID parent_id, ca.CUST_ACCOUNT_ID child_id,

Line 2693: FROM HZ_CUST_ACCOUNTS ca, HZ_PARTIES p

2689: -- cursor statement to select the info from child table
2690: CURSOR C_child IS
2691: SELECT ca.LAST_UPDATE_DATE lud, ca.PARTY_ID parent_id, ca.CUST_ACCOUNT_ID child_id,
2692: decode(p.party_type, 'ORGANIZATION', 'ORG_CUST', 'PERSON', 'PERSON_CUST', NULL) bo_code
2693: FROM HZ_CUST_ACCOUNTS ca, HZ_PARTIES p
2694: WHERE ca.CUST_ACCOUNT_ID = P_CUST_ACCOUNT_ID
2695: AND ca.party_id = p.party_id
2696: AND p.party_type in ('ORGANIZATION', 'PERSON')
2697: AND ca.cust_account_id > 0;

Line 2700: l_debug_prefix VARCHAR2(40) := 'pop_hz_cust_accounts';

2696: AND p.party_type in ('ORGANIZATION', 'PERSON')
2697: AND ca.cust_account_id > 0;
2698:
2699: -- local variables
2700: l_debug_prefix VARCHAR2(40) := 'pop_hz_cust_accounts';
2701: l_parent_id NUMBER; -- used to store parent entity identifier
2702: l_bo_code VARCHAR2(30); -- used to store BO Code
2703: l_child_id NUMBER; -- used to store HZ_CUST_ACCOUNTS identifier
2704: l_lud DATE; -- used to store the child last update date

Line 2703: l_child_id NUMBER; -- used to store HZ_CUST_ACCOUNTS identifier

2699: -- local variables
2700: l_debug_prefix VARCHAR2(40) := 'pop_hz_cust_accounts';
2701: l_parent_id NUMBER; -- used to store parent entity identifier
2702: l_bo_code VARCHAR2(30); -- used to store BO Code
2703: l_child_id NUMBER; -- used to store HZ_CUST_ACCOUNTS identifier
2704: l_lud DATE; -- used to store the child last update date
2705: l_child_rec_exists_no NUMBER;
2706: l_pop_flag VARCHAR2(1);
2707: l_cen VARCHAR2(30) := 'HZ_CUST_ACCOUNTS';

Line 2707: l_cen VARCHAR2(30) := 'HZ_CUST_ACCOUNTS';

2703: l_child_id NUMBER; -- used to store HZ_CUST_ACCOUNTS identifier
2704: l_lud DATE; -- used to store the child last update date
2705: l_child_rec_exists_no NUMBER;
2706: l_pop_flag VARCHAR2(1);
2707: l_cen VARCHAR2(30) := 'HZ_CUST_ACCOUNTS';
2708: BEGIN
2709: hz_utility_v2pub.DEBUG(p_message=>'pop_hz_cust_accounts+',
2710: p_prefix=>l_debug_prefix,
2711: p_msg_level=>fnd_log.level_procedure);

Line 2709: hz_utility_v2pub.DEBUG(p_message=>'pop_hz_cust_accounts+',

2705: l_child_rec_exists_no NUMBER;
2706: l_pop_flag VARCHAR2(1);
2707: l_cen VARCHAR2(30) := 'HZ_CUST_ACCOUNTS';
2708: BEGIN
2709: hz_utility_v2pub.DEBUG(p_message=>'pop_hz_cust_accounts+',
2710: p_prefix=>l_debug_prefix,
2711: p_msg_level=>fnd_log.level_procedure);
2712:
2713: -- validate p_operation

Line 2717: hz_utility_v2pub.DEBUG(p_message=> 'incorrect operation flag sent to pop_hz_cust_accounts',

2713: -- validate p_operation
2714: IF p_operation IN ('I','U') THEN
2715: NULL;
2716: ELSE
2717: hz_utility_v2pub.DEBUG(p_message=> 'incorrect operation flag sent to pop_hz_cust_accounts',
2718: p_prefix=>l_debug_prefix,
2719: p_msg_level=>fnd_log.level_procedure);
2720: RAISE FND_API.G_EXC_ERROR;
2721: END IF;

Line 2760: 'N', p_operation, l_child_id, 'HZ_CUST_ACCOUNTS', 'CUST_ACCT',

2756: INSERT INTO HZ_BUS_OBJ_TRACKING
2757: ( POPULATED_FLAG, CHILD_OPERATION_FLAG, CHILD_ID, CHILD_ENTITY_NAME, CHILD_BO_CODE,
2758: LAST_UPDATE_DATE, CREATION_DATE, PARENT_ENTITY_NAME, PARENT_ID, PARENT_BO_CODE
2759: ) VALUES (
2760: 'N', p_operation, l_child_id, 'HZ_CUST_ACCOUNTS', 'CUST_ACCT',
2761: l_lud, l_lud, 'HZ_PARTIES', l_parent_id, l_bo_code);
2762: END ; -- anonymous block end
2763: END LOOP;
2764:

Line 2765: hz_utility_v2pub.DEBUG(p_message=>'pop_hz_cust_accounts-',

2761: l_lud, l_lud, 'HZ_PARTIES', l_parent_id, l_bo_code);
2762: END ; -- anonymous block end
2763: END LOOP;
2764:
2765: hz_utility_v2pub.DEBUG(p_message=>'pop_hz_cust_accounts-',
2766: p_prefix=>l_debug_prefix,
2767: p_msg_level=>fnd_log.level_procedure);
2768: EXCEPTION
2769: WHEN OTHERS THEN

Line 2774: END pop_hz_cust_accounts;

2770: hz_utility_v2pub.DEBUG(p_message=> SQLERRM,
2771: p_prefix=>l_debug_prefix,
2772: p_msg_level=>fnd_log.level_procedure);
2773: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2774: END pop_hz_cust_accounts;
2775:
2776: -----------------------------------------------------------------
2777: -- Procedure name: pop_hz_customer_profiles()
2778: -- Purpose: populates BOT for HZ_CUSTOMER_PROFILES create or update

Line 2799: decode(cp.site_use_id, NULL, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') parent_entity,

2795: -- cursor statement to select the info from child table
2796: CURSOR C_child IS
2797: SELECT cp.LAST_UPDATE_DATE lud,
2798: nvl(cp.site_use_id, cp.cust_account_id) parent_id,
2799: decode(cp.site_use_id, NULL, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') parent_entity,
2800: decode(cp.site_use_id, NULL, 'CUST_ACCT', 'CUST_ACCT_SITE_USE') parent_bo,
2801: cp.CUST_ACCOUNT_PROFILE_ID child_id
2802: FROM HZ_CUSTOMER_PROFILES cp
2803: WHERE cp.CUST_ACCOUNT_PROFILE_ID = P_CUST_ACCOUNT_PROFILE_ID

Line 3916: decode(rcrm.site_use_id, NULL, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') parent_tbl_name,

3912: -- cursor statement to select the info from child table
3913: CURSOR C_child IS
3914: SELECT rcrm.last_update_date lud, rcrm.cust_receipt_method_id child_id,
3915: nvl(rcrm.site_use_id, rcrm.customer_id) parent_id,
3916: decode(rcrm.site_use_id, NULL, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') parent_tbl_name,
3917: decode(rcrm.site_use_id, NULL, 'CUST_ACCT', 'CUST_ACCT_SITE_USE') parent_bo_code,
3918: decode(rcrm.site_use_id, NULL, p.party_id, rcrm.customer_id) grand_parent_id,
3919: decode(rcrm.site_use_id, NULL, 'HZ_PARTIES', 'HZ_CUST_ACCOUNTS') grand_parent_tbl_name,
3920: decode(rcrm.site_use_id, NULL, decode(p.party_type, 'ORGANIZATION', 'ORG_CUST', 'PERSON', 'PERSON_CUST', NULL), 'CUST_ACCT') grand_parent_bo_code

Line 3919: decode(rcrm.site_use_id, NULL, 'HZ_PARTIES', 'HZ_CUST_ACCOUNTS') grand_parent_tbl_name,

3915: nvl(rcrm.site_use_id, rcrm.customer_id) parent_id,
3916: decode(rcrm.site_use_id, NULL, 'HZ_CUST_ACCOUNTS', 'HZ_CUST_SITE_USES_ALL') parent_tbl_name,
3917: decode(rcrm.site_use_id, NULL, 'CUST_ACCT', 'CUST_ACCT_SITE_USE') parent_bo_code,
3918: decode(rcrm.site_use_id, NULL, p.party_id, rcrm.customer_id) grand_parent_id,
3919: decode(rcrm.site_use_id, NULL, 'HZ_PARTIES', 'HZ_CUST_ACCOUNTS') grand_parent_tbl_name,
3920: decode(rcrm.site_use_id, NULL, decode(p.party_type, 'ORGANIZATION', 'ORG_CUST', 'PERSON', 'PERSON_CUST', NULL), 'CUST_ACCT') grand_parent_bo_code
3921: FROM RA_CUST_RECEIPT_METHODS rcrm, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p
3922: WHERE rcrm.cust_receipt_method_id = p_cust_receipt_method_id
3923: AND rcrm.customer_id = ca.cust_account_id

Line 3921: FROM RA_CUST_RECEIPT_METHODS rcrm, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p

3917: decode(rcrm.site_use_id, NULL, 'CUST_ACCT', 'CUST_ACCT_SITE_USE') parent_bo_code,
3918: decode(rcrm.site_use_id, NULL, p.party_id, rcrm.customer_id) grand_parent_id,
3919: decode(rcrm.site_use_id, NULL, 'HZ_PARTIES', 'HZ_CUST_ACCOUNTS') grand_parent_tbl_name,
3920: decode(rcrm.site_use_id, NULL, decode(p.party_type, 'ORGANIZATION', 'ORG_CUST', 'PERSON', 'PERSON_CUST', NULL), 'CUST_ACCT') grand_parent_bo_code
3921: FROM RA_CUST_RECEIPT_METHODS rcrm, HZ_CUST_ACCOUNTS ca, HZ_PARTIES p
3922: WHERE rcrm.cust_receipt_method_id = p_cust_receipt_method_id
3923: AND rcrm.customer_id = ca.cust_account_id
3924: AND ca.party_id = p.party_id
3925: AND p.party_type in ('ORGANIZATION', 'PERSON')