35:
36: Procedure Create_Individual_User(
37: p_username IN VARCHAR2,
38: p_password IN VARCHAR2,
39: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
40: p_email_rec IN HZ_CONTACT_POINT_V2PUB.email_rec_type,
41: p_work_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
42: p_home_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
43: p_fax_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
268:
269: Procedure Create_Business_User(
270: p_username IN VARCHAR2,
271: p_password IN VARCHAR2,
272: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
273: p_organization_rec IN HZ_PARTY_V2PUB.organization_rec_type,
274: p_location_rec IN HZ_LOCATION_V2PUB.location_rec_type,
275: p_org_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
276: p_org_fax_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
269: Procedure Create_Business_User(
270: p_username IN VARCHAR2,
271: p_password IN VARCHAR2,
272: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
273: p_organization_rec IN HZ_PARTY_V2PUB.organization_rec_type,
274: p_location_rec IN HZ_LOCATION_V2PUB.location_rec_type,
275: p_org_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
276: p_org_fax_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
277: p_rel_workphone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
296:
297: p_org_name HZ_PARTIES.PARTY_NAME%TYPE := null;
298: p_org_num HZ_PARTIES.PARTY_NUMBER%TYPE := null;
299: l_account_id NUMBER;
300: --p_party_rec HZ_PARTY_V2PUB.party_rec_type;
301: BEGIN
302: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
303: IBE_UTIL.debug('enter ibe_party_v2pvt.create_business_user');
304: END IF;
603: |
604: +=======================================================================*/
605:
606: Procedure Create_Org_Contact(
607: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
608: p_relationship_type IN VARCHAR2, -- 'EMPLOYEE_OF' or 'CONTACT_OF'
609: p_org_party_id IN NUMBER,
610: p_work_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
611: p_home_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
862: | - Creates Accountss
863: |
864: | REFERENCED APIS
865: | This API calls the following APIs
866: | - HZ_PARTY_v2PUB.create_person
867: | - Create_Contact_Points
868: |======================================================================*/
869: Procedure Create_Person(
870: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
866: | - HZ_PARTY_v2PUB.create_person
867: | - Create_Contact_Points
868: |======================================================================*/
869: Procedure Create_Person(
870: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
871: p_email_rec IN HZ_CONTACT_POINT_V2PUB.email_rec_type,
872: p_work_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
873: p_home_phone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
874: p_fax_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
885: l_party_number HZ_PARTIES.PARTY_NUMBER%TYPE;
886: l_profile_id NUMBER;
887: l_account_number NUMBER;
888: l_account_id NUMBER;
889: l_person_rec HZ_PARTY_V2PUB.person_rec_type;
890:
891: l_home_phone_rec HZ_CONTACT_POINT_V2PUB.phone_rec_type := null;
892: l_work_phone_rec HZ_CONTACT_POINT_V2PUB.phone_rec_type := null;
893: l_fax_rec HZ_CONTACT_POINT_V2PUB.phone_rec_type := null;
929: */
930:
931: -- calling TCA API to create_person
932:
933: HZ_PARTY_V2PUB.create_person (
934: p_person_rec => l_person_rec,
935: x_party_id => l_party_id,
936: x_party_number => l_party_number,
937: x_profile_id => l_profile_id,
945: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
946: END IF;
947:
948: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
949: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - l_party_id : '|| l_party_id);
950: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_return_status : '|| x_return_status);
951: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_person - x_msg_count : '|| x_msg_count);
952: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_msg_data : '|| x_msg_data);
953: END IF;
946: END IF;
947:
948: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
949: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - l_party_id : '|| l_party_id);
950: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_return_status : '|| x_return_status);
951: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_person - x_msg_count : '|| x_msg_count);
952: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_msg_data : '|| x_msg_data);
953: END IF;
954:
947:
948: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
949: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - l_party_id : '|| l_party_id);
950: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_return_status : '|| x_return_status);
951: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_person - x_msg_count : '|| x_msg_count);
952: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_msg_data : '|| x_msg_data);
953: END IF;
954:
955: x_person_party_id := l_party_id;
948: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
949: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - l_party_id : '|| l_party_id);
950: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_return_status : '|| x_return_status);
951: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_person - x_msg_count : '|| x_msg_count);
952: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_person - x_msg_data : '|| x_msg_data);
953: END IF;
954:
955: x_person_party_id := l_party_id;
956:
1100: | - Creates Organization contact points
1101: |
1102: | REFERENCED APIS
1103: | This API calls the following APIs
1104: | - HZ_PARTY_v2PUB.create_organization
1105: | - IBE_ADDRESS_V2PVT.create_address
1106: | - Create_Contact_Points
1107: | - Create_Account id p_account is true
1108: +======================================================================*/
1106: | - Create_Contact_Points
1107: | - Create_Account id p_account is true
1108: +======================================================================*/
1109: Procedure Create_Organization(
1110: p_organization_rec IN HZ_PARTY_V2PUB.organization_rec_type,
1111: p_org_workphone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
1112: /* p_org_homephone_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
1113: */
1114: p_org_fax_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
1133: l_party_number HZ_PARTIES.PARTY_NUMBER%TYPE;
1134: l_location_id NUMBER;
1135: l_party_site_id NUMBER;
1136: l_profile_id NUMBER;
1137: l_organization_rec HZ_PARTY_V2PUB.organization_rec_type;
1138: l_party_site_rec HZ_PARTY_SITE_V2PUB.party_site_rec_type;
1139: l_location_rec HZ_LOCATION_V2PUB.location_rec_type;
1140:
1141: l_org_workphone_rec HZ_CONTACT_POINT_V2PUB.phone_rec_type := null;
1182: END IF;
1183: */
1184: -- calling TCA API to create_Organization
1185:
1186: HZ_PARTY_V2PUB.create_organization (
1187: p_organization_rec => l_organization_rec,
1188: x_party_id => l_party_id,
1189: x_party_number => l_party_number,
1190: x_profile_id => l_profile_id,
1191: x_return_status => x_return_status,
1192: x_msg_count => x_msg_count,
1193: x_msg_data => x_msg_data);
1194: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1195: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - l_party_id : '|| l_party_id);
1196: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_return_status : '|| x_return_status);
1197: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_organization - x_msg_count : '|| x_msg_count);
1198: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_msg_data : '|| x_msg_data);
1199: END IF;
1192: x_msg_count => x_msg_count,
1193: x_msg_data => x_msg_data);
1194: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1195: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - l_party_id : '|| l_party_id);
1196: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_return_status : '|| x_return_status);
1197: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_organization - x_msg_count : '|| x_msg_count);
1198: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_msg_data : '|| x_msg_data);
1199: END IF;
1200: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
1193: x_msg_data => x_msg_data);
1194: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1195: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - l_party_id : '|| l_party_id);
1196: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_return_status : '|| x_return_status);
1197: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_organization - x_msg_count : '|| x_msg_count);
1198: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_msg_data : '|| x_msg_data);
1199: END IF;
1200: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
1201: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1194: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1195: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - l_party_id : '|| l_party_id);
1196: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_return_status : '|| x_return_status);
1197: IBE_UTIL.debug('After call HZ_PARTY_V2PUB.create_organization - x_msg_count : '|| x_msg_count);
1198: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create_organization - x_msg_data : '|| x_msg_data);
1199: END IF;
1200: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
1201: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1202: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2036: x_msg_count OUT NOCOPY NUMBER,
2037: x_msg_data OUT NOCOPY VARCHAR2) is
2038:
2039: ddp_account_rec hz_cust_account_v2pub.cust_account_rec_type;
2040: ddp_person_rec hz_party_v2pub.person_rec_type;
2041: ddp_organization_rec hz_party_v2pub.organization_rec_type;
2042: ddp_cust_profile_rec hz_customer_profile_v2pub.customer_profile_rec_type;
2043:
2044: l_gen_cust_num VARCHAR2(1);
2037: x_msg_data OUT NOCOPY VARCHAR2) is
2038:
2039: ddp_account_rec hz_cust_account_v2pub.cust_account_rec_type;
2040: ddp_person_rec hz_party_v2pub.person_rec_type;
2041: ddp_organization_rec hz_party_v2pub.organization_rec_type;
2042: ddp_cust_profile_rec hz_customer_profile_v2pub.customer_profile_rec_type;
2043:
2044: l_gen_cust_num VARCHAR2(1);
2045: l_acct_num VARCHAR2(30);
2215: | - Activate Party and Inactivate Party
2216: |
2217: | REFERENCED APIS
2218: | This API calls the following APIs to update the TCA Entity Status
2219: | - Hz_party_v2pub.update_person
2220: | - Hz_party_contact_v2pub.update_org_contact
2221: | - Hz_party_v2pub.update_organization
2222: | - Hz_cust_account_v2pub.update_cust_account
2223: | - Hz_cust_account_role_v2pub.update_cust_account_role
2217: | REFERENCED APIS
2218: | This API calls the following APIs to update the TCA Entity Status
2219: | - Hz_party_v2pub.update_person
2220: | - Hz_party_contact_v2pub.update_org_contact
2221: | - Hz_party_v2pub.update_organization
2222: | - Hz_cust_account_v2pub.update_cust_account
2223: | - Hz_cust_account_role_v2pub.update_cust_account_role
2224: | - Hz_contact_point_v2pub.update_contact_point
2225: | - Hz_party_site_v2pub.update_party_site
2234: x_msg_count OUT NOCOPY NUMBER,
2235: x_msg_data OUT NOCOPY VARCHAR2) is
2236:
2237: --TCA Records for updation
2238: l_person_rec hz_party_v2pub.person_rec_type;
2239: l_org_rec hz_party_v2pub.organization_rec_type;
2240: l_org_contact_rec hz_party_contact_v2pub.org_contact_rec_type;
2241: l_account_rec hz_cust_account_v2pub.cust_account_rec_type;
2242: l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
2235: x_msg_data OUT NOCOPY VARCHAR2) is
2236:
2237: --TCA Records for updation
2238: l_person_rec hz_party_v2pub.person_rec_type;
2239: l_org_rec hz_party_v2pub.organization_rec_type;
2240: l_org_contact_rec hz_party_contact_v2pub.org_contact_rec_type;
2241: l_account_rec hz_cust_account_v2pub.cust_account_rec_type;
2242: l_contact_point_rec hz_contact_point_v2pub.contact_point_rec_type;
2243: l_party_site_rec hz_party_site_v2pub.party_site_rec_type;
2328: IBE_UTIL.debug('Update Person Rec');
2329: END IF;
2330: l_person_rec.party_rec.party_id := p_party_id;
2331: l_person_rec.party_rec.status := p_party_status;
2332: hz_party_v2pub.update_person
2333: (p_person_rec => l_person_rec,
2334: p_party_object_version_number => rec_party_info.object_version_number,
2335: x_profile_id => l_person_profile_id,
2336: x_return_status => x_return_status,
2387: IBE_UTIL.debug('Update Organization');
2388: END IF;
2389: l_org_rec.party_rec.party_id := p_party_id;
2390: l_org_rec.party_rec.status := p_party_status;
2391: hz_party_v2pub.update_organization
2392: (p_organization_rec => l_org_rec,
2393: p_party_object_version_number => rec_party_info.object_version_number,
2394: x_profile_id => l_person_profile_id,
2395: x_return_status => x_return_status,
2694: | This API is used for creating/updating a B2C user, Creating/Updating
2695: | a B2B user, Upgrading a B2C user into a B2B user.
2696: |
2697: | REFERENCED APIS
2698: | HZ_PARTY_V2PUB.create_person()
2699: | HZ_PARTY_V2PUB.update_person()
2700: | HZ_PARTY_V2PUB.create_organization()
2701: | HZ_PARTY_V2PUB.update_organization()
2702: | HZ_LOCATION_V2PUB.create_location()
2695: | a B2B user, Upgrading a B2C user into a B2B user.
2696: |
2697: | REFERENCED APIS
2698: | HZ_PARTY_V2PUB.create_person()
2699: | HZ_PARTY_V2PUB.update_person()
2700: | HZ_PARTY_V2PUB.create_organization()
2701: | HZ_PARTY_V2PUB.update_organization()
2702: | HZ_LOCATION_V2PUB.create_location()
2703: | HZ_LOCATION_V2PUB.update_location()
2696: |
2697: | REFERENCED APIS
2698: | HZ_PARTY_V2PUB.create_person()
2699: | HZ_PARTY_V2PUB.update_person()
2700: | HZ_PARTY_V2PUB.create_organization()
2701: | HZ_PARTY_V2PUB.update_organization()
2702: | HZ_LOCATION_V2PUB.create_location()
2703: | HZ_LOCATION_V2PUB.update_location()
2704: | HZ_PARTY_SITE_V2PUB.create_party_site()
2697: | REFERENCED APIS
2698: | HZ_PARTY_V2PUB.create_person()
2699: | HZ_PARTY_V2PUB.update_person()
2700: | HZ_PARTY_V2PUB.create_organization()
2701: | HZ_PARTY_V2PUB.update_organization()
2702: | HZ_LOCATION_V2PUB.create_location()
2703: | HZ_LOCATION_V2PUB.update_location()
2704: | HZ_PARTY_SITE_V2PUB.create_party_site()
2705: | HZ_PARTY_CONTACT_V2PUB.create_org_contact()
2711: | HZ_CONTACT_POINT_V2PUB.update_phone_contact_point (
2712: |
2713: +======================================================================*/
2714: Procedure Save_Tca_Entities(
2715: p_person_rec IN HZ_PARTY_V2PUB.person_rec_type,
2716: p_person_object_version_number IN NUMBER,
2717: p_email_contact_point_rec IN HZ_CONTACT_POINT_V2PUB.contact_point_rec_type,
2718: p_email_rec IN HZ_CONTACT_POINT_V2PUB.email_rec_type,
2719: p_email_object_version_number IN NUMBER,
2727: p_fax_rec IN HZ_CONTACT_POINT_V2PUB.phone_rec_type,
2728: p_fax_object_version_number IN NUMBER,
2729: p_contact_pref_rec IN HZ_CONTACT_PREFERENCE_V2PUB.contact_preference_rec_type,
2730: p_cntct_pref_object_ver_num IN NUMBER,
2731: p_organization_rec IN HZ_PARTY_V2PUB.organization_rec_type,
2732: p_org_object_version_number IN NUMBER,
2733: p_location_rec IN HZ_LOCATION_V2PUB.location_rec_type,
2734: p_loc_object_version_number IN NUMBER,
2735: p_orgph_contact_point_rec IN HZ_CONTACT_POINT_V2PUB.contact_point_rec_type,
2777: l_party_site_number HZ_PARTY_SITES.PARTY_SITE_NUMBER%TYPE;
2778:
2779: l_party_site_rec HZ_PARTY_SITE_V2PUB.party_site_rec_type;
2780: l_contact_pref_rec HZ_CONTACT_PREFERENCE_V2PUB.contact_preference_rec_type := p_contact_pref_rec;
2781: l_person_rec HZ_PARTY_V2PUB.person_rec_type := p_person_rec;
2782: l_organization_rec HZ_PARTY_V2PUB.organization_rec_type := p_organization_rec;
2783:
2784: l_email_contact_point_id NUMBER;
2785: l_workph_contact_point_id NUMBER;
2778:
2779: l_party_site_rec HZ_PARTY_SITE_V2PUB.party_site_rec_type;
2780: l_contact_pref_rec HZ_CONTACT_PREFERENCE_V2PUB.contact_preference_rec_type := p_contact_pref_rec;
2781: l_person_rec HZ_PARTY_V2PUB.person_rec_type := p_person_rec;
2782: l_organization_rec HZ_PARTY_V2PUB.organization_rec_type := p_organization_rec;
2783:
2784: l_email_contact_point_id NUMBER;
2785: l_workph_contact_point_id NUMBER;
2786: l_homeph_contact_point_id NUMBER;
2825:
2826: -- Create or Update Person
2827: IF ( l_person_rec.party_rec.party_id = FND_API.G_MISS_NUM or l_person_rec.party_rec.party_id is NULL) THEN
2828: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2829: IBE_UTIL.debug('Call HZ_PARTY_V2PUB.create_person () API');
2830: END IF;
2831: l_person_rec.created_by_module := p_created_by_module;
2832: HZ_PARTY_V2PUB.Create_Person(
2833: p_person_rec => l_person_rec,
2828: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2829: IBE_UTIL.debug('Call HZ_PARTY_V2PUB.create_person () API');
2830: END IF;
2831: l_person_rec.created_by_module := p_created_by_module;
2832: HZ_PARTY_V2PUB.Create_Person(
2833: p_person_rec => l_person_rec,
2834: x_party_id => l_person_party_id,
2835: x_party_number => l_person_party_number,
2836: x_profile_id => l_person_profile_id,
2837: x_return_status => x_return_status,
2838: x_msg_count => x_msg_count,
2839: x_msg_data => x_msg_data);
2840: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2841: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.create_person () API');
2842: END IF;
2843: ELSIF ( l_person_object_version_number <> FND_API.G_MISS_NUM ) THEN
2844: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2845: IBE_UTIL.debug('Call HZ_PARTY_V2PUB.update_person () API');
2841: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.create_person () API');
2842: END IF;
2843: ELSIF ( l_person_object_version_number <> FND_API.G_MISS_NUM ) THEN
2844: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2845: IBE_UTIL.debug('Call HZ_PARTY_V2PUB.update_person () API');
2846: END IF;
2847:
2848: l_person_rec.created_by_module := null;
2849: l_person_rec.application_id := null;
2851: l_person_rec.party_rec.orig_system_reference := null;
2852:
2853: l_person_party_id := l_person_rec.party_rec.party_id;
2854:
2855: HZ_PARTY_V2PUB.Update_Person(
2856: p_person_rec => l_person_rec,
2857: p_party_object_version_number => l_person_object_version_number,
2858: x_return_status => x_return_status,
2859: x_profile_id => l_person_profile_id,
2860: x_msg_count => x_msg_count,
2861: x_msg_data => x_msg_data);
2862:
2863: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2864: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.update_person () API');
2865: END IF;
2866: END IF;
2867:
2868: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2865: END IF;
2866: END IF;
2867:
2868: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2869: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_return_status : '|| x_return_status);
2870: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_msg_count : '|| x_msg_count);
2871: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_msg_data :' || x_msg_data);
2872: END IF;
2873:
2866: END IF;
2867:
2868: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2869: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_return_status : '|| x_return_status);
2870: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_msg_count : '|| x_msg_count);
2871: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_msg_data :' || x_msg_data);
2872: END IF;
2873:
2874: IF x_return_status <> FND_API.G_RET_STS_SUCCESS then
2867:
2868: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2869: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_return_status : '|| x_return_status);
2870: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_msg_count : '|| x_msg_count);
2871: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update person - x_msg_data :' || x_msg_data);
2872: END IF;
2873:
2874: IF x_return_status <> FND_API.G_RET_STS_SUCCESS then
2875: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2878: -- Create or Update Organization
2879: IF ( l_organization_rec.party_rec.party_id = FND_API.G_MISS_NUM Or l_organization_rec.party_rec.party_id is NULL) THEN
2880: IF( l_organization_rec.organization_name is not null AND l_organization_rec.organization_name <> FND_API.G_MISS_CHAR) THEN
2881: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2882: IBE_UTIL.debug('Call HZ_PARTY_V2PUB.create_organization () API');
2883: END IF;
2884:
2885: l_organization_rec.created_by_module := p_created_by_module;
2886: l_organization_rec.application_id := G_APPLICATION_ID;
2883: END IF;
2884:
2885: l_organization_rec.created_by_module := p_created_by_module;
2886: l_organization_rec.application_id := G_APPLICATION_ID;
2887: HZ_PARTY_V2PUB.Create_Organization (
2888: p_organization_rec => l_organization_rec,
2889: x_return_status => x_return_status,
2890: x_msg_count => x_msg_count,
2891: x_msg_data => x_msg_data,
2895:
2896: l_organization_rec.party_rec.party_id := l_org_party_id;
2897:
2898: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2899: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.create_organization () API'||l_organization_rec.party_rec.party_id);
2900: END IF;
2901: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2902: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2903: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2898: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2899: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.create_organization () API'||l_organization_rec.party_rec.party_id);
2900: END IF;
2901: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2902: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2903: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2904: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_data :' || x_msg_data);
2905: END IF;
2906: END IF;
2899: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.create_organization () API'||l_organization_rec.party_rec.party_id);
2900: END IF;
2901: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2902: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2903: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2904: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_data :' || x_msg_data);
2905: END IF;
2906: END IF;
2907: ELSIF ( l_org_object_version_number <> FND_API.G_MISS_NUM ) THEN
2900: END IF;
2901: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2902: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2903: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2904: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_data :' || x_msg_data);
2905: END IF;
2906: END IF;
2907: ELSIF ( l_org_object_version_number <> FND_API.G_MISS_NUM ) THEN
2908: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2905: END IF;
2906: END IF;
2907: ELSIF ( l_org_object_version_number <> FND_API.G_MISS_NUM ) THEN
2908: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2909: IBE_UTIL.debug('Call HZ_PARTY_V2PUB.update_organization () API');
2910: END IF;
2911:
2912: l_organization_rec.created_by_module := null;
2913: l_organization_rec.application_id := null;
2911:
2912: l_organization_rec.created_by_module := null;
2913: l_organization_rec.application_id := null;
2914: l_organization_rec.party_rec.orig_system_reference := null;
2915: HZ_PARTY_V2PUB.Update_Organization (
2916: p_organization_rec => l_organization_rec,
2917: p_party_object_version_number => l_org_object_version_number,
2918: x_profile_id => l_org_profile_id,
2919: x_return_status => x_return_status,
2922:
2923: l_org_party_id := l_organization_rec.party_rec.party_id;
2924:
2925: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2926: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.update_organization () API');
2927: END IF;
2928:
2929: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2930: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2926: IBE_UTIL.debug('Completed Call HZ_PARTY_V2PUB.update_organization () API');
2927: END IF;
2928:
2929: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2930: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2931: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2932: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_data :' || x_msg_data);
2933: END IF;
2934: END IF;
2927: END IF;
2928:
2929: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2930: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2931: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2932: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_data :' || x_msg_data);
2933: END IF;
2934: END IF;
2935:
2928:
2929: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2930: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_return_status : '|| x_return_status);
2931: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_count : '|| x_msg_count);
2932: IBE_UTIL.debug('After call to HZ_PARTY_V2PUB.create/update organization - x_msg_data :' || x_msg_data);
2933: END IF;
2934: END IF;
2935:
2936: IF x_return_status <> FND_API.G_RET_STS_SUCCESS then