DBA Data[Home] [Help]

APPS.HZ_CUST_ACCOUNT_SITE_V2PUB dependencies on FND_API

Line 40: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,

36:
37: PROCEDURE do_create_cust_site_use (
38: p_cust_site_use_rec IN OUT NOCOPY CUST_SITE_USE_REC_TYPE,
39: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
40: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
41: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
42: x_site_use_id OUT NOCOPY NUMBER,
43: x_return_status IN OUT NOCOPY VARCHAR2
44: );

Line 41: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

37: PROCEDURE do_create_cust_site_use (
38: p_cust_site_use_rec IN OUT NOCOPY CUST_SITE_USE_REC_TYPE,
39: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
40: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
41: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
42: x_site_use_id OUT NOCOPY NUMBER,
43: x_return_status IN OUT NOCOPY VARCHAR2
44: );
45:

Line 153: * be FND_API.G_RET_STS_SUCCESS (success),

149: * ARGUMENTS
150: * IN/OUT:
151: * p_cust_acct_site_rec Customer account site record.
152: * x_return_status Return status after the call. The status can
153: * be FND_API.G_RET_STS_SUCCESS (success),
154: * FND_API.G_RET_STS_ERROR (error),
155: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
156: * OUT:
157: * x_cust_acct_site_id Customer account site ID.

Line 154: * FND_API.G_RET_STS_ERROR (error),

150: * IN/OUT:
151: * p_cust_acct_site_rec Customer account site record.
152: * x_return_status Return status after the call. The status can
153: * be FND_API.G_RET_STS_SUCCESS (success),
154: * FND_API.G_RET_STS_ERROR (error),
155: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
156: * OUT:
157: * x_cust_acct_site_id Customer account site ID.
158: *

Line 155: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

151: * p_cust_acct_site_rec Customer account site record.
152: * x_return_status Return status after the call. The status can
153: * be FND_API.G_RET_STS_SUCCESS (success),
154: * FND_API.G_RET_STS_ERROR (error),
155: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
156: * OUT:
157: * x_cust_acct_site_id Customer account site ID.
158: *
159: * NOTES

Line 256: RAISE FND_API.G_EXC_ERROR;

252: FND_MESSAGE.SET_NAME('AR', 'HZ_API_NO_RECORD');
253: FND_MESSAGE.SET_TOKEN('RECORD', 'Release Name');
254: FND_MESSAGE.SET_TOKEN('VALUE', 'HZ_INACTIVATE_ACCOUNT_SITE_UI');
255: FND_MSG_PUB.ADD;
256: RAISE FND_API.G_EXC_ERROR;
257: END;
258: END IF;
259: IF g_message_name IS NOT NULL THEN
260: -- Code modified for Bug 3714636 ends here

Line 276: RAISE FND_API.G_EXC_ERROR;

272: FND_MESSAGE.SET_TOKEN( 'RECORD', 'party site' );
273: FND_MESSAGE.SET_TOKEN( 'VALUE',
274: NVL( TO_CHAR( p_cust_acct_site_rec.party_site_id ), 'null' ) );
275: FND_MSG_PUB.ADD;
276: RAISE FND_API.G_EXC_ERROR;
277: END;
278:
279: /*IF p_cust_acct_site_rec.status is NULL OR p_cust_acct_site_rec.status <> l_status THEN --Bug 3370870 */
280: IF NVL(p_cust_acct_site_rec.status,'A') <> l_status THEN -- Bug 3805019

Line 294: RAISE FND_API.G_EXC_ERROR;

290: MO_GLOBAL.validate_orgid_pub_api(p_cust_acct_site_rec.org_id,'N',l_return_status);
291: EXCEPTION
292: WHEN OTHERS
293: THEN
294: RAISE FND_API.G_EXC_ERROR;
295: END;
296:
297: if (p_cust_acct_site_rec.orig_system is null or p_cust_acct_site_rec.orig_system = fnd_api.g_miss_char)
298: and (p_cust_acct_site_rec.orig_system_reference is not null and

Line 297: if (p_cust_acct_site_rec.orig_system is null or p_cust_acct_site_rec.orig_system = fnd_api.g_miss_char)

293: THEN
294: RAISE FND_API.G_EXC_ERROR;
295: END;
296:
297: if (p_cust_acct_site_rec.orig_system is null or p_cust_acct_site_rec.orig_system = fnd_api.g_miss_char)
298: and (p_cust_acct_site_rec.orig_system_reference is not null and
299: p_cust_acct_site_rec.orig_system_reference <> fnd_api.g_miss_char) then
300: p_cust_acct_site_rec.orig_system := 'UNKNOWN';
301: end if;

Line 299: p_cust_acct_site_rec.orig_system_reference <> fnd_api.g_miss_char) then

295: END;
296:
297: if (p_cust_acct_site_rec.orig_system is null or p_cust_acct_site_rec.orig_system = fnd_api.g_miss_char)
298: and (p_cust_acct_site_rec.orig_system_reference is not null and
299: p_cust_acct_site_rec.orig_system_reference <> fnd_api.g_miss_char) then
300: p_cust_acct_site_rec.orig_system := 'UNKNOWN';
301: end if;
302:
303: open check_orig_sys_ref;

Line 317: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

313: p_cust_acct_site_rec => p_cust_acct_site_rec,
314: p_rowid => NULL,
315: x_return_status => x_return_status );
316:
317: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
318: RAISE FND_API.G_EXC_ERROR;
319: END IF;
320:
321: -- Add for global holds

Line 318: RAISE FND_API.G_EXC_ERROR;

314: p_rowid => NULL,
315: x_return_status => x_return_status );
316:
317: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
318: RAISE FND_API.G_EXC_ERROR;
319: END IF;
320:
321: -- Add for global holds
322: --

Line 351: l_return_status := FND_API.G_RET_STS_SUCCESS;

347: p_msg_level=>fnd_log.level_statement);
348: END IF;
349:
350: BEGIN
351: l_return_status := FND_API.G_RET_STS_SUCCESS;
352: OE_Holds_PUB.Process_Holds (
353: p_api_version => 1.0,
354: p_init_msg_list => FND_API.G_FALSE,
355: p_hold_entity_code => 'C',

Line 354: p_init_msg_list => FND_API.G_FALSE,

350: BEGIN
351: l_return_status := FND_API.G_RET_STS_SUCCESS;
352: OE_Holds_PUB.Process_Holds (
353: p_api_version => 1.0,
354: p_init_msg_list => FND_API.G_FALSE,
355: p_hold_entity_code => 'C',
356: p_hold_entity_id => p_cust_acct_site_rec.cust_account_id,
357: p_hold_id => 1,
358: p_release_reason_code => 'AR_AUTOMATIC',

Line 388: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

384:
385: --
386: -- only raise unexpected error
387: --
388: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
389: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
390: END IF;
391: END IF;
392: END IF;

Line 389: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

385: --
386: -- only raise unexpected error
387: --
388: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
389: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
390: END IF;
391: END IF;
392: END IF;
393: CLOSE c_check_first_site;

Line 478: --if (p_cust_acct_site_rec.orig_system_reference is not null and l_party_rec.orig_system_reference<>fnd_api.g_miss_char )-for two tables has null osr.

474: p_msg_level=>fnd_log.level_procedure);
475: END IF;
476:
477:
478: --if (p_cust_acct_site_rec.orig_system_reference is not null and l_party_rec.orig_system_reference<>fnd_api.g_miss_char )-for two tables has null osr.
479: if (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
480: then
481: l_orig_sys_reference_rec.orig_system := p_cust_acct_site_rec.orig_system;
482: l_orig_sys_reference_rec.orig_system_reference := l_orig_system_reference;

Line 479: if (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)

475: END IF;
476:
477:
478: --if (p_cust_acct_site_rec.orig_system_reference is not null and l_party_rec.orig_system_reference<>fnd_api.g_miss_char )-for two tables has null osr.
479: if (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
480: then
481: l_orig_sys_reference_rec.orig_system := p_cust_acct_site_rec.orig_system;
482: l_orig_sys_reference_rec.orig_system_reference := l_orig_system_reference;
483: l_orig_sys_reference_rec.owner_table_name := 'HZ_CUST_ACCT_SITES_ALL';

Line 488: FND_API.G_FALSE,

484: l_orig_sys_reference_rec.owner_table_id := p_cust_acct_site_rec.cust_acct_site_id;
485: l_orig_sys_reference_rec.created_by_module := p_cust_acct_site_rec.created_by_module;
486:
487: hz_orig_system_ref_pub.create_orig_system_reference(
488: FND_API.G_FALSE,
489: l_orig_sys_reference_rec,
490: x_return_status,
491: l_msg_count,
492: l_msg_data);

Line 493: IF x_return_status <> fnd_api.g_ret_sts_success THEN

489: l_orig_sys_reference_rec,
490: x_return_status,
491: l_msg_count,
492: l_msg_data);
493: IF x_return_status <> fnd_api.g_ret_sts_success THEN
494: RAISE FND_API.G_EXC_ERROR;
495: END IF;
496: end if;
497:

Line 494: RAISE FND_API.G_EXC_ERROR;

490: x_return_status,
491: l_msg_count,
492: l_msg_data);
493: IF x_return_status <> fnd_api.g_ret_sts_success THEN
494: RAISE FND_API.G_EXC_ERROR;
495: END IF;
496: end if;
497:
498: x_cust_acct_site_id := p_cust_acct_site_rec.cust_acct_site_id;

Line 520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

516: x_msg_data => l_msg_data,
517: x_loc_id => l_loc_id
518: );
519:
520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
521: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
522: RAISE FND_API.G_EXC_ERROR;
523: ELSE
524: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 521: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

517: x_loc_id => l_loc_id
518: );
519:
520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
521: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
522: RAISE FND_API.G_EXC_ERROR;
523: ELSE
524: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
525: END IF;

Line 522: RAISE FND_API.G_EXC_ERROR;

518: );
519:
520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
521: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
522: RAISE FND_API.G_EXC_ERROR;
523: ELSE
524: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
525: END IF;
526: END IF;

Line 524: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
521: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
522: RAISE FND_API.G_EXC_ERROR;
523: ELSE
524: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
525: END IF;
526: END IF;
527:
528: -- Debug info.

Line 599: * be FND_API.G_RET_STS_SUCCESS (success),

595: * IN/OUT:
596: * p_cust_acct_site_rec Customer account site record.
597: * p_object_version_number Used for locking the being updated record.
598: * x_return_status Return status after the call. The status can
599: * be FND_API.G_RET_STS_SUCCESS (success),
600: * FND_API.G_RET_STS_ERROR (error),
601: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
602: *
603: * NOTES

Line 600: * FND_API.G_RET_STS_ERROR (error),

596: * p_cust_acct_site_rec Customer account site record.
597: * p_object_version_number Used for locking the being updated record.
598: * x_return_status Return status after the call. The status can
599: * be FND_API.G_RET_STS_SUCCESS (success),
600: * FND_API.G_RET_STS_ERROR (error),
601: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
602: *
603: * NOTES
604: *

Line 601: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

597: * p_object_version_number Used for locking the being updated record.
598: * x_return_status Return status after the call. The status can
599: * be FND_API.G_RET_STS_SUCCESS (success),
600: * FND_API.G_RET_STS_ERROR (error),
601: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
602: *
603: * NOTES
604: *
605: * MODIFICATION HISTORY

Line 685: RAISE FND_API.G_EXC_ERROR;

681: THEN
682: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_RECORD_CHANGED' );
683: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_cust_acct_sites' );
684: FND_MSG_PUB.ADD;
685: RAISE FND_API.G_EXC_ERROR;
686: END IF;
687:
688: p_object_version_number := NVL( l_object_version_number, 1 ) + 1;
689:

Line 697: RAISE FND_API.G_EXC_ERROR;

693: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account site' );
694: FND_MESSAGE.SET_TOKEN( 'VALUE',
695: NVL( TO_CHAR( p_cust_acct_site_rec.cust_acct_site_id ), 'null' ) );
696: FND_MSG_PUB.ADD;
697: RAISE FND_API.G_EXC_ERROR;
698: END;
699:
700:
701:

Line 709: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

705: p_cust_acct_site_rec => p_cust_acct_site_rec,
706: p_rowid => l_rowid,
707: x_return_status => x_return_status );
708:
709: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
710: RAISE FND_API.G_EXC_ERROR;
711: END IF;
712:
713: if (p_cust_acct_site_rec.orig_system is not null

Line 710: RAISE FND_API.G_EXC_ERROR;

706: p_rowid => l_rowid,
707: x_return_status => x_return_status );
708:
709: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
710: RAISE FND_API.G_EXC_ERROR;
711: END IF;
712:
713: if (p_cust_acct_site_rec.orig_system is not null
714: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)

Line 714: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)

710: RAISE FND_API.G_EXC_ERROR;
711: END IF;
712:
713: if (p_cust_acct_site_rec.orig_system is not null
714: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
715: and (p_cust_acct_site_rec.orig_system_reference is not null
716: and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
717: then
718: p_cust_acct_site_rec.orig_system_reference := null;

Line 716: and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)

712:
713: if (p_cust_acct_site_rec.orig_system is not null
714: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
715: and (p_cust_acct_site_rec.orig_system_reference is not null
716: and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
717: then
718: p_cust_acct_site_rec.orig_system_reference := null;
719: -- In mosr, we have bypassed osr nonupdateable validation
720: -- but we should not update existing osr, set it to null

Line 742: RAISE FND_API.G_EXC_ERROR;

738: FND_MESSAGE.SET_NAME('AR', 'HZ_API_NO_RECORD');
739: FND_MESSAGE.SET_TOKEN('RECORD', 'Message Name');
740: FND_MESSAGE.SET_TOKEN('VALUE', 'HZ_INACTIVATE_ACCOUNT_SITE_UI');
741: FND_MSG_PUB.ADD;
742: RAISE FND_API.G_EXC_ERROR;
743: END;
744: END IF;
745: IF g_message_name IS NOT NULL THEN
746: -- Code modified for Bug 3714636 ends here

Line 762: RAISE FND_API.G_EXC_ERROR;

758: FND_MESSAGE.SET_TOKEN( 'RECORD', 'party site' );
759: FND_MESSAGE.SET_TOKEN( 'VALUE',
760: NVL( TO_CHAR( p_cust_acct_site_rec.party_site_id ), 'null' ) );
761: FND_MSG_PUB.ADD;
762: RAISE FND_API.G_EXC_ERROR;
763: END;
764: l_party_site_rec.party_site_id := l_party_site_id;
765: l_party_site_rec.status := p_cust_acct_site_rec.status;
766:

Line 775: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

771: x_return_status => x_return_status,
772: x_msg_count => l_msg_count,
773: x_msg_data => l_msg_data) ;
774:
775: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
776: RAISE FND_API.G_EXC_ERROR;
777: END IF;
778:
779: END IF; -- End of account site status check

Line 776: RAISE FND_API.G_EXC_ERROR;

772: x_msg_count => l_msg_count,
773: x_msg_data => l_msg_data) ;
774:
775: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
776: RAISE FND_API.G_EXC_ERROR;
777: END IF;
778:
779: END IF; -- End of account site status check
780: END IF;

Line 873: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

869: x_msg_data => l_msg_data,
870: x_loc_id => l_loc_id
871: );
872:
873: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
874: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
875: RAISE FND_API.G_EXC_ERROR;
876: ELSE
877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 874: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

870: x_loc_id => l_loc_id
871: );
872:
873: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
874: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
875: RAISE FND_API.G_EXC_ERROR;
876: ELSE
877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
878: END IF;

Line 875: RAISE FND_API.G_EXC_ERROR;

871: );
872:
873: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
874: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
875: RAISE FND_API.G_EXC_ERROR;
876: ELSE
877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
878: END IF;
879: END IF;

Line 877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

873: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
874: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
875: RAISE FND_API.G_EXC_ERROR;
876: ELSE
877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
878: END IF;
879: END IF;
880:
881: -- Debug info.

Line 909: * p_create_profile If it is set to FND_API.G_TRUE, API create customer

905: * HZ_CUST_SITE_USES_PKG.Insert_Row
906: *
907: * ARGUMENTS
908: * IN:
909: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
910: * profile based on the customer profile record passed
911: * in.
912: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
913: * profile amounts by copying corresponding data

Line 912: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer

908: * IN:
909: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
910: * profile based on the customer profile record passed
911: * in.
912: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
913: * profile amounts by copying corresponding data
914: * from customer profile class amounts.
915: * IN/OUT:
916: * p_cust_site_use_rec Customer account site use record.

Line 920: * be FND_API.G_RET_STS_SUCCESS (success),

916: * p_cust_site_use_rec Customer account site use record.
917: * p_customer_profile_rec Customer profile record. One customer account
918: * must have a customer profile.
919: * x_return_status Return status after the call. The status can
920: * be FND_API.G_RET_STS_SUCCESS (success),
921: * FND_API.G_RET_STS_ERROR (error),
922: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
923: * OUT:
924: * x_site_use_id Customer account site use ID.

Line 921: * FND_API.G_RET_STS_ERROR (error),

917: * p_customer_profile_rec Customer profile record. One customer account
918: * must have a customer profile.
919: * x_return_status Return status after the call. The status can
920: * be FND_API.G_RET_STS_SUCCESS (success),
921: * FND_API.G_RET_STS_ERROR (error),
922: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
923: * OUT:
924: * x_site_use_id Customer account site use ID.
925: *

Line 922: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

918: * must have a customer profile.
919: * x_return_status Return status after the call. The status can
920: * be FND_API.G_RET_STS_SUCCESS (success),
921: * FND_API.G_RET_STS_ERROR (error),
922: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
923: * OUT:
924: * x_site_use_id Customer account site use ID.
925: *
926: * NOTES

Line 942: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,

938:
939: PROCEDURE do_create_cust_site_use (
940: p_cust_site_use_rec IN OUT NOCOPY CUST_SITE_USE_REC_TYPE,
941: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
942: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
943: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
944: x_site_use_id OUT NOCOPY NUMBER,
945: x_return_status IN OUT NOCOPY VARCHAR2
946: ) IS

Line 943: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

939: PROCEDURE do_create_cust_site_use (
940: p_cust_site_use_rec IN OUT NOCOPY CUST_SITE_USE_REC_TYPE,
941: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
942: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
943: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
944: x_site_use_id OUT NOCOPY NUMBER,
945: x_return_status IN OUT NOCOPY VARCHAR2
946: ) IS
947:

Line 980: p_cust_site_use_rec.org_id = fnd_api.g_miss_num) then

976: END IF;
977:
978: /* 3456489 Added for Shared Service Uptake */
979: IF (p_cust_site_use_rec.org_id is NULL or
980: p_cust_site_use_rec.org_id = fnd_api.g_miss_num) then
981: BEGIN
982: SELECT org_id
983: INTO p_cust_site_use_rec.org_id
984: FROM HZ_CUST_ACCT_SITES_ALL

Line 995: RAISE FND_API.G_EXC_ERROR;

991: FND_MESSAGE.SET_TOKEN( 'VALUE',
992: NVL( TO_CHAR(
993: p_cust_site_use_rec.cust_acct_site_id ), 'null' ) );
994: FND_MSG_PUB.ADD;
995: RAISE FND_API.G_EXC_ERROR;
996: END;
997: END IF;
998:
999: BEGIN

Line 1004: RAISE FND_API.G_EXC_ERROR;

1000: MO_GLOBAL.validate_orgid_pub_api(p_cust_site_use_rec.org_id,'N',l_return_status);
1001: EXCEPTION
1002: WHEN OTHERS
1003: THEN
1004: RAISE FND_API.G_EXC_ERROR;
1005: END;
1006:
1007:
1008: -- Validate site use record.

Line 1015: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1011: p_cust_site_use_rec => p_cust_site_use_rec,
1012: p_rowid => NULL,
1013: x_return_status => x_return_status );
1014:
1015: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1016: RAISE FND_API.G_EXC_ERROR;
1017: END IF;
1018:
1019: -- Create party site use of same type if one does not exist.

Line 1016: RAISE FND_API.G_EXC_ERROR;

1012: p_rowid => NULL,
1013: x_return_status => x_return_status );
1014:
1015: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1016: RAISE FND_API.G_EXC_ERROR;
1017: END IF;
1018:
1019: -- Create party site use of same type if one does not exist.
1020:

Line 1038: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1034: p_msg_level=>fnd_log.level_statement);
1035: END IF;
1036:
1037: -- site_use_code is not in a valid site_use_code in party level.
1038: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1039: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1040: x_return_status := FND_API.G_RET_STS_SUCCESS;
1041: ELSE
1042: -- Create party site use

Line 1040: x_return_status := FND_API.G_RET_STS_SUCCESS;

1036:
1037: -- site_use_code is not in a valid site_use_code in party level.
1038: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1039: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1040: x_return_status := FND_API.G_RET_STS_SUCCESS;
1041: ELSE
1042: -- Create party site use
1043: SELECT PARTY_SITE_ID INTO l_party_site_id
1044: FROM HZ_CUST_ACCT_SITES_ALL -- Bug 3456489

Line 1067: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1063: x_msg_count => l_msg_count,
1064: x_msg_data => l_msg_data,
1065: x_party_site_use_id => l_party_site_use_id );
1066:
1067: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1068: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1069: RAISE FND_API.G_EXC_ERROR;
1070: ELSE
1071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1068: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1064: x_msg_data => l_msg_data,
1065: x_party_site_use_id => l_party_site_use_id );
1066:
1067: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1068: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1069: RAISE FND_API.G_EXC_ERROR;
1070: ELSE
1071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1072: END IF;

Line 1069: RAISE FND_API.G_EXC_ERROR;

1065: x_party_site_use_id => l_party_site_use_id );
1066:
1067: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1068: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1069: RAISE FND_API.G_EXC_ERROR;
1070: ELSE
1071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1072: END IF;
1073: END IF;

Line 1071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1067: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1068: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1069: RAISE FND_API.G_EXC_ERROR;
1070: ELSE
1071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1072: END IF;
1073: END IF;
1074: END;
1075: END IF;

Line 1090: p_cust_site_use_rec.status = fnd_api.g_miss_char OR

1086: -- combination is to be set to primary, and when a new record is entered with
1087: -- this combination with the primary flag set, then the first one must be unset.
1088:
1089: IF p_cust_site_use_rec.status IS NULL OR
1090: p_cust_site_use_rec.status = fnd_api.g_miss_char OR
1091: p_cust_site_use_rec.status = 'A'
1092: THEN
1093: IF p_cust_site_use_rec.primary_flag = 'Y' THEN
1094: --we must unset the previous set primary_flag.

Line 1269: if (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char ) then

1265: p_msg_level=>fnd_log.level_procedure);
1266: END IF;
1267:
1268:
1269: if (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char ) then
1270: if (p_cust_site_use_rec.orig_system is null OR p_cust_site_use_rec.orig_system =fnd_api.g_miss_char) then
1271: p_cust_site_use_rec.orig_system := 'UNKNOWN';
1272: end if;
1273: end if;

Line 1270: if (p_cust_site_use_rec.orig_system is null OR p_cust_site_use_rec.orig_system =fnd_api.g_miss_char) then

1266: END IF;
1267:
1268:
1269: if (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char ) then
1270: if (p_cust_site_use_rec.orig_system is null OR p_cust_site_use_rec.orig_system =fnd_api.g_miss_char) then
1271: p_cust_site_use_rec.orig_system := 'UNKNOWN';
1272: end if;
1273: end if;
1274:

Line 1276: if (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system<>fnd_api.g_miss_char ) then

1272: end if;
1273: end if;
1274:
1275:
1276: if (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system<>fnd_api.g_miss_char ) then
1277:
1278: l_orig_sys_reference_rec.orig_system := p_cust_site_use_rec.orig_system;
1279: l_orig_sys_reference_rec.orig_system_reference := p_cust_site_use_rec.orig_system_reference;
1280: l_orig_sys_reference_rec.owner_table_name := 'HZ_CUST_SITE_USES_ALL';

Line 1284: FND_API.G_FALSE,

1280: l_orig_sys_reference_rec.owner_table_name := 'HZ_CUST_SITE_USES_ALL';
1281: l_orig_sys_reference_rec.owner_table_id := p_cust_site_use_rec.site_use_id;
1282: l_orig_sys_reference_rec.created_by_module := p_cust_site_use_rec.created_by_module;
1283: hz_orig_system_ref_pub.create_orig_system_reference(
1284: FND_API.G_FALSE,
1285: l_orig_sys_reference_rec,
1286: x_return_status,
1287: l_msg_count,
1288: l_msg_data);

Line 1289: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1285: l_orig_sys_reference_rec,
1286: x_return_status,
1287: l_msg_count,
1288: l_msg_data);
1289: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1290: RAISE FND_API.G_EXC_ERROR;
1291: END IF;
1292:
1293: end if;

Line 1290: RAISE FND_API.G_EXC_ERROR;

1286: x_return_status,
1287: l_msg_count,
1288: l_msg_data);
1289: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1290: RAISE FND_API.G_EXC_ERROR;
1291: END IF;
1292:
1293: end if;
1294:

Line 1301: p_cust_site_use_rec.status = FND_API.G_MISS_CHAR

1297:
1298: IF p_cust_site_use_rec.site_use_code IN ('BILL_TO', 'SHIP_TO', 'MARKET' ) THEN
1299: IF p_cust_site_use_rec.status = 'A' OR
1300: p_cust_site_use_rec.status IS NULL OR
1301: p_cust_site_use_rec.status = FND_API.G_MISS_CHAR
1302: THEN
1303: IF p_cust_site_use_rec.primary_flag = 'Y' THEN
1304: l_flag := 'P';
1305: ELSE

Line 1319: IF p_create_profile = FND_API.G_TRUE THEN

1315: l_flag );
1316:
1317: END IF;
1318:
1319: IF p_create_profile = FND_API.G_TRUE THEN
1320:
1321: -- Create the profile for the site use
1322:
1323: p_customer_profile_rec.site_use_id := p_cust_site_use_rec.site_use_id;

Line 1339: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1335: x_msg_count => l_msg_count,
1336: x_msg_data => l_msg_data,
1337: x_cust_account_profile_id => l_cust_account_profile_id );
1338:
1339: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1340: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1341: RAISE FND_API.G_EXC_ERROR;
1342: ELSE
1343: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1340: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1336: x_msg_data => l_msg_data,
1337: x_cust_account_profile_id => l_cust_account_profile_id );
1338:
1339: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1340: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1341: RAISE FND_API.G_EXC_ERROR;
1342: ELSE
1343: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1344: END IF;

Line 1341: RAISE FND_API.G_EXC_ERROR;

1337: x_cust_account_profile_id => l_cust_account_profile_id );
1338:
1339: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1340: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1341: RAISE FND_API.G_EXC_ERROR;
1342: ELSE
1343: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1344: END IF;
1345: END IF;

Line 1343: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1339: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1340: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1341: RAISE FND_API.G_EXC_ERROR;
1342: ELSE
1343: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1344: END IF;
1345: END IF;
1346:
1347: END IF;

Line 1376: * be FND_API.G_RET_STS_SUCCESS (success),

1372: * IN/OUT:
1373: * p_cust_site_use_rec Customer account site use record.
1374: * p_object_version_number Used for locking the being updated record.
1375: * x_return_status Return status after the call. The status can
1376: * be FND_API.G_RET_STS_SUCCESS (success),
1377: * FND_API.G_RET_STS_ERROR (error),
1378: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1379: *
1380: * NOTES

Line 1377: * FND_API.G_RET_STS_ERROR (error),

1373: * p_cust_site_use_rec Customer account site use record.
1374: * p_object_version_number Used for locking the being updated record.
1375: * x_return_status Return status after the call. The status can
1376: * be FND_API.G_RET_STS_SUCCESS (success),
1377: * FND_API.G_RET_STS_ERROR (error),
1378: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1379: *
1380: * NOTES
1381: *

Line 1378: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

1374: * p_object_version_number Used for locking the being updated record.
1375: * x_return_status Return status after the call. The status can
1376: * be FND_API.G_RET_STS_SUCCESS (success),
1377: * FND_API.G_RET_STS_ERROR (error),
1378: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1379: *
1380: * NOTES
1381: *
1382: * MODIFICATION HISTORY

Line 1465: RAISE FND_API.G_EXC_ERROR;

1461: THEN
1462: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_RECORD_CHANGED' );
1463: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_cust_site_uses' );
1464: FND_MSG_PUB.ADD;
1465: RAISE FND_API.G_EXC_ERROR;
1466: END IF;
1467:
1468: p_object_version_number := NVL( l_object_version_number, 1 ) + 1;
1469:

Line 1477: RAISE FND_API.G_EXC_ERROR;

1473: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer site use' );
1474: FND_MESSAGE.SET_TOKEN( 'VALUE',
1475: NVL( TO_CHAR( p_cust_site_use_rec.site_use_id ), 'null' ) );
1476: FND_MSG_PUB.ADD;
1477: RAISE FND_API.G_EXC_ERROR;
1478: END;
1479:
1480: -- Validate cust site use record
1481: HZ_ACCOUNT_VALIDATE_V2PUB.validate_cust_site_use (

Line 1487: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1483: p_cust_site_use_rec => p_cust_site_use_rec,
1484: p_rowid => l_rowid,
1485: x_return_status => x_return_status );
1486:
1487: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1488: RAISE FND_API.G_EXC_ERROR;
1489: END IF;
1490:
1491: ---Create party site use of same type if one does not exist.

Line 1488: RAISE FND_API.G_EXC_ERROR;

1484: p_rowid => l_rowid,
1485: x_return_status => x_return_status );
1486:
1487: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1488: RAISE FND_API.G_EXC_ERROR;
1489: END IF;
1490:
1491: ---Create party site use of same type if one does not exist.
1492: --Bug No. 5036975

Line 1510: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1506: p_msg_level=>fnd_log.level_statement);
1507: END IF;
1508:
1509: -- site_use_code is not in a valid site_use_code in party level.
1510: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1511: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1512: x_return_status := FND_API.G_RET_STS_SUCCESS;
1513: ELSE
1514: -- Create party site use

Line 1512: x_return_status := FND_API.G_RET_STS_SUCCESS;

1508:
1509: -- site_use_code is not in a valid site_use_code in party level.
1510: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1511: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1512: x_return_status := FND_API.G_RET_STS_SUCCESS;
1513: ELSE
1514: -- Create party site use
1515:
1516: SELECT PARTY_SITE_ID INTO l_party_site_id

Line 1541: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1537: x_msg_count => l_msg_count,
1538: x_msg_data => l_msg_data,
1539: x_party_site_use_id => l_party_site_use_id );
1540:
1541: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1542: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1543: RAISE FND_API.G_EXC_ERROR;
1544: ELSE
1545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1542: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1538: x_msg_data => l_msg_data,
1539: x_party_site_use_id => l_party_site_use_id );
1540:
1541: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1542: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1543: RAISE FND_API.G_EXC_ERROR;
1544: ELSE
1545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1546: END IF;

Line 1543: RAISE FND_API.G_EXC_ERROR;

1539: x_party_site_use_id => l_party_site_use_id );
1540:
1541: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1542: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1543: RAISE FND_API.G_EXC_ERROR;
1544: ELSE
1545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1546: END IF;
1547: END IF;

Line 1545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1541: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1542: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1543: RAISE FND_API.G_EXC_ERROR;
1544: ELSE
1545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1546: END IF;
1547: END IF;
1548: END;
1549: END IF;

Line 1561: and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)

1557: END IF;
1558: --Bug Fix:5036975
1559:
1560: if (p_cust_site_use_rec.orig_system is not null
1561: and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
1562: and (p_cust_site_use_rec.orig_system_reference is not null
1563: and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
1564: then
1565: p_cust_site_use_rec.orig_system_reference := null;

Line 1563: and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)

1559:
1560: if (p_cust_site_use_rec.orig_system is not null
1561: and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
1562: and (p_cust_site_use_rec.orig_system_reference is not null
1563: and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
1564: then
1565: p_cust_site_use_rec.orig_system_reference := null;
1566: -- In mosr, we have bypassed osr nonupdateable validation
1567: -- but we should not update existing osr, set it to null

Line 1583: p_cust_site_use_rec.primary_flag = fnd_api.g_miss_char

1579: -- During modification of the primary_flag, if we are setting the primary flag
1580: -- of a particular combination of org and cust_account as primary then the already
1581: -- existing such combination would be unset if already primary.
1582: IF p_cust_site_use_rec.primary_flag = 'N' OR
1583: p_cust_site_use_rec.primary_flag = fnd_api.g_miss_char
1584: THEN
1585: p_cust_site_use_rec.primary_flag := NULL;
1586: END IF;
1587:

Line 1978: * FND_API.G_TRUE. Default is FND_API.G_FALSE.

1974: *
1975: * ARGUMENTS
1976: * IN:
1977: * p_init_msg_list Initialize message stack if it is set to
1978: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
1979: * p_cust_acct_site_rec Customer account site record.
1980: * IN/OUT:
1981: * OUT:
1982: * x_cust_acct_site_id Customer account site ID.

Line 1984: * be FND_API.G_RET_STS_SUCCESS (success),

1980: * IN/OUT:
1981: * OUT:
1982: * x_cust_acct_site_id Customer account site ID.
1983: * x_return_status Return status after the call. The status can
1984: * be FND_API.G_RET_STS_SUCCESS (success),
1985: * FND_API.G_RET_STS_ERROR (error),
1986: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1987: * x_msg_count Number of messages in message stack.
1988: * x_msg_data Message text if x_msg_count is 1.

Line 1985: * FND_API.G_RET_STS_ERROR (error),

1981: * OUT:
1982: * x_cust_acct_site_id Customer account site ID.
1983: * x_return_status Return status after the call. The status can
1984: * be FND_API.G_RET_STS_SUCCESS (success),
1985: * FND_API.G_RET_STS_ERROR (error),
1986: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1987: * x_msg_count Number of messages in message stack.
1988: * x_msg_data Message text if x_msg_count is 1.
1989: *

Line 1986: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

1982: * x_cust_acct_site_id Customer account site ID.
1983: * x_return_status Return status after the call. The status can
1984: * be FND_API.G_RET_STS_SUCCESS (success),
1985: * FND_API.G_RET_STS_ERROR (error),
1986: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1987: * x_msg_count Number of messages in message stack.
1988: * x_msg_data Message text if x_msg_count is 1.
1989: *
1990: * NOTES

Line 1999: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1995: *
1996: */
1997:
1998: PROCEDURE create_cust_acct_site (
1999: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2000: p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE,
2001: x_cust_acct_site_id OUT NOCOPY NUMBER,
2002: x_return_status OUT NOCOPY VARCHAR2,
2003: x_msg_count OUT NOCOPY NUMBER,

Line 2026: IF FND_API.to_Boolean(p_init_msg_list) THEN

2022: p_msg_level=>fnd_log.level_procedure);
2023: END IF;
2024:
2025: -- Initialize message list if p_init_msg_list is set to TRUE.
2026: IF FND_API.to_Boolean(p_init_msg_list) THEN
2027: FND_MSG_PUB.initialize;
2028: END IF;
2029:
2030: -- Initialize API return status to success.

Line 2031: x_return_status := FND_API.G_RET_STS_SUCCESS;

2027: FND_MSG_PUB.initialize;
2028: END IF;
2029:
2030: -- Initialize API return status to success.
2031: x_return_status := FND_API.G_RET_STS_SUCCESS;
2032:
2033: -- report error on obsolete columns based on profile
2034: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN
2035: check_obsolete_columns (

Line 2041: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2037: p_account_site_rec => l_cust_acct_site_rec,
2038: x_return_status => x_return_status
2039: );
2040:
2041: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2042: RAISE FND_API.G_EXC_ERROR;
2043: END IF;
2044: END IF;
2045:

Line 2042: RAISE FND_API.G_EXC_ERROR;

2038: x_return_status => x_return_status
2039: );
2040:
2041: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2042: RAISE FND_API.G_EXC_ERROR;
2043: END IF;
2044: END IF;
2045:
2046: -- Call to business logic.

Line 2052: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2048: l_cust_acct_site_rec,
2049: x_cust_acct_site_id,
2050: x_return_status );
2051:
2052: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2053: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2054: -- Invoke business event system.
2055: HZ_BUSINESS_EVENT_V2PVT.create_cust_acct_site_event (
2056: l_cust_acct_site_rec );

Line 2069: p_encoded => FND_API.G_FALSE,

2065: END IF;
2066:
2067: -- Standard call to get message count and if count is 1, get message info.
2068: FND_MSG_PUB.Count_And_Get(
2069: p_encoded => FND_API.G_FALSE,
2070: p_count => x_msg_count,
2071: p_data => x_msg_data );
2072:
2073: -- Debug info.

Line 2090: WHEN FND_API.G_EXC_ERROR THEN

2086: -- Check if API is called in debug mode. If yes, disable debug.
2087: --disable_debug;
2088:
2089: EXCEPTION
2090: WHEN FND_API.G_EXC_ERROR THEN
2091: ROLLBACK TO create_cust_acct_site;
2092: x_return_status := FND_API.G_RET_STS_ERROR;
2093:
2094: FND_MSG_PUB.Count_And_Get(

Line 2092: x_return_status := FND_API.G_RET_STS_ERROR;

2088:
2089: EXCEPTION
2090: WHEN FND_API.G_EXC_ERROR THEN
2091: ROLLBACK TO create_cust_acct_site;
2092: x_return_status := FND_API.G_RET_STS_ERROR;
2093:
2094: FND_MSG_PUB.Count_And_Get(
2095: p_encoded => FND_API.G_FALSE,
2096: p_count => x_msg_count,

Line 2095: p_encoded => FND_API.G_FALSE,

2091: ROLLBACK TO create_cust_acct_site;
2092: x_return_status := FND_API.G_RET_STS_ERROR;
2093:
2094: FND_MSG_PUB.Count_And_Get(
2095: p_encoded => FND_API.G_FALSE,
2096: p_count => x_msg_count,
2097: p_data => x_msg_data );
2098:
2099: -- Debug info.

Line 2115: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2111:
2112: -- Check if API is called in debug mode. If yes, disable debug.
2113: --disable_debug;
2114:
2115: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2116: ROLLBACK TO create_cust_acct_site;
2117: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2118:
2119: FND_MSG_PUB.Count_And_Get(

Line 2117: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2113: --disable_debug;
2114:
2115: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2116: ROLLBACK TO create_cust_acct_site;
2117: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2118:
2119: FND_MSG_PUB.Count_And_Get(
2120: p_encoded => FND_API.G_FALSE,
2121: p_count => x_msg_count,

Line 2120: p_encoded => FND_API.G_FALSE,

2116: ROLLBACK TO create_cust_acct_site;
2117: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2118:
2119: FND_MSG_PUB.Count_And_Get(
2120: p_encoded => FND_API.G_FALSE,
2121: p_count => x_msg_count,
2122: p_data => x_msg_data );
2123:
2124: -- Debug info.

Line 2142: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2138: --disable_debug;
2139:
2140: WHEN OTHERS THEN
2141: ROLLBACK TO create_cust_acct_site;
2142: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2143:
2144: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2145: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2146: FND_MSG_PUB.ADD;

Line 2149: p_encoded => FND_API.G_FALSE,

2145: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2146: FND_MSG_PUB.ADD;
2147:
2148: FND_MSG_PUB.Count_And_Get(
2149: p_encoded => FND_API.G_FALSE,
2150: p_count => x_msg_count,
2151: p_data => x_msg_data );
2152:
2153: -- Debug info.

Line 2183: * FND_API.G_TRUE. Default is FND_API.G_FALSE.

2179: *
2180: * ARGUMENTS
2181: * IN:
2182: * p_init_msg_list Initialize message stack if it is set to
2183: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2184: * p_cust_acct_site_rec Customer account site record.
2185: * IN/OUT:
2186: * p_object_version_number Used for locking the being updated record.
2187: * OUT:

Line 2189: * be FND_API.G_RET_STS_SUCCESS (success),

2185: * IN/OUT:
2186: * p_object_version_number Used for locking the being updated record.
2187: * OUT:
2188: * x_return_status Return status after the call. The status can
2189: * be FND_API.G_RET_STS_SUCCESS (success),
2190: * FND_API.G_RET_STS_ERROR (error),
2191: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2192: * x_msg_count Number of messages in message stack.
2193: * x_msg_data Message text if x_msg_count is 1.

Line 2190: * FND_API.G_RET_STS_ERROR (error),

2186: * p_object_version_number Used for locking the being updated record.
2187: * OUT:
2188: * x_return_status Return status after the call. The status can
2189: * be FND_API.G_RET_STS_SUCCESS (success),
2190: * FND_API.G_RET_STS_ERROR (error),
2191: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2192: * x_msg_count Number of messages in message stack.
2193: * x_msg_data Message text if x_msg_count is 1.
2194: *

Line 2191: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

2187: * OUT:
2188: * x_return_status Return status after the call. The status can
2189: * be FND_API.G_RET_STS_SUCCESS (success),
2190: * FND_API.G_RET_STS_ERROR (error),
2191: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2192: * x_msg_count Number of messages in message stack.
2193: * x_msg_data Message text if x_msg_count is 1.
2194: *
2195: * NOTES

Line 2204: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2200: *
2201: */
2202:
2203: PROCEDURE update_cust_acct_site (
2204: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2205: p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE,
2206: p_object_version_number IN OUT NOCOPY NUMBER,
2207: x_return_status OUT NOCOPY VARCHAR2,
2208: x_msg_count OUT NOCOPY NUMBER,

Line 2232: IF FND_API.to_Boolean(p_init_msg_list) THEN

2228: p_msg_level=>fnd_log.level_procedure);
2229: END IF;
2230:
2231: -- Initialize message list if p_init_msg_list is set to TRUE.
2232: IF FND_API.to_Boolean(p_init_msg_list) THEN
2233: FND_MSG_PUB.initialize;
2234: END IF;
2235:
2236: -- Initialize API return status to success.

Line 2237: x_return_status := FND_API.G_RET_STS_SUCCESS;

2233: FND_MSG_PUB.initialize;
2234: END IF;
2235:
2236: -- Initialize API return status to success.
2237: x_return_status := FND_API.G_RET_STS_SUCCESS;
2238:
2239: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2240: and (p_cust_acct_site_rec.orig_system_reference is not null and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
2241: and (p_cust_acct_site_rec.cust_acct_site_id = FND_API.G_MISS_NUM or p_cust_acct_site_rec.cust_acct_site_id is null) THEN

Line 2239: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)

2235:
2236: -- Initialize API return status to success.
2237: x_return_status := FND_API.G_RET_STS_SUCCESS;
2238:
2239: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2240: and (p_cust_acct_site_rec.orig_system_reference is not null and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
2241: and (p_cust_acct_site_rec.cust_acct_site_id = FND_API.G_MISS_NUM or p_cust_acct_site_rec.cust_acct_site_id is null) THEN
2242:
2243: hz_orig_system_ref_pub.get_owner_table_id

Line 2240: and (p_cust_acct_site_rec.orig_system_reference is not null and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)

2236: -- Initialize API return status to success.
2237: x_return_status := FND_API.G_RET_STS_SUCCESS;
2238:
2239: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2240: and (p_cust_acct_site_rec.orig_system_reference is not null and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
2241: and (p_cust_acct_site_rec.cust_acct_site_id = FND_API.G_MISS_NUM or p_cust_acct_site_rec.cust_acct_site_id is null) THEN
2242:
2243: hz_orig_system_ref_pub.get_owner_table_id
2244: (p_orig_system => p_cust_acct_site_rec.orig_system,

Line 2241: and (p_cust_acct_site_rec.cust_acct_site_id = FND_API.G_MISS_NUM or p_cust_acct_site_rec.cust_acct_site_id is null) THEN

2237: x_return_status := FND_API.G_RET_STS_SUCCESS;
2238:
2239: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2240: and (p_cust_acct_site_rec.orig_system_reference is not null and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
2241: and (p_cust_acct_site_rec.cust_acct_site_id = FND_API.G_MISS_NUM or p_cust_acct_site_rec.cust_acct_site_id is null) THEN
2242:
2243: hz_orig_system_ref_pub.get_owner_table_id
2244: (p_orig_system => p_cust_acct_site_rec.orig_system,
2245: p_orig_system_reference => p_cust_acct_site_rec.orig_system_reference,

Line 2249: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2245: p_orig_system_reference => p_cust_acct_site_rec.orig_system_reference,
2246: p_owner_table_name => 'HZ_CUST_ACCT_SITES_ALL',
2247: x_owner_table_id => l_cust_acct_site_rec.cust_acct_site_id,
2248: x_return_status => x_return_status);
2249: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2250: RAISE FND_API.G_EXC_ERROR;
2251: END IF;
2252:
2253: END IF;

Line 2250: RAISE FND_API.G_EXC_ERROR;

2246: p_owner_table_name => 'HZ_CUST_ACCT_SITES_ALL',
2247: x_owner_table_id => l_cust_acct_site_rec.cust_acct_site_id,
2248: x_return_status => x_return_status);
2249: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2250: RAISE FND_API.G_EXC_ERROR;
2251: END IF;
2252:
2253: END IF;
2254:

Line 2264: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2260: x_return_status => x_return_status,
2261: x_msg_count => x_msg_count,
2262: x_msg_data => x_msg_data);
2263:
2264: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2265: RAISE FND_API.G_EXC_ERROR;
2266: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2268: END IF;

Line 2265: RAISE FND_API.G_EXC_ERROR;

2261: x_msg_count => x_msg_count,
2262: x_msg_data => x_msg_data);
2263:
2264: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2265: RAISE FND_API.G_EXC_ERROR;
2266: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2268: END IF;
2269:

Line 2266: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2262: x_msg_data => x_msg_data);
2263:
2264: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2265: RAISE FND_API.G_EXC_ERROR;
2266: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2268: END IF;
2269:
2270: -- report error on obsolete columns based on profile

Line 2267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2263:
2264: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2265: RAISE FND_API.G_EXC_ERROR;
2266: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2267: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2268: END IF;
2269:
2270: -- report error on obsolete columns based on profile
2271: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN

Line 2279: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2275: p_old_account_site_rec => l_old_cust_acct_site_rec,
2276: x_return_status => x_return_status
2277: );
2278:
2279: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2280: RAISE FND_API.G_EXC_ERROR;
2281: END IF;
2282: END IF;
2283:

Line 2280: RAISE FND_API.G_EXC_ERROR;

2276: x_return_status => x_return_status
2277: );
2278:
2279: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2280: RAISE FND_API.G_EXC_ERROR;
2281: END IF;
2282: END IF;
2283:
2284: -- Call to business logic.

Line 2290: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2286: l_cust_acct_site_rec,
2287: p_object_version_number,
2288: x_return_status );
2289:
2290: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2291: l_old_cust_acct_site_rec.orig_system := l_cust_acct_site_rec.orig_system;
2292: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2293: -- Invoke business event system.
2294: HZ_BUSINESS_EVENT_V2PVT.update_cust_acct_site_event (

Line 2308: p_encoded => FND_API.G_FALSE,

2304: END IF;
2305:
2306: -- Standard call to get message count and if count is 1, get message info.
2307: FND_MSG_PUB.Count_And_Get(
2308: p_encoded => FND_API.G_FALSE,
2309: p_count => x_msg_count,
2310: p_data => x_msg_data );
2311:
2312: -- Debug info.

Line 2329: WHEN FND_API.G_EXC_ERROR THEN

2325: -- Check if API is called in debug mode. If yes, disable debug.
2326: --disable_debug;
2327:
2328: EXCEPTION
2329: WHEN FND_API.G_EXC_ERROR THEN
2330: ROLLBACK TO update_cust_acct_site;
2331: x_return_status := FND_API.G_RET_STS_ERROR;
2332:
2333: FND_MSG_PUB.Count_And_Get(

Line 2331: x_return_status := FND_API.G_RET_STS_ERROR;

2327:
2328: EXCEPTION
2329: WHEN FND_API.G_EXC_ERROR THEN
2330: ROLLBACK TO update_cust_acct_site;
2331: x_return_status := FND_API.G_RET_STS_ERROR;
2332:
2333: FND_MSG_PUB.Count_And_Get(
2334: p_encoded => FND_API.G_FALSE,
2335: p_count => x_msg_count,

Line 2334: p_encoded => FND_API.G_FALSE,

2330: ROLLBACK TO update_cust_acct_site;
2331: x_return_status := FND_API.G_RET_STS_ERROR;
2332:
2333: FND_MSG_PUB.Count_And_Get(
2334: p_encoded => FND_API.G_FALSE,
2335: p_count => x_msg_count,
2336: p_data => x_msg_data );
2337:
2338: -- Debug info.

Line 2354: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2350:
2351: -- Check if API is called in debug mode. If yes, disable debug.
2352: --disable_debug;
2353:
2354: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2355: ROLLBACK TO update_cust_acct_site;
2356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2357:
2358: FND_MSG_PUB.Count_And_Get(

Line 2356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2352: --disable_debug;
2353:
2354: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2355: ROLLBACK TO update_cust_acct_site;
2356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2357:
2358: FND_MSG_PUB.Count_And_Get(
2359: p_encoded => FND_API.G_FALSE,
2360: p_count => x_msg_count,

Line 2359: p_encoded => FND_API.G_FALSE,

2355: ROLLBACK TO update_cust_acct_site;
2356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2357:
2358: FND_MSG_PUB.Count_And_Get(
2359: p_encoded => FND_API.G_FALSE,
2360: p_count => x_msg_count,
2361: p_data => x_msg_data );
2362:
2363: -- Debug info.

Line 2381: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2377: --disable_debug;
2378:
2379: WHEN OTHERS THEN
2380: ROLLBACK TO update_cust_acct_site;
2381: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2382:
2383: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2384: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2385: FND_MSG_PUB.ADD;

Line 2388: p_encoded => FND_API.G_FALSE,

2384: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2385: FND_MSG_PUB.ADD;
2386:
2387: FND_MSG_PUB.Count_And_Get(
2388: p_encoded => FND_API.G_FALSE,
2389: p_count => x_msg_count,
2390: p_data => x_msg_data );
2391:
2392: -- Debug info.

Line 2422: * FND_API.G_TRUE. Default is FND_API.G_FALSE.

2418: *
2419: * ARGUMENTS
2420: * IN:
2421: * p_init_msg_list Initialize message stack if it is set to
2422: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2423: * p_cust_acct_site_id Customer account site id.
2424: * IN/OUT:
2425: * OUT:
2426: * x_cust_acct_site_rec Returned customer account site record.

Line 2428: * be FND_API.G_RET_STS_SUCCESS (success),

2424: * IN/OUT:
2425: * OUT:
2426: * x_cust_acct_site_rec Returned customer account site record.
2427: * x_return_status Return status after the call. The status can
2428: * be FND_API.G_RET_STS_SUCCESS (success),
2429: * FND_API.G_RET_STS_ERROR (error),
2430: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2431: * x_msg_count Number of messages in message stack.
2432: * x_msg_data Message text if x_msg_count is 1.

Line 2429: * FND_API.G_RET_STS_ERROR (error),

2425: * OUT:
2426: * x_cust_acct_site_rec Returned customer account site record.
2427: * x_return_status Return status after the call. The status can
2428: * be FND_API.G_RET_STS_SUCCESS (success),
2429: * FND_API.G_RET_STS_ERROR (error),
2430: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2431: * x_msg_count Number of messages in message stack.
2432: * x_msg_data Message text if x_msg_count is 1.
2433: *

Line 2430: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

2426: * x_cust_acct_site_rec Returned customer account site record.
2427: * x_return_status Return status after the call. The status can
2428: * be FND_API.G_RET_STS_SUCCESS (success),
2429: * FND_API.G_RET_STS_ERROR (error),
2430: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2431: * x_msg_count Number of messages in message stack.
2432: * x_msg_data Message text if x_msg_count is 1.
2433: *
2434: * NOTES

Line 2443: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2439: *
2440: */
2441:
2442: PROCEDURE get_cust_acct_site_rec (
2443: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2444: p_cust_acct_site_id IN NUMBER,
2445: x_cust_acct_site_rec OUT NOCOPY CUST_ACCT_SITE_REC_TYPE,
2446: x_return_status OUT NOCOPY VARCHAR2,
2447: x_msg_count OUT NOCOPY NUMBER,

Line 2464: IF FND_API.to_Boolean(p_init_msg_list) THEN

2460: p_msg_level=>fnd_log.level_procedure);
2461: END IF;
2462:
2463: -- Initialize message list if p_init_msg_list is set to TRUE.
2464: IF FND_API.to_Boolean(p_init_msg_list) THEN
2465: FND_MSG_PUB.initialize;
2466: END IF;
2467:
2468: -- Initialize API return status to success.

Line 2469: x_return_status := FND_API.G_RET_STS_SUCCESS;

2465: FND_MSG_PUB.initialize;
2466: END IF;
2467:
2468: -- Initialize API return status to success.
2469: x_return_status := FND_API.G_RET_STS_SUCCESS;
2470:
2471: -- Check whether primary key has been passed in.
2472: IF p_cust_acct_site_id IS NULL OR
2473: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN

Line 2473: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN

2469: x_return_status := FND_API.G_RET_STS_SUCCESS;
2470:
2471: -- Check whether primary key has been passed in.
2472: IF p_cust_acct_site_id IS NULL OR
2473: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN
2474: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
2475: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_acct_site_id' );
2476: FND_MSG_PUB.ADD;
2477: RAISE FND_API.G_EXC_ERROR;

Line 2477: RAISE FND_API.G_EXC_ERROR;

2473: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN
2474: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
2475: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_acct_site_id' );
2476: FND_MSG_PUB.ADD;
2477: RAISE FND_API.G_EXC_ERROR;
2478: END IF;
2479:
2480: x_cust_acct_site_rec.cust_acct_site_id := p_cust_acct_site_id;
2481:

Line 2562: p_encoded => FND_API.G_FALSE,

2558: END IF;
2559:
2560: -- Standard call to get message count and if count is 1, get message info.
2561: FND_MSG_PUB.Count_And_Get(
2562: p_encoded => FND_API.G_FALSE,
2563: p_count => x_msg_count,
2564: p_data => x_msg_data );
2565:
2566: -- Debug info.

Line 2583: WHEN FND_API.G_EXC_ERROR THEN

2579: -- Check if API is called in debug mode. If yes, disable debug.
2580: --disable_debug;
2581:
2582: EXCEPTION
2583: WHEN FND_API.G_EXC_ERROR THEN
2584: x_return_status := FND_API.G_RET_STS_ERROR;
2585:
2586: FND_MSG_PUB.Count_And_Get(
2587: p_encoded => FND_API.G_FALSE,

Line 2584: x_return_status := FND_API.G_RET_STS_ERROR;

2580: --disable_debug;
2581:
2582: EXCEPTION
2583: WHEN FND_API.G_EXC_ERROR THEN
2584: x_return_status := FND_API.G_RET_STS_ERROR;
2585:
2586: FND_MSG_PUB.Count_And_Get(
2587: p_encoded => FND_API.G_FALSE,
2588: p_count => x_msg_count,

Line 2587: p_encoded => FND_API.G_FALSE,

2583: WHEN FND_API.G_EXC_ERROR THEN
2584: x_return_status := FND_API.G_RET_STS_ERROR;
2585:
2586: FND_MSG_PUB.Count_And_Get(
2587: p_encoded => FND_API.G_FALSE,
2588: p_count => x_msg_count,
2589: p_data => x_msg_data );
2590:
2591: -- Debug info.

Line 2607: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2603:
2604: -- Check if API is called in debug mode. If yes, disable debug.
2605: --disable_debug;
2606:
2607: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2608: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2609:
2610: FND_MSG_PUB.Count_And_Get(
2611: p_encoded => FND_API.G_FALSE,

Line 2608: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2604: -- Check if API is called in debug mode. If yes, disable debug.
2605: --disable_debug;
2606:
2607: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2608: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2609:
2610: FND_MSG_PUB.Count_And_Get(
2611: p_encoded => FND_API.G_FALSE,
2612: p_count => x_msg_count,

Line 2611: p_encoded => FND_API.G_FALSE,

2607: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2608: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2609:
2610: FND_MSG_PUB.Count_And_Get(
2611: p_encoded => FND_API.G_FALSE,
2612: p_count => x_msg_count,
2613: p_data => x_msg_data );
2614:
2615: -- Debug info.

Line 2632: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2628: -- Check if API is called in debug mode. If yes, disable debug.
2629: --disable_debug;
2630:
2631: WHEN OTHERS THEN
2632: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2633:
2634: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2635: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2636: FND_MSG_PUB.ADD;

Line 2639: p_encoded => FND_API.G_FALSE,

2635: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2636: FND_MSG_PUB.ADD;
2637:
2638: FND_MSG_PUB.Count_And_Get(
2639: p_encoded => FND_API.G_FALSE,
2640: p_count => x_msg_count,
2641: p_data => x_msg_data );
2642:
2643: -- Debug info.

Line 2673: * FND_API.G_TRUE. Default is FND_API.G_FALSE.

2669: *
2670: * ARGUMENTS
2671: * IN:
2672: * p_init_msg_list Initialize message stack if it is set to
2673: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2674: * p_cust_site_use_rec Customer account site use record.
2675: * p_customer_profile_rec Customer profile record. One customer account
2676: * must have a customer profile.
2677: * p_create_profile If it is set to FND_API.G_TRUE, API create customer

Line 2677: * p_create_profile If it is set to FND_API.G_TRUE, API create customer

2673: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2674: * p_cust_site_use_rec Customer account site use record.
2675: * p_customer_profile_rec Customer profile record. One customer account
2676: * must have a customer profile.
2677: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
2678: * profile based on the customer profile record passed
2679: * in.
2680: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
2681: * profile amounts by copying corresponding data

Line 2680: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer

2676: * must have a customer profile.
2677: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
2678: * profile based on the customer profile record passed
2679: * in.
2680: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
2681: * profile amounts by copying corresponding data
2682: * from customer profile class amounts.
2683: * IN/OUT:
2684: * OUT:

Line 2687: * be FND_API.G_RET_STS_SUCCESS (success),

2683: * IN/OUT:
2684: * OUT:
2685: * x_site_use_id Customer account site use ID.
2686: * x_return_status Return status after the call. The status can
2687: * be FND_API.G_RET_STS_SUCCESS (success),
2688: * FND_API.G_RET_STS_ERROR (error),
2689: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2690: * x_msg_count Number of messages in message stack.
2691: * x_msg_data Message text if x_msg_count is 1.

Line 2688: * FND_API.G_RET_STS_ERROR (error),

2684: * OUT:
2685: * x_site_use_id Customer account site use ID.
2686: * x_return_status Return status after the call. The status can
2687: * be FND_API.G_RET_STS_SUCCESS (success),
2688: * FND_API.G_RET_STS_ERROR (error),
2689: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2690: * x_msg_count Number of messages in message stack.
2691: * x_msg_data Message text if x_msg_count is 1.
2692: *

Line 2689: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

2685: * x_site_use_id Customer account site use ID.
2686: * x_return_status Return status after the call. The status can
2687: * be FND_API.G_RET_STS_SUCCESS (success),
2688: * FND_API.G_RET_STS_ERROR (error),
2689: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2690: * x_msg_count Number of messages in message stack.
2691: * x_msg_data Message text if x_msg_count is 1.
2692: *
2693: * NOTES

Line 2702: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2698: *
2699: */
2700:
2701: PROCEDURE create_cust_site_use (
2702: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2703: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2704: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2705: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
2706: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

Line 2705: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,

2701: PROCEDURE create_cust_site_use (
2702: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2703: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2704: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2705: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
2706: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
2707: x_site_use_id OUT NOCOPY NUMBER,
2708: x_return_status OUT NOCOPY VARCHAR2,
2709: x_msg_count OUT NOCOPY NUMBER,

Line 2706: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

2702: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2703: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2704: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2705: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
2706: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
2707: x_site_use_id OUT NOCOPY NUMBER,
2708: x_return_status OUT NOCOPY VARCHAR2,
2709: x_msg_count OUT NOCOPY NUMBER,
2710: x_msg_data OUT NOCOPY VARCHAR2

Line 2733: IF FND_API.to_Boolean(p_init_msg_list) THEN

2729: p_msg_level=>fnd_log.level_procedure);
2730: END IF;
2731:
2732: -- Initialize message list if p_init_msg_list is set to TRUE.
2733: IF FND_API.to_Boolean(p_init_msg_list) THEN
2734: FND_MSG_PUB.initialize;
2735: END IF;
2736:
2737: -- Initialize API return status to success.

Line 2738: x_return_status := FND_API.G_RET_STS_SUCCESS;

2734: FND_MSG_PUB.initialize;
2735: END IF;
2736:
2737: -- Initialize API return status to success.
2738: x_return_status := FND_API.G_RET_STS_SUCCESS;
2739: -- Call to business logic.
2740: do_create_cust_site_use (
2741: l_cust_site_use_rec,
2742: l_customer_profile_rec,

Line 2748: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2744: p_create_profile_amt,
2745: x_site_use_id,
2746: x_return_status );
2747:
2748: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2749: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2750: -- Invoke business event system.
2751: HZ_BUSINESS_EVENT_V2PVT.create_cust_site_use_event (
2752: l_cust_site_use_rec,

Line 2768: p_encoded => FND_API.G_FALSE,

2764: END IF;
2765:
2766: -- Standard call to get message count and if count is 1, get message info.
2767: FND_MSG_PUB.Count_And_Get(
2768: p_encoded => FND_API.G_FALSE,
2769: p_count => x_msg_count,
2770: p_data => x_msg_data );
2771:
2772: -- Debug info.

Line 2788: WHEN FND_API.G_EXC_ERROR THEN

2784: -- Check if API is called in debug mode. If yes, disable debug.
2785: --disable_debug;
2786:
2787: EXCEPTION
2788: WHEN FND_API.G_EXC_ERROR THEN
2789: ROLLBACK TO create_cust_site_use;
2790: x_return_status := FND_API.G_RET_STS_ERROR;
2791:
2792: FND_MSG_PUB.Count_And_Get(

Line 2790: x_return_status := FND_API.G_RET_STS_ERROR;

2786:
2787: EXCEPTION
2788: WHEN FND_API.G_EXC_ERROR THEN
2789: ROLLBACK TO create_cust_site_use;
2790: x_return_status := FND_API.G_RET_STS_ERROR;
2791:
2792: FND_MSG_PUB.Count_And_Get(
2793: p_encoded => FND_API.G_FALSE,
2794: p_count => x_msg_count,

Line 2793: p_encoded => FND_API.G_FALSE,

2789: ROLLBACK TO create_cust_site_use;
2790: x_return_status := FND_API.G_RET_STS_ERROR;
2791:
2792: FND_MSG_PUB.Count_And_Get(
2793: p_encoded => FND_API.G_FALSE,
2794: p_count => x_msg_count,
2795: p_data => x_msg_data );
2796:
2797: -- Debug info.

Line 2813: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2809:
2810: -- Check if API is called in debug mode. If yes, disable debug.
2811: --disable_debug;
2812:
2813: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2814: ROLLBACK TO create_cust_site_use;
2815: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2816:
2817: FND_MSG_PUB.Count_And_Get(

Line 2815: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2811: --disable_debug;
2812:
2813: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2814: ROLLBACK TO create_cust_site_use;
2815: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2816:
2817: FND_MSG_PUB.Count_And_Get(
2818: p_encoded => FND_API.G_FALSE,
2819: p_count => x_msg_count,

Line 2818: p_encoded => FND_API.G_FALSE,

2814: ROLLBACK TO create_cust_site_use;
2815: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2816:
2817: FND_MSG_PUB.Count_And_Get(
2818: p_encoded => FND_API.G_FALSE,
2819: p_count => x_msg_count,
2820: p_data => x_msg_data );
2821:
2822: -- Debug info.

Line 2840: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2836: --disable_debug;
2837:
2838: WHEN OTHERS THEN
2839: ROLLBACK TO create_cust_site_use;
2840: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2841:
2842: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2843: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2844: FND_MSG_PUB.ADD;

Line 2847: p_encoded => FND_API.G_FALSE,

2843: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2844: FND_MSG_PUB.ADD;
2845:
2846: FND_MSG_PUB.Count_And_Get(
2847: p_encoded => FND_API.G_FALSE,
2848: p_count => x_msg_count,
2849: p_data => x_msg_data );
2850:
2851: -- Debug info.

Line 2881: * FND_API.G_TRUE. Default is FND_API.G_FALSE.

2877: *
2878: * ARGUMENTS
2879: * IN:
2880: * p_init_msg_list Initialize message stack if it is set to
2881: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2882: * p_cust_site_use_rec Customer account site use record.
2883: * IN/OUT:
2884: * p_object_version_number Used for locking the being updated record.
2885: * OUT:

Line 2887: * be FND_API.G_RET_STS_SUCCESS (success),

2883: * IN/OUT:
2884: * p_object_version_number Used for locking the being updated record.
2885: * OUT:
2886: * x_return_status Return status after the call. The status can
2887: * be FND_API.G_RET_STS_SUCCESS (success),
2888: * FND_API.G_RET_STS_ERROR (error),
2889: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2890: * x_msg_count Number of messages in message stack.
2891: * x_msg_data Message text if x_msg_count is 1.

Line 2888: * FND_API.G_RET_STS_ERROR (error),

2884: * p_object_version_number Used for locking the being updated record.
2885: * OUT:
2886: * x_return_status Return status after the call. The status can
2887: * be FND_API.G_RET_STS_SUCCESS (success),
2888: * FND_API.G_RET_STS_ERROR (error),
2889: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2890: * x_msg_count Number of messages in message stack.
2891: * x_msg_data Message text if x_msg_count is 1.
2892: *

Line 2889: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

2885: * OUT:
2886: * x_return_status Return status after the call. The status can
2887: * be FND_API.G_RET_STS_SUCCESS (success),
2888: * FND_API.G_RET_STS_ERROR (error),
2889: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2890: * x_msg_count Number of messages in message stack.
2891: * x_msg_data Message text if x_msg_count is 1.
2892: *
2893: * NOTES

Line 2902: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2898: *
2899: */
2900:
2901: PROCEDURE update_cust_site_use (
2902: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2903: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2904: p_object_version_number IN OUT NOCOPY NUMBER,
2905: x_return_status OUT NOCOPY VARCHAR2,
2906: x_msg_count OUT NOCOPY NUMBER,

Line 2931: IF FND_API.to_Boolean(p_init_msg_list) THEN

2927: p_msg_level=>fnd_log.level_procedure);
2928: END IF;
2929:
2930: -- Initialize message list if p_init_msg_list is set to TRUE.
2931: IF FND_API.to_Boolean(p_init_msg_list) THEN
2932: FND_MSG_PUB.initialize;
2933: END IF;
2934:
2935: -- Initialize API return status to success.

Line 2936: x_return_status := FND_API.G_RET_STS_SUCCESS;

2932: FND_MSG_PUB.initialize;
2933: END IF;
2934:
2935: -- Initialize API return status to success.
2936: x_return_status := FND_API.G_RET_STS_SUCCESS;
2937:
2938: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
2939: and (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
2940: and (p_cust_site_use_rec.site_use_id = FND_API.G_MISS_NUM or p_cust_site_use_rec.site_use_id is null) THEN

Line 2938: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)

2934:
2935: -- Initialize API return status to success.
2936: x_return_status := FND_API.G_RET_STS_SUCCESS;
2937:
2938: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
2939: and (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
2940: and (p_cust_site_use_rec.site_use_id = FND_API.G_MISS_NUM or p_cust_site_use_rec.site_use_id is null) THEN
2941: hz_orig_system_ref_pub.get_owner_table_id
2942: (p_orig_system => p_cust_site_use_rec.orig_system,

Line 2939: and (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)

2935: -- Initialize API return status to success.
2936: x_return_status := FND_API.G_RET_STS_SUCCESS;
2937:
2938: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
2939: and (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
2940: and (p_cust_site_use_rec.site_use_id = FND_API.G_MISS_NUM or p_cust_site_use_rec.site_use_id is null) THEN
2941: hz_orig_system_ref_pub.get_owner_table_id
2942: (p_orig_system => p_cust_site_use_rec.orig_system,
2943: p_orig_system_reference => p_cust_site_use_rec.orig_system_reference,

Line 2940: and (p_cust_site_use_rec.site_use_id = FND_API.G_MISS_NUM or p_cust_site_use_rec.site_use_id is null) THEN

2936: x_return_status := FND_API.G_RET_STS_SUCCESS;
2937:
2938: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
2939: and (p_cust_site_use_rec.orig_system_reference is not null and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
2940: and (p_cust_site_use_rec.site_use_id = FND_API.G_MISS_NUM or p_cust_site_use_rec.site_use_id is null) THEN
2941: hz_orig_system_ref_pub.get_owner_table_id
2942: (p_orig_system => p_cust_site_use_rec.orig_system,
2943: p_orig_system_reference => p_cust_site_use_rec.orig_system_reference,
2944: p_owner_table_name => 'HZ_CUST_SITE_USES_ALL',

Line 2947: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2943: p_orig_system_reference => p_cust_site_use_rec.orig_system_reference,
2944: p_owner_table_name => 'HZ_CUST_SITE_USES_ALL',
2945: x_owner_table_id => l_cust_site_use_rec.site_use_id ,
2946: x_return_status => x_return_status);
2947: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2948: RAISE FND_API.G_EXC_ERROR;
2949: END IF;
2950:
2951: END IF;

Line 2948: RAISE FND_API.G_EXC_ERROR;

2944: p_owner_table_name => 'HZ_CUST_SITE_USES_ALL',
2945: x_owner_table_id => l_cust_site_use_rec.site_use_id ,
2946: x_return_status => x_return_status);
2947: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2948: RAISE FND_API.G_EXC_ERROR;
2949: END IF;
2950:
2951: END IF;
2952:

Line 2962: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2958: x_return_status => x_return_status,
2959: x_msg_count => x_msg_count,
2960: x_msg_data => x_msg_data);
2961:
2962: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2963: RAISE FND_API.G_EXC_ERROR;
2964: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2965: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2966: END IF;

Line 2963: RAISE FND_API.G_EXC_ERROR;

2959: x_msg_count => x_msg_count,
2960: x_msg_data => x_msg_data);
2961:
2962: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2963: RAISE FND_API.G_EXC_ERROR;
2964: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2965: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2966: END IF;
2967:

Line 2964: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2960: x_msg_data => x_msg_data);
2961:
2962: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2963: RAISE FND_API.G_EXC_ERROR;
2964: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2965: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2966: END IF;
2967:
2968: -- Call to business logic.

Line 2965: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2961:
2962: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2963: RAISE FND_API.G_EXC_ERROR;
2964: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2965: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2966: END IF;
2967:
2968: -- Call to business logic.
2969: do_update_cust_site_use (

Line 2974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2970: l_cust_site_use_rec,
2971: p_object_version_number,
2972: x_return_status );
2973:
2974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2975: l_old_cust_site_use_rec.orig_system := l_cust_site_use_rec.orig_system;
2976: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2977: -- Invoke business event system.
2978: HZ_BUSINESS_EVENT_V2PVT.update_cust_site_use_event (

Line 2992: p_encoded => FND_API.G_FALSE,

2988: END IF;
2989:
2990: -- Standard call to get message count and if count is 1, get message info.
2991: FND_MSG_PUB.Count_And_Get(
2992: p_encoded => FND_API.G_FALSE,
2993: p_count => x_msg_count,
2994: p_data => x_msg_data );
2995:
2996: -- Debug info.

Line 3013: WHEN FND_API.G_EXC_ERROR THEN

3009: -- Check if API is called in debug mode. If yes, disable debug.
3010: --disable_debug;
3011:
3012: EXCEPTION
3013: WHEN FND_API.G_EXC_ERROR THEN
3014: ROLLBACK TO update_cust_site_use;
3015: x_return_status := FND_API.G_RET_STS_ERROR;
3016:
3017: FND_MSG_PUB.Count_And_Get(

Line 3015: x_return_status := FND_API.G_RET_STS_ERROR;

3011:
3012: EXCEPTION
3013: WHEN FND_API.G_EXC_ERROR THEN
3014: ROLLBACK TO update_cust_site_use;
3015: x_return_status := FND_API.G_RET_STS_ERROR;
3016:
3017: FND_MSG_PUB.Count_And_Get(
3018: p_encoded => FND_API.G_FALSE,
3019: p_count => x_msg_count,

Line 3018: p_encoded => FND_API.G_FALSE,

3014: ROLLBACK TO update_cust_site_use;
3015: x_return_status := FND_API.G_RET_STS_ERROR;
3016:
3017: FND_MSG_PUB.Count_And_Get(
3018: p_encoded => FND_API.G_FALSE,
3019: p_count => x_msg_count,
3020: p_data => x_msg_data );
3021:
3022: -- Debug info.

Line 3038: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3034:
3035: -- Check if API is called in debug mode. If yes, disable debug.
3036: --disable_debug;
3037:
3038: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3039: ROLLBACK TO update_cust_site_use;
3040: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3041:
3042: FND_MSG_PUB.Count_And_Get(

Line 3040: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3036: --disable_debug;
3037:
3038: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3039: ROLLBACK TO update_cust_site_use;
3040: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3041:
3042: FND_MSG_PUB.Count_And_Get(
3043: p_encoded => FND_API.G_FALSE,
3044: p_count => x_msg_count,

Line 3043: p_encoded => FND_API.G_FALSE,

3039: ROLLBACK TO update_cust_site_use;
3040: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3041:
3042: FND_MSG_PUB.Count_And_Get(
3043: p_encoded => FND_API.G_FALSE,
3044: p_count => x_msg_count,
3045: p_data => x_msg_data );
3046:
3047: -- Debug info.

Line 3065: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3061: --disable_debug;
3062:
3063: WHEN OTHERS THEN
3064: ROLLBACK TO update_cust_site_use;
3065: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3066:
3067: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3068: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3069: FND_MSG_PUB.ADD;

Line 3072: p_encoded => FND_API.G_FALSE,

3068: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3069: FND_MSG_PUB.ADD;
3070:
3071: FND_MSG_PUB.Count_And_Get(
3072: p_encoded => FND_API.G_FALSE,
3073: p_count => x_msg_count,
3074: p_data => x_msg_data );
3075:
3076: -- Debug info.

Line 3106: * FND_API.G_TRUE. Default is FND_API.G_FALSE.

3102: *
3103: * ARGUMENTS
3104: * IN:
3105: * p_init_msg_list Initialize message stack if it is set to
3106: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
3107: * p_cust_site_use_id Customer account site use id.
3108: * IN/OUT:
3109: * OUT:
3110: * x_cust_site_use_rec Returned customer account site use record.

Line 3113: * be FND_API.G_RET_STS_SUCCESS (success),

3109: * OUT:
3110: * x_cust_site_use_rec Returned customer account site use record.
3111: * x_customer_profile_rec Returned customer profile record.
3112: * x_return_status Return status after the call. The status can
3113: * be FND_API.G_RET_STS_SUCCESS (success),
3114: * FND_API.G_RET_STS_ERROR (error),
3115: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3116: * x_msg_count Number of messages in message stack.
3117: * x_msg_data Message text if x_msg_count is 1.

Line 3114: * FND_API.G_RET_STS_ERROR (error),

3110: * x_cust_site_use_rec Returned customer account site use record.
3111: * x_customer_profile_rec Returned customer profile record.
3112: * x_return_status Return status after the call. The status can
3113: * be FND_API.G_RET_STS_SUCCESS (success),
3114: * FND_API.G_RET_STS_ERROR (error),
3115: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3116: * x_msg_count Number of messages in message stack.
3117: * x_msg_data Message text if x_msg_count is 1.
3118: *

Line 3115: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).

3111: * x_customer_profile_rec Returned customer profile record.
3112: * x_return_status Return status after the call. The status can
3113: * be FND_API.G_RET_STS_SUCCESS (success),
3114: * FND_API.G_RET_STS_ERROR (error),
3115: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3116: * x_msg_count Number of messages in message stack.
3117: * x_msg_data Message text if x_msg_count is 1.
3118: *
3119: * NOTES

Line 3128: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

3124: *
3125: */
3126:
3127: PROCEDURE get_cust_site_use_rec (
3128: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3129: p_site_use_id IN NUMBER,
3130: x_cust_site_use_rec OUT NOCOPY CUST_SITE_USE_REC_TYPE,
3131: x_customer_profile_rec OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
3132: x_return_status OUT NOCOPY VARCHAR2,

Line 3153: IF FND_API.to_Boolean(p_init_msg_list) THEN

3149: p_msg_level=>fnd_log.level_procedure);
3150: END IF;
3151:
3152: -- Initialize message list if p_init_msg_list is set to TRUE.
3153: IF FND_API.to_Boolean(p_init_msg_list) THEN
3154: FND_MSG_PUB.initialize;
3155: END IF;
3156:
3157: -- Initialize API return status to success.

Line 3158: x_return_status := FND_API.G_RET_STS_SUCCESS;

3154: FND_MSG_PUB.initialize;
3155: END IF;
3156:
3157: -- Initialize API return status to success.
3158: x_return_status := FND_API.G_RET_STS_SUCCESS;
3159:
3160: -- Check whether primary key has been passed in.
3161: IF p_site_use_id IS NULL OR
3162: p_site_use_id = FND_API.G_MISS_NUM THEN

Line 3162: p_site_use_id = FND_API.G_MISS_NUM THEN

3158: x_return_status := FND_API.G_RET_STS_SUCCESS;
3159:
3160: -- Check whether primary key has been passed in.
3161: IF p_site_use_id IS NULL OR
3162: p_site_use_id = FND_API.G_MISS_NUM THEN
3163: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3164: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'site_use_id' );
3165: FND_MSG_PUB.ADD;
3166: RAISE FND_API.G_EXC_ERROR;

Line 3166: RAISE FND_API.G_EXC_ERROR;

3162: p_site_use_id = FND_API.G_MISS_NUM THEN
3163: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3164: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'site_use_id' );
3165: FND_MSG_PUB.ADD;
3166: RAISE FND_API.G_EXC_ERROR;
3167: END IF;
3168:
3169: x_cust_site_use_rec.site_use_id := p_site_use_id;
3170:

Line 3303: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3299: x_return_status => x_return_status,
3300: x_msg_count => x_msg_count,
3301: x_msg_data => x_msg_data );
3302:
3303: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3304: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3305: RAISE FND_API.G_EXC_ERROR;
3306: ELSE
3307: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 3304: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

3300: x_msg_count => x_msg_count,
3301: x_msg_data => x_msg_data );
3302:
3303: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3304: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3305: RAISE FND_API.G_EXC_ERROR;
3306: ELSE
3307: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3308: END IF;

Line 3305: RAISE FND_API.G_EXC_ERROR;

3301: x_msg_data => x_msg_data );
3302:
3303: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3304: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3305: RAISE FND_API.G_EXC_ERROR;
3306: ELSE
3307: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3308: END IF;
3309: END IF;

Line 3307: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3303: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3304: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3305: RAISE FND_API.G_EXC_ERROR;
3306: ELSE
3307: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3308: END IF;
3309: END IF;
3310: EXCEPTION
3311: WHEN NO_DATA_FOUND THEN

Line 3317: p_encoded => FND_API.G_FALSE,

3313: END;
3314:
3315: -- Standard call to get message count and if count is 1, get message info.
3316: FND_MSG_PUB.Count_And_Get(
3317: p_encoded => FND_API.G_FALSE,
3318: p_count => x_msg_count,
3319: p_data => x_msg_data );
3320:
3321: -- Debug info.

Line 3338: WHEN FND_API.G_EXC_ERROR THEN

3334: -- Check if API is called in debug mode. If yes, disable debug.
3335: --disable_debug;
3336:
3337: EXCEPTION
3338: WHEN FND_API.G_EXC_ERROR THEN
3339: x_return_status := FND_API.G_RET_STS_ERROR;
3340:
3341: FND_MSG_PUB.Count_And_Get(
3342: p_encoded => FND_API.G_FALSE,

Line 3339: x_return_status := FND_API.G_RET_STS_ERROR;

3335: --disable_debug;
3336:
3337: EXCEPTION
3338: WHEN FND_API.G_EXC_ERROR THEN
3339: x_return_status := FND_API.G_RET_STS_ERROR;
3340:
3341: FND_MSG_PUB.Count_And_Get(
3342: p_encoded => FND_API.G_FALSE,
3343: p_count => x_msg_count,

Line 3342: p_encoded => FND_API.G_FALSE,

3338: WHEN FND_API.G_EXC_ERROR THEN
3339: x_return_status := FND_API.G_RET_STS_ERROR;
3340:
3341: FND_MSG_PUB.Count_And_Get(
3342: p_encoded => FND_API.G_FALSE,
3343: p_count => x_msg_count,
3344: p_data => x_msg_data );
3345:
3346: -- Debug info.

Line 3362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3358:
3359: -- Check if API is called in debug mode. If yes, disable debug.
3360: --disable_debug;
3361:
3362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3364:
3365: FND_MSG_PUB.Count_And_Get(
3366: p_encoded => FND_API.G_FALSE,

Line 3363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3359: -- Check if API is called in debug mode. If yes, disable debug.
3360: --disable_debug;
3361:
3362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3364:
3365: FND_MSG_PUB.Count_And_Get(
3366: p_encoded => FND_API.G_FALSE,
3367: p_count => x_msg_count,

Line 3366: p_encoded => FND_API.G_FALSE,

3362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3364:
3365: FND_MSG_PUB.Count_And_Get(
3366: p_encoded => FND_API.G_FALSE,
3367: p_count => x_msg_count,
3368: p_data => x_msg_data );
3369:
3370: -- Debug info.

Line 3387: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3383: -- Check if API is called in debug mode. If yes, disable debug.
3384: --disable_debug;
3385:
3386: WHEN OTHERS THEN
3387: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3388:
3389: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3390: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3391: FND_MSG_PUB.ADD;

Line 3394: p_encoded => FND_API.G_FALSE,

3390: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3391: FND_MSG_PUB.ADD;
3392:
3393: FND_MSG_PUB.Count_And_Get(
3394: p_encoded => FND_API.G_FALSE,
3395: p_count => x_msg_count,
3396: p_data => x_msg_data );
3397:
3398: -- Debug info.

Line 3442: p_account_site_rec.language <> FND_API.G_MISS_CHAR) OR

3438:
3439: -- check language
3440: IF (p_create_update_flag = 'C' AND
3441: p_account_site_rec.language IS NOT NULL AND
3442: p_account_site_rec.language <> FND_API.G_MISS_CHAR) OR
3443: (p_create_update_flag = 'U' AND
3444: p_account_site_rec.language IS NOT NULL AND
3445: p_account_site_rec.language <> p_old_account_site_rec.language)
3446: THEN

Line 3450: x_return_status := FND_API.G_RET_STS_ERROR;

3446: THEN
3447: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3448: FND_MESSAGE.SET_TOKEN('COLUMN', 'language');
3449: FND_MSG_PUB.ADD;
3450: x_return_status := FND_API.G_RET_STS_ERROR;
3451: END IF;
3452:
3453: END check_obsolete_columns;
3454: