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 386: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

382: --We should remove the code where they are suppressing the error being raise
383: --by OM code. TCA team should always pass on the error message back to the user
384: --/ UI / calling API, so that they will know that an error has occurred in OM
385: -- l_return_status := 'S';
386: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
387: END;
388:
389: --
390: -- only raise unexpected error

Line 392: --Added FND_API.G_EXC_ERROR

388:
389: --
390: -- only raise unexpected error
391: --Bug14059649
392: --Added FND_API.G_EXC_ERROR
393: --We should remove the code where they are suppressing the error being raise
394: --by OM code. TCA team should always pass on the error message back to the user
395: --/ UI / calling API, so that they will know that an error has occurred in OM
396: --

Line 397: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

393: --We should remove the code where they are suppressing the error being raise
394: --by OM code. TCA team should always pass on the error message back to the user
395: --/ UI / calling API, so that they will know that an error has occurred in OM
396: --
397: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
399: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
400: RAISE FND_API.G_EXC_ERROR;
401: END IF;

Line 398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

394: --by OM code. TCA team should always pass on the error message back to the user
395: --/ UI / calling API, so that they will know that an error has occurred in OM
396: --
397: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
399: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
400: RAISE FND_API.G_EXC_ERROR;
401: END IF;
402: END IF;

Line 399: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

395: --/ UI / calling API, so that they will know that an error has occurred in OM
396: --
397: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
399: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
400: RAISE FND_API.G_EXC_ERROR;
401: END IF;
402: END IF;
403: END IF;

Line 400: RAISE FND_API.G_EXC_ERROR;

396: --
397: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
399: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
400: RAISE FND_API.G_EXC_ERROR;
401: END IF;
402: END IF;
403: END IF;
404: CLOSE c_check_first_site;

Line 489: --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.

485: p_msg_level=>fnd_log.level_procedure);
486: END IF;
487:
488:
489: --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.
490: if (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
491: then
492: l_orig_sys_reference_rec.orig_system := p_cust_acct_site_rec.orig_system;
493: l_orig_sys_reference_rec.orig_system_reference := l_orig_system_reference;

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

486: END IF;
487:
488:
489: --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.
490: if (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
491: then
492: l_orig_sys_reference_rec.orig_system := p_cust_acct_site_rec.orig_system;
493: l_orig_sys_reference_rec.orig_system_reference := l_orig_system_reference;
494: l_orig_sys_reference_rec.owner_table_name := 'HZ_CUST_ACCT_SITES_ALL';

Line 499: FND_API.G_FALSE,

495: l_orig_sys_reference_rec.owner_table_id := p_cust_acct_site_rec.cust_acct_site_id;
496: l_orig_sys_reference_rec.created_by_module := p_cust_acct_site_rec.created_by_module;
497:
498: hz_orig_system_ref_pub.create_orig_system_reference(
499: FND_API.G_FALSE,
500: l_orig_sys_reference_rec,
501: x_return_status,
502: l_msg_count,
503: l_msg_data);

Line 504: IF x_return_status <> fnd_api.g_ret_sts_success THEN

500: l_orig_sys_reference_rec,
501: x_return_status,
502: l_msg_count,
503: l_msg_data);
504: IF x_return_status <> fnd_api.g_ret_sts_success THEN
505: RAISE FND_API.G_EXC_ERROR;
506: END IF;
507: end if;
508:

Line 505: RAISE FND_API.G_EXC_ERROR;

501: x_return_status,
502: l_msg_count,
503: l_msg_data);
504: IF x_return_status <> fnd_api.g_ret_sts_success THEN
505: RAISE FND_API.G_EXC_ERROR;
506: END IF;
507: end if;
508:
509: x_cust_acct_site_id := p_cust_acct_site_rec.cust_acct_site_id;

Line 531: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

527: x_msg_data => l_msg_data,
528: x_loc_id => l_loc_id
529: );
530:
531: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
532: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
533: RAISE FND_API.G_EXC_ERROR;
534: ELSE
535: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 532: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

528: x_loc_id => l_loc_id
529: );
530:
531: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
532: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
533: RAISE FND_API.G_EXC_ERROR;
534: ELSE
535: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
536: END IF;

Line 533: RAISE FND_API.G_EXC_ERROR;

529: );
530:
531: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
532: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
533: RAISE FND_API.G_EXC_ERROR;
534: ELSE
535: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
536: END IF;
537: END IF;

Line 535: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

531: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
532: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
533: RAISE FND_API.G_EXC_ERROR;
534: ELSE
535: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
536: END IF;
537: END IF;
538:
539: -- Debug info.

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

674: * IN/OUT:
675: * p_cust_acct_site_rec Customer account site record.
676: * p_object_version_number Used for locking the being updated record.
677: * x_return_status Return status after the call. The status can
678: * be FND_API.G_RET_STS_SUCCESS (success),
679: * FND_API.G_RET_STS_ERROR (error),
680: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
681: *
682: * NOTES

Line 679: * FND_API.G_RET_STS_ERROR (error),

675: * p_cust_acct_site_rec Customer account site record.
676: * p_object_version_number Used for locking the being updated record.
677: * x_return_status Return status after the call. The status can
678: * be FND_API.G_RET_STS_SUCCESS (success),
679: * FND_API.G_RET_STS_ERROR (error),
680: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
681: *
682: * NOTES
683: *

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

676: * p_object_version_number Used for locking the being updated record.
677: * x_return_status Return status after the call. The status can
678: * be FND_API.G_RET_STS_SUCCESS (success),
679: * FND_API.G_RET_STS_ERROR (error),
680: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
681: *
682: * NOTES
683: *
684: * MODIFICATION HISTORY

Line 764: RAISE FND_API.G_EXC_ERROR;

760: THEN
761: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_RECORD_CHANGED' );
762: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_cust_acct_sites' );
763: FND_MSG_PUB.ADD;
764: RAISE FND_API.G_EXC_ERROR;
765: END IF;
766:
767: p_object_version_number := NVL( l_object_version_number, 1 ) + 1;
768:

Line 776: RAISE FND_API.G_EXC_ERROR;

772: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account site' );
773: FND_MESSAGE.SET_TOKEN( 'VALUE',
774: NVL( TO_CHAR( p_cust_acct_site_rec.cust_acct_site_id ), 'null' ) );
775: FND_MSG_PUB.ADD;
776: RAISE FND_API.G_EXC_ERROR;
777: END;
778:
779:
780:

Line 788: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

784: p_cust_acct_site_rec => p_cust_acct_site_rec,
785: p_rowid => l_rowid,
786: x_return_status => x_return_status );
787:
788: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
789: RAISE FND_API.G_EXC_ERROR;
790: END IF;
791:
792: if (p_cust_acct_site_rec.orig_system is not null

Line 789: RAISE FND_API.G_EXC_ERROR;

785: p_rowid => l_rowid,
786: x_return_status => x_return_status );
787:
788: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
789: RAISE FND_API.G_EXC_ERROR;
790: END IF;
791:
792: if (p_cust_acct_site_rec.orig_system is not null
793: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)

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

789: RAISE FND_API.G_EXC_ERROR;
790: END IF;
791:
792: if (p_cust_acct_site_rec.orig_system is not null
793: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
794: and (p_cust_acct_site_rec.orig_system_reference is not null
795: and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
796: then
797: p_cust_acct_site_rec.orig_system_reference := null;

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

791:
792: if (p_cust_acct_site_rec.orig_system is not null
793: and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
794: and (p_cust_acct_site_rec.orig_system_reference is not null
795: and p_cust_acct_site_rec.orig_system_reference <>fnd_api.g_miss_char)
796: then
797: p_cust_acct_site_rec.orig_system_reference := null;
798: -- In mosr, we have bypassed osr nonupdateable validation
799: -- but we should not update existing osr, set it to null

Line 821: RAISE FND_API.G_EXC_ERROR;

817: FND_MESSAGE.SET_NAME('AR', 'HZ_API_NO_RECORD');
818: FND_MESSAGE.SET_TOKEN('RECORD', 'Message Name');
819: FND_MESSAGE.SET_TOKEN('VALUE', 'HZ_INACTIVATE_ACCOUNT_SITE_UI');
820: FND_MSG_PUB.ADD;
821: RAISE FND_API.G_EXC_ERROR;
822: END;
823: END IF;
824: IF g_message_name IS NOT NULL THEN
825: -- Code modified for Bug 3714636 ends here

Line 841: RAISE FND_API.G_EXC_ERROR;

837: FND_MESSAGE.SET_TOKEN( 'RECORD', 'party site' );
838: FND_MESSAGE.SET_TOKEN( 'VALUE',
839: NVL( TO_CHAR( p_cust_acct_site_rec.party_site_id ), 'null' ) );
840: FND_MSG_PUB.ADD;
841: RAISE FND_API.G_EXC_ERROR;
842: END;
843: l_party_site_rec.party_site_id := l_party_site_id;
844: l_party_site_rec.status := p_cust_acct_site_rec.status;
845:

Line 854: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

850: x_return_status => x_return_status,
851: x_msg_count => l_msg_count,
852: x_msg_data => l_msg_data) ;
853:
854: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
855: RAISE FND_API.G_EXC_ERROR;
856: END IF;
857:
858: END IF; -- End of account site status check

Line 855: RAISE FND_API.G_EXC_ERROR;

851: x_msg_count => l_msg_count,
852: x_msg_data => l_msg_data) ;
853:
854: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
855: RAISE FND_API.G_EXC_ERROR;
856: END IF;
857:
858: END IF; -- End of account site status check
859: END IF;

Line 955: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

951: x_msg_data => l_msg_data,
952: x_loc_id => l_loc_id
953: );
954:
955: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
956: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
957: RAISE FND_API.G_EXC_ERROR;
958: ELSE
959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 956: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

952: x_loc_id => l_loc_id
953: );
954:
955: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
956: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
957: RAISE FND_API.G_EXC_ERROR;
958: ELSE
959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
960: END IF;

Line 957: RAISE FND_API.G_EXC_ERROR;

953: );
954:
955: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
956: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
957: RAISE FND_API.G_EXC_ERROR;
958: ELSE
959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
960: END IF;
961: END IF;

Line 959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

955: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
956: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
957: RAISE FND_API.G_EXC_ERROR;
958: ELSE
959: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
960: END IF;
961: END IF;
962:
963: -- Debug info.

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

987: * HZ_CUST_SITE_USES_PKG.Insert_Row
988: *
989: * ARGUMENTS
990: * IN:
991: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
992: * profile based on the customer profile record passed
993: * in.
994: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
995: * profile amounts by copying corresponding data

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

990: * IN:
991: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
992: * profile based on the customer profile record passed
993: * in.
994: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
995: * profile amounts by copying corresponding data
996: * from customer profile class amounts.
997: * IN/OUT:
998: * p_cust_site_use_rec Customer account site use record.

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

998: * p_cust_site_use_rec Customer account site use record.
999: * p_customer_profile_rec Customer profile record. One customer account
1000: * must have a customer profile.
1001: * x_return_status Return status after the call. The status can
1002: * be FND_API.G_RET_STS_SUCCESS (success),
1003: * FND_API.G_RET_STS_ERROR (error),
1004: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1005: * OUT:
1006: * x_site_use_id Customer account site use ID.

Line 1003: * FND_API.G_RET_STS_ERROR (error),

999: * p_customer_profile_rec Customer profile record. One customer account
1000: * must have a customer profile.
1001: * x_return_status Return status after the call. The status can
1002: * be FND_API.G_RET_STS_SUCCESS (success),
1003: * FND_API.G_RET_STS_ERROR (error),
1004: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1005: * OUT:
1006: * x_site_use_id Customer account site use ID.
1007: *

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

1000: * must have a customer profile.
1001: * x_return_status Return status after the call. The status can
1002: * be FND_API.G_RET_STS_SUCCESS (success),
1003: * FND_API.G_RET_STS_ERROR (error),
1004: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1005: * OUT:
1006: * x_site_use_id Customer account site use ID.
1007: *
1008: * NOTES

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

1020:
1021: PROCEDURE do_create_cust_site_use (
1022: p_cust_site_use_rec IN OUT NOCOPY CUST_SITE_USE_REC_TYPE,
1023: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
1024: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
1025: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
1026: x_site_use_id OUT NOCOPY NUMBER,
1027: x_return_status IN OUT NOCOPY VARCHAR2
1028: ) IS

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

1021: PROCEDURE do_create_cust_site_use (
1022: p_cust_site_use_rec IN OUT NOCOPY CUST_SITE_USE_REC_TYPE,
1023: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
1024: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
1025: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
1026: x_site_use_id OUT NOCOPY NUMBER,
1027: x_return_status IN OUT NOCOPY VARCHAR2
1028: ) IS
1029:

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

1068: END IF;
1069:
1070: /* 3456489 Added for Shared Service Uptake */
1071: IF (p_cust_site_use_rec.org_id is NULL or
1072: p_cust_site_use_rec.org_id = fnd_api.g_miss_num) then
1073: BEGIN
1074: SELECT org_id
1075: INTO p_cust_site_use_rec.org_id
1076: FROM HZ_CUST_ACCT_SITES_ALL

Line 1087: RAISE FND_API.G_EXC_ERROR;

1083: FND_MESSAGE.SET_TOKEN( 'VALUE',
1084: NVL( TO_CHAR(
1085: p_cust_site_use_rec.cust_acct_site_id ), 'null' ) );
1086: FND_MSG_PUB.ADD;
1087: RAISE FND_API.G_EXC_ERROR;
1088: END;
1089: END IF;
1090:
1091: BEGIN

Line 1096: RAISE FND_API.G_EXC_ERROR;

1092: MO_GLOBAL.validate_orgid_pub_api(p_cust_site_use_rec.org_id,'N',l_return_status);
1093: EXCEPTION
1094: WHEN OTHERS
1095: THEN
1096: RAISE FND_API.G_EXC_ERROR;
1097: END;
1098:
1099:
1100: -- Validate site use record.

Line 1107: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1103: p_cust_site_use_rec => p_cust_site_use_rec,
1104: p_rowid => NULL,
1105: x_return_status => x_return_status );
1106:
1107: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1108: RAISE FND_API.G_EXC_ERROR;
1109: END IF;
1110:
1111: -- Create party site use of same type if one does not exist.

Line 1108: RAISE FND_API.G_EXC_ERROR;

1104: p_rowid => NULL,
1105: x_return_status => x_return_status );
1106:
1107: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1108: RAISE FND_API.G_EXC_ERROR;
1109: END IF;
1110:
1111: -- Create party site use of same type if one does not exist.
1112:

Line 1130: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1126: p_msg_level=>fnd_log.level_statement);
1127: END IF;
1128:
1129: -- site_use_code is not in a valid site_use_code in party level.
1130: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1131: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1132: x_return_status := FND_API.G_RET_STS_SUCCESS;
1133: ELSE
1134: -- Create party site use

Line 1132: x_return_status := FND_API.G_RET_STS_SUCCESS;

1128:
1129: -- site_use_code is not in a valid site_use_code in party level.
1130: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1131: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1132: x_return_status := FND_API.G_RET_STS_SUCCESS;
1133: ELSE
1134: -- Create party site use
1135: SELECT PARTY_SITE_ID INTO l_party_site_id
1136: FROM HZ_CUST_ACCT_SITES_ALL -- Bug 3456489

Line 1159: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1155: x_msg_count => l_msg_count,
1156: x_msg_data => l_msg_data,
1157: x_party_site_use_id => l_party_site_use_id );
1158:
1159: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1160: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1161: RAISE FND_API.G_EXC_ERROR;
1162: ELSE
1163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1160: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1156: x_msg_data => l_msg_data,
1157: x_party_site_use_id => l_party_site_use_id );
1158:
1159: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1160: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1161: RAISE FND_API.G_EXC_ERROR;
1162: ELSE
1163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1164: END IF;

Line 1161: RAISE FND_API.G_EXC_ERROR;

1157: x_party_site_use_id => l_party_site_use_id );
1158:
1159: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1160: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1161: RAISE FND_API.G_EXC_ERROR;
1162: ELSE
1163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1164: END IF;
1165: END IF;

Line 1163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1159: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1160: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1161: RAISE FND_API.G_EXC_ERROR;
1162: ELSE
1163: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1164: END IF;
1165: END IF;
1166: END;
1167: END IF;

Line 1182: p_cust_site_use_rec.status = fnd_api.g_miss_char OR

1178: -- combination is to be set to primary, and when a new record is entered with
1179: -- this combination with the primary flag set, then the first one must be unset.
1180:
1181: IF p_cust_site_use_rec.status IS NULL OR
1182: p_cust_site_use_rec.status = fnd_api.g_miss_char OR
1183: p_cust_site_use_rec.status = 'A'
1184: THEN
1185: IF p_cust_site_use_rec.primary_flag = 'Y' THEN
1186: --we must unset the previous set primary_flag.

Line 1400: 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

1396: END IF;
1397:
1398: /*Bug 8970479 : END */
1399:
1400: 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
1401: if (p_cust_site_use_rec.orig_system is null OR p_cust_site_use_rec.orig_system =fnd_api.g_miss_char) then
1402: p_cust_site_use_rec.orig_system := 'UNKNOWN';
1403: end if;
1404: end if;

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

1397:
1398: /*Bug 8970479 : END */
1399:
1400: 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
1401: if (p_cust_site_use_rec.orig_system is null OR p_cust_site_use_rec.orig_system =fnd_api.g_miss_char) then
1402: p_cust_site_use_rec.orig_system := 'UNKNOWN';
1403: end if;
1404: end if;
1405:

Line 1407: 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

1403: end if;
1404: end if;
1405:
1406:
1407: 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
1408:
1409: l_orig_sys_reference_rec.orig_system := p_cust_site_use_rec.orig_system;
1410: l_orig_sys_reference_rec.orig_system_reference := p_cust_site_use_rec.orig_system_reference;
1411: l_orig_sys_reference_rec.owner_table_name := 'HZ_CUST_SITE_USES_ALL';

Line 1415: FND_API.G_FALSE,

1411: l_orig_sys_reference_rec.owner_table_name := 'HZ_CUST_SITE_USES_ALL';
1412: l_orig_sys_reference_rec.owner_table_id := p_cust_site_use_rec.site_use_id;
1413: l_orig_sys_reference_rec.created_by_module := p_cust_site_use_rec.created_by_module;
1414: hz_orig_system_ref_pub.create_orig_system_reference(
1415: FND_API.G_FALSE,
1416: l_orig_sys_reference_rec,
1417: x_return_status,
1418: l_msg_count,
1419: l_msg_data);

Line 1420: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1416: l_orig_sys_reference_rec,
1417: x_return_status,
1418: l_msg_count,
1419: l_msg_data);
1420: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1421: RAISE FND_API.G_EXC_ERROR;
1422: END IF;
1423:
1424: end if;

Line 1421: RAISE FND_API.G_EXC_ERROR;

1417: x_return_status,
1418: l_msg_count,
1419: l_msg_data);
1420: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1421: RAISE FND_API.G_EXC_ERROR;
1422: END IF;
1423:
1424: end if;
1425:

Line 1432: p_cust_site_use_rec.status = FND_API.G_MISS_CHAR

1428:
1429: IF p_cust_site_use_rec.site_use_code IN ('BILL_TO', 'SHIP_TO', 'MARKET' ) THEN
1430: IF p_cust_site_use_rec.status = 'A' OR
1431: p_cust_site_use_rec.status IS NULL OR
1432: p_cust_site_use_rec.status = FND_API.G_MISS_CHAR
1433: THEN
1434: IF p_cust_site_use_rec.primary_flag = 'Y' THEN
1435: l_flag := 'P';
1436: ELSE

Line 1450: IF p_create_profile = FND_API.G_TRUE THEN

1446: l_flag );
1447:
1448: END IF;
1449:
1450: IF p_create_profile = FND_API.G_TRUE THEN
1451:
1452: -- Create the profile for the site use
1453:
1454: p_customer_profile_rec.site_use_id := p_cust_site_use_rec.site_use_id;

Line 1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1466: x_msg_count => l_msg_count,
1467: x_msg_data => l_msg_data,
1468: x_cust_account_profile_id => l_cust_account_profile_id );
1469:
1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1471: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1472: RAISE FND_API.G_EXC_ERROR;
1473: ELSE
1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1471: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1467: x_msg_data => l_msg_data,
1468: x_cust_account_profile_id => l_cust_account_profile_id );
1469:
1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1471: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1472: RAISE FND_API.G_EXC_ERROR;
1473: ELSE
1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1475: END IF;

Line 1472: RAISE FND_API.G_EXC_ERROR;

1468: x_cust_account_profile_id => l_cust_account_profile_id );
1469:
1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1471: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1472: RAISE FND_API.G_EXC_ERROR;
1473: ELSE
1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1475: END IF;
1476: END IF;

Line 1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1470: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1471: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1472: RAISE FND_API.G_EXC_ERROR;
1473: ELSE
1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1475: END IF;
1476: END IF;
1477:
1478: END IF;

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

1503: * IN/OUT:
1504: * p_cust_site_use_rec Customer account site use record.
1505: * p_object_version_number Used for locking the being updated record.
1506: * x_return_status Return status after the call. The status can
1507: * be FND_API.G_RET_STS_SUCCESS (success),
1508: * FND_API.G_RET_STS_ERROR (error),
1509: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1510: *
1511: * NOTES

Line 1508: * FND_API.G_RET_STS_ERROR (error),

1504: * p_cust_site_use_rec Customer account site use record.
1505: * p_object_version_number Used for locking the being updated record.
1506: * x_return_status Return status after the call. The status can
1507: * be FND_API.G_RET_STS_SUCCESS (success),
1508: * FND_API.G_RET_STS_ERROR (error),
1509: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1510: *
1511: * NOTES
1512: *

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

1505: * p_object_version_number Used for locking the being updated record.
1506: * x_return_status Return status after the call. The status can
1507: * be FND_API.G_RET_STS_SUCCESS (success),
1508: * FND_API.G_RET_STS_ERROR (error),
1509: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1510: *
1511: * NOTES
1512: *
1513: * MODIFICATION HISTORY

Line 1596: RAISE FND_API.G_EXC_ERROR;

1592: THEN
1593: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_RECORD_CHANGED' );
1594: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_cust_site_uses' );
1595: FND_MSG_PUB.ADD;
1596: RAISE FND_API.G_EXC_ERROR;
1597: END IF;
1598:
1599: p_object_version_number := NVL( l_object_version_number, 1 ) + 1;
1600:

Line 1608: RAISE FND_API.G_EXC_ERROR;

1604: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer site use' );
1605: FND_MESSAGE.SET_TOKEN( 'VALUE',
1606: NVL( TO_CHAR( p_cust_site_use_rec.site_use_id ), 'null' ) );
1607: FND_MSG_PUB.ADD;
1608: RAISE FND_API.G_EXC_ERROR;
1609: END;
1610:
1611: -- Validate cust site use record
1612: HZ_ACCOUNT_VALIDATE_V2PUB.validate_cust_site_use (

Line 1618: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1614: p_cust_site_use_rec => p_cust_site_use_rec,
1615: p_rowid => l_rowid,
1616: x_return_status => x_return_status );
1617:
1618: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1619: RAISE FND_API.G_EXC_ERROR;
1620: END IF;
1621:
1622: ---Create party site use of same type if one does not exist.

Line 1619: RAISE FND_API.G_EXC_ERROR;

1615: p_rowid => l_rowid,
1616: x_return_status => x_return_status );
1617:
1618: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1619: RAISE FND_API.G_EXC_ERROR;
1620: END IF;
1621:
1622: ---Create party site use of same type if one does not exist.
1623: --Bug No. 5036975

Line 1641: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1637: p_msg_level=>fnd_log.level_statement);
1638: END IF;
1639:
1640: -- site_use_code is not in a valid site_use_code in party level.
1641: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1642: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1643: x_return_status := FND_API.G_RET_STS_SUCCESS;
1644: ELSE
1645: -- Create party site use

Line 1643: x_return_status := FND_API.G_RET_STS_SUCCESS;

1639:
1640: -- site_use_code is not in a valid site_use_code in party level.
1641: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1642: FND_MSG_PUB.DELETE_MSG( l_message_count + 1 );
1643: x_return_status := FND_API.G_RET_STS_SUCCESS;
1644: ELSE
1645: -- Create party site use
1646:
1647: SELECT PARTY_SITE_ID INTO l_party_site_id

Line 1672: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1668: x_msg_count => l_msg_count,
1669: x_msg_data => l_msg_data,
1670: x_party_site_use_id => l_party_site_use_id );
1671:
1672: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1673: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1674: RAISE FND_API.G_EXC_ERROR;
1675: ELSE
1676: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1673: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1669: x_msg_data => l_msg_data,
1670: x_party_site_use_id => l_party_site_use_id );
1671:
1672: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1673: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1674: RAISE FND_API.G_EXC_ERROR;
1675: ELSE
1676: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1677: END IF;

Line 1674: RAISE FND_API.G_EXC_ERROR;

1670: x_party_site_use_id => l_party_site_use_id );
1671:
1672: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1673: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1674: RAISE FND_API.G_EXC_ERROR;
1675: ELSE
1676: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1677: END IF;
1678: END IF;

Line 1676: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1672: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1673: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1674: RAISE FND_API.G_EXC_ERROR;
1675: ELSE
1676: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1677: END IF;
1678: END IF;
1679: END;
1680: END IF;

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

1688: END IF;
1689: --Bug Fix:5036975
1690:
1691: if (p_cust_site_use_rec.orig_system is not null
1692: and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
1693: and (p_cust_site_use_rec.orig_system_reference is not null
1694: and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
1695: then
1696: p_cust_site_use_rec.orig_system_reference := null;

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

1690:
1691: if (p_cust_site_use_rec.orig_system is not null
1692: and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
1693: and (p_cust_site_use_rec.orig_system_reference is not null
1694: and p_cust_site_use_rec.orig_system_reference <>fnd_api.g_miss_char)
1695: then
1696: p_cust_site_use_rec.orig_system_reference := null;
1697: -- In mosr, we have bypassed osr nonupdateable validation
1698: -- but we should not update existing osr, set it to null

Line 1714: p_cust_site_use_rec.primary_flag = fnd_api.g_miss_char

1710: -- During modification of the primary_flag, if we are setting the primary flag
1711: -- of a particular combination of org and cust_account as primary then the already
1712: -- existing such combination would be unset if already primary.
1713: IF p_cust_site_use_rec.primary_flag = 'N' OR
1714: p_cust_site_use_rec.primary_flag = fnd_api.g_miss_char
1715: THEN
1716: p_cust_site_use_rec.primary_flag := NULL;
1717: END IF;
1718:

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

2113: *
2114: * ARGUMENTS
2115: * IN:
2116: * p_init_msg_list Initialize message stack if it is set to
2117: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2118: * p_cust_acct_site_rec Customer account site record.
2119: * IN/OUT:
2120: * OUT:
2121: * x_cust_acct_site_id Customer account site ID.

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

2119: * IN/OUT:
2120: * OUT:
2121: * x_cust_acct_site_id Customer account site ID.
2122: * x_return_status Return status after the call. The status can
2123: * be FND_API.G_RET_STS_SUCCESS (success),
2124: * FND_API.G_RET_STS_ERROR (error),
2125: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2126: * x_msg_count Number of messages in message stack.
2127: * x_msg_data Message text if x_msg_count is 1.

Line 2124: * FND_API.G_RET_STS_ERROR (error),

2120: * OUT:
2121: * x_cust_acct_site_id Customer account site ID.
2122: * x_return_status Return status after the call. The status can
2123: * be FND_API.G_RET_STS_SUCCESS (success),
2124: * FND_API.G_RET_STS_ERROR (error),
2125: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2126: * x_msg_count Number of messages in message stack.
2127: * x_msg_data Message text if x_msg_count is 1.
2128: *

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

2121: * x_cust_acct_site_id Customer account site ID.
2122: * x_return_status Return status after the call. The status can
2123: * be FND_API.G_RET_STS_SUCCESS (success),
2124: * FND_API.G_RET_STS_ERROR (error),
2125: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2126: * x_msg_count Number of messages in message stack.
2127: * x_msg_data Message text if x_msg_count is 1.
2128: *
2129: * NOTES

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

2134: *
2135: */
2136:
2137: PROCEDURE create_cust_acct_site (
2138: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2139: p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE,
2140: x_cust_acct_site_id OUT NOCOPY NUMBER,
2141: x_return_status OUT NOCOPY VARCHAR2,
2142: x_msg_count OUT NOCOPY NUMBER,

Line 2165: IF FND_API.to_Boolean(p_init_msg_list) THEN

2161: p_msg_level=>fnd_log.level_procedure);
2162: END IF;
2163:
2164: -- Initialize message list if p_init_msg_list is set to TRUE.
2165: IF FND_API.to_Boolean(p_init_msg_list) THEN
2166: FND_MSG_PUB.initialize;
2167: END IF;
2168:
2169: -- Initialize API return status to success.

Line 2170: x_return_status := FND_API.G_RET_STS_SUCCESS;

2166: FND_MSG_PUB.initialize;
2167: END IF;
2168:
2169: -- Initialize API return status to success.
2170: x_return_status := FND_API.G_RET_STS_SUCCESS;
2171:
2172: -- report error on obsolete columns based on profile
2173: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN
2174: check_obsolete_columns (

Line 2180: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2176: p_account_site_rec => l_cust_acct_site_rec,
2177: x_return_status => x_return_status
2178: );
2179:
2180: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2181: RAISE FND_API.G_EXC_ERROR;
2182: END IF;
2183: END IF;
2184:

Line 2181: RAISE FND_API.G_EXC_ERROR;

2177: x_return_status => x_return_status
2178: );
2179:
2180: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2181: RAISE FND_API.G_EXC_ERROR;
2182: END IF;
2183: END IF;
2184:
2185: -- Call to business logic.

Line 2191: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2187: l_cust_acct_site_rec,
2188: x_cust_acct_site_id,
2189: x_return_status );
2190:
2191: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2192: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2193: -- Invoke business event system.
2194: HZ_BUSINESS_EVENT_V2PVT.create_cust_acct_site_event (
2195: l_cust_acct_site_rec );

Line 2208: p_encoded => FND_API.G_FALSE,

2204: END IF;
2205:
2206: -- Standard call to get message count and if count is 1, get message info.
2207: FND_MSG_PUB.Count_And_Get(
2208: p_encoded => FND_API.G_FALSE,
2209: p_count => x_msg_count,
2210: p_data => x_msg_data );
2211:
2212: -- Debug info.

Line 2229: WHEN FND_API.G_EXC_ERROR THEN

2225: -- Check if API is called in debug mode. If yes, disable debug.
2226: --disable_debug;
2227:
2228: EXCEPTION
2229: WHEN FND_API.G_EXC_ERROR THEN
2230: ROLLBACK TO create_cust_acct_site;
2231: x_return_status := FND_API.G_RET_STS_ERROR;
2232:
2233: FND_MSG_PUB.Count_And_Get(

Line 2231: x_return_status := FND_API.G_RET_STS_ERROR;

2227:
2228: EXCEPTION
2229: WHEN FND_API.G_EXC_ERROR THEN
2230: ROLLBACK TO create_cust_acct_site;
2231: x_return_status := FND_API.G_RET_STS_ERROR;
2232:
2233: FND_MSG_PUB.Count_And_Get(
2234: p_encoded => FND_API.G_FALSE,
2235: p_count => x_msg_count,

Line 2234: p_encoded => FND_API.G_FALSE,

2230: ROLLBACK TO create_cust_acct_site;
2231: x_return_status := FND_API.G_RET_STS_ERROR;
2232:
2233: FND_MSG_PUB.Count_And_Get(
2234: p_encoded => FND_API.G_FALSE,
2235: p_count => x_msg_count,
2236: p_data => x_msg_data );
2237:
2238: -- Debug info.

Line 2254: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2250:
2251: -- Check if API is called in debug mode. If yes, disable debug.
2252: --disable_debug;
2253:
2254: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2255: ROLLBACK TO create_cust_acct_site;
2256: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2257:
2258: FND_MSG_PUB.Count_And_Get(

Line 2256: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2252: --disable_debug;
2253:
2254: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2255: ROLLBACK TO create_cust_acct_site;
2256: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2257:
2258: FND_MSG_PUB.Count_And_Get(
2259: p_encoded => FND_API.G_FALSE,
2260: p_count => x_msg_count,

Line 2259: p_encoded => FND_API.G_FALSE,

2255: ROLLBACK TO create_cust_acct_site;
2256: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2257:
2258: FND_MSG_PUB.Count_And_Get(
2259: p_encoded => FND_API.G_FALSE,
2260: p_count => x_msg_count,
2261: p_data => x_msg_data );
2262:
2263: -- Debug info.

Line 2281: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2277: --disable_debug;
2278:
2279: WHEN OTHERS THEN
2280: ROLLBACK TO create_cust_acct_site;
2281: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2282:
2283: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2284: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2285: FND_MSG_PUB.ADD;

Line 2288: p_encoded => FND_API.G_FALSE,

2284: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2285: FND_MSG_PUB.ADD;
2286:
2287: FND_MSG_PUB.Count_And_Get(
2288: p_encoded => FND_API.G_FALSE,
2289: p_count => x_msg_count,
2290: p_data => x_msg_data );
2291:
2292: -- Debug info.

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

2318: *
2319: * ARGUMENTS
2320: * IN:
2321: * p_init_msg_list Initialize message stack if it is set to
2322: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2323: * p_cust_acct_site_rec Customer account site record.
2324: * IN/OUT:
2325: * p_object_version_number Used for locking the being updated record.
2326: * OUT:

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

2324: * IN/OUT:
2325: * p_object_version_number Used for locking the being updated record.
2326: * OUT:
2327: * x_return_status Return status after the call. The status can
2328: * be FND_API.G_RET_STS_SUCCESS (success),
2329: * FND_API.G_RET_STS_ERROR (error),
2330: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2331: * x_msg_count Number of messages in message stack.
2332: * x_msg_data Message text if x_msg_count is 1.

Line 2329: * FND_API.G_RET_STS_ERROR (error),

2325: * p_object_version_number Used for locking the being updated record.
2326: * OUT:
2327: * x_return_status Return status after the call. The status can
2328: * be FND_API.G_RET_STS_SUCCESS (success),
2329: * FND_API.G_RET_STS_ERROR (error),
2330: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2331: * x_msg_count Number of messages in message stack.
2332: * x_msg_data Message text if x_msg_count is 1.
2333: *

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

2326: * OUT:
2327: * x_return_status Return status after the call. The status can
2328: * be FND_API.G_RET_STS_SUCCESS (success),
2329: * FND_API.G_RET_STS_ERROR (error),
2330: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2331: * x_msg_count Number of messages in message stack.
2332: * x_msg_data Message text if x_msg_count is 1.
2333: *
2334: * NOTES

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

2339: *
2340: */
2341:
2342: PROCEDURE update_cust_acct_site (
2343: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2344: p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE,
2345: p_object_version_number IN OUT NOCOPY NUMBER,
2346: x_return_status OUT NOCOPY VARCHAR2,
2347: x_msg_count OUT NOCOPY NUMBER,

Line 2371: IF FND_API.to_Boolean(p_init_msg_list) THEN

2367: p_msg_level=>fnd_log.level_procedure);
2368: END IF;
2369:
2370: -- Initialize message list if p_init_msg_list is set to TRUE.
2371: IF FND_API.to_Boolean(p_init_msg_list) THEN
2372: FND_MSG_PUB.initialize;
2373: END IF;
2374:
2375: -- Initialize API return status to success.

Line 2376: x_return_status := FND_API.G_RET_STS_SUCCESS;

2372: FND_MSG_PUB.initialize;
2373: END IF;
2374:
2375: -- Initialize API return status to success.
2376: x_return_status := FND_API.G_RET_STS_SUCCESS;
2377:
2378: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2379: 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)
2380: 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 2378: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)

2374:
2375: -- Initialize API return status to success.
2376: x_return_status := FND_API.G_RET_STS_SUCCESS;
2377:
2378: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2379: 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)
2380: 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
2381:
2382: hz_orig_system_ref_pub.get_owner_table_id

Line 2379: 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)

2375: -- Initialize API return status to success.
2376: x_return_status := FND_API.G_RET_STS_SUCCESS;
2377:
2378: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2379: 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)
2380: 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
2381:
2382: hz_orig_system_ref_pub.get_owner_table_id
2383: (p_orig_system => p_cust_acct_site_rec.orig_system,

Line 2380: 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

2376: x_return_status := FND_API.G_RET_STS_SUCCESS;
2377:
2378: IF (p_cust_acct_site_rec.orig_system is not null and p_cust_acct_site_rec.orig_system <>fnd_api.g_miss_char)
2379: 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)
2380: 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
2381:
2382: hz_orig_system_ref_pub.get_owner_table_id
2383: (p_orig_system => p_cust_acct_site_rec.orig_system,
2384: p_orig_system_reference => p_cust_acct_site_rec.orig_system_reference,

Line 2388: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2384: p_orig_system_reference => p_cust_acct_site_rec.orig_system_reference,
2385: p_owner_table_name => 'HZ_CUST_ACCT_SITES_ALL',
2386: x_owner_table_id => l_cust_acct_site_rec.cust_acct_site_id,
2387: x_return_status => x_return_status);
2388: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2389: RAISE FND_API.G_EXC_ERROR;
2390: END IF;
2391:
2392: END IF;

Line 2389: RAISE FND_API.G_EXC_ERROR;

2385: p_owner_table_name => 'HZ_CUST_ACCT_SITES_ALL',
2386: x_owner_table_id => l_cust_acct_site_rec.cust_acct_site_id,
2387: x_return_status => x_return_status);
2388: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2389: RAISE FND_API.G_EXC_ERROR;
2390: END IF;
2391:
2392: END IF;
2393:

Line 2403: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2399: x_return_status => x_return_status,
2400: x_msg_count => x_msg_count,
2401: x_msg_data => x_msg_data);
2402:
2403: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2404: RAISE FND_API.G_EXC_ERROR;
2405: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2407: END IF;

Line 2404: RAISE FND_API.G_EXC_ERROR;

2400: x_msg_count => x_msg_count,
2401: x_msg_data => x_msg_data);
2402:
2403: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2404: RAISE FND_API.G_EXC_ERROR;
2405: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2407: END IF;
2408:

Line 2405: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2401: x_msg_data => x_msg_data);
2402:
2403: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2404: RAISE FND_API.G_EXC_ERROR;
2405: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2407: END IF;
2408:
2409: -- report error on obsolete columns based on profile

Line 2406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2402:
2403: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2404: RAISE FND_API.G_EXC_ERROR;
2405: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2406: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2407: END IF;
2408:
2409: -- report error on obsolete columns based on profile
2410: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN

Line 2418: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2414: p_old_account_site_rec => l_old_cust_acct_site_rec,
2415: x_return_status => x_return_status
2416: );
2417:
2418: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2419: RAISE FND_API.G_EXC_ERROR;
2420: END IF;
2421: END IF;
2422:

Line 2419: RAISE FND_API.G_EXC_ERROR;

2415: x_return_status => x_return_status
2416: );
2417:
2418: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2419: RAISE FND_API.G_EXC_ERROR;
2420: END IF;
2421: END IF;
2422:
2423: -- Call to business logic.

Line 2429: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2425: l_cust_acct_site_rec,
2426: p_object_version_number,
2427: x_return_status );
2428:
2429: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2430: l_old_cust_acct_site_rec.orig_system := l_cust_acct_site_rec.orig_system;
2431: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2432: -- Invoke business event system.
2433: HZ_BUSINESS_EVENT_V2PVT.update_cust_acct_site_event (

Line 2447: p_encoded => FND_API.G_FALSE,

2443: END IF;
2444:
2445: -- Standard call to get message count and if count is 1, get message info.
2446: FND_MSG_PUB.Count_And_Get(
2447: p_encoded => FND_API.G_FALSE,
2448: p_count => x_msg_count,
2449: p_data => x_msg_data );
2450:
2451: -- Debug info.

Line 2468: WHEN FND_API.G_EXC_ERROR THEN

2464: -- Check if API is called in debug mode. If yes, disable debug.
2465: --disable_debug;
2466:
2467: EXCEPTION
2468: WHEN FND_API.G_EXC_ERROR THEN
2469: ROLLBACK TO update_cust_acct_site;
2470: x_return_status := FND_API.G_RET_STS_ERROR;
2471:
2472: FND_MSG_PUB.Count_And_Get(

Line 2470: x_return_status := FND_API.G_RET_STS_ERROR;

2466:
2467: EXCEPTION
2468: WHEN FND_API.G_EXC_ERROR THEN
2469: ROLLBACK TO update_cust_acct_site;
2470: x_return_status := FND_API.G_RET_STS_ERROR;
2471:
2472: FND_MSG_PUB.Count_And_Get(
2473: p_encoded => FND_API.G_FALSE,
2474: p_count => x_msg_count,

Line 2473: p_encoded => FND_API.G_FALSE,

2469: ROLLBACK TO update_cust_acct_site;
2470: x_return_status := FND_API.G_RET_STS_ERROR;
2471:
2472: FND_MSG_PUB.Count_And_Get(
2473: p_encoded => FND_API.G_FALSE,
2474: p_count => x_msg_count,
2475: p_data => x_msg_data );
2476:
2477: -- Debug info.

Line 2493: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2489:
2490: -- Check if API is called in debug mode. If yes, disable debug.
2491: --disable_debug;
2492:
2493: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2494: ROLLBACK TO update_cust_acct_site;
2495: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2496:
2497: FND_MSG_PUB.Count_And_Get(

Line 2495: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2491: --disable_debug;
2492:
2493: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2494: ROLLBACK TO update_cust_acct_site;
2495: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2496:
2497: FND_MSG_PUB.Count_And_Get(
2498: p_encoded => FND_API.G_FALSE,
2499: p_count => x_msg_count,

Line 2498: p_encoded => FND_API.G_FALSE,

2494: ROLLBACK TO update_cust_acct_site;
2495: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2496:
2497: FND_MSG_PUB.Count_And_Get(
2498: p_encoded => FND_API.G_FALSE,
2499: p_count => x_msg_count,
2500: p_data => x_msg_data );
2501:
2502: -- Debug info.

Line 2520: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2516: --disable_debug;
2517:
2518: WHEN OTHERS THEN
2519: ROLLBACK TO update_cust_acct_site;
2520: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2521:
2522: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2523: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2524: FND_MSG_PUB.ADD;

Line 2527: p_encoded => FND_API.G_FALSE,

2523: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2524: FND_MSG_PUB.ADD;
2525:
2526: FND_MSG_PUB.Count_And_Get(
2527: p_encoded => FND_API.G_FALSE,
2528: p_count => x_msg_count,
2529: p_data => x_msg_data );
2530:
2531: -- Debug info.

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

2557: *
2558: * ARGUMENTS
2559: * IN:
2560: * p_init_msg_list Initialize message stack if it is set to
2561: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2562: * p_cust_acct_site_id Customer account site id.
2563: * IN/OUT:
2564: * OUT:
2565: * x_cust_acct_site_rec Returned customer account site record.

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

2563: * IN/OUT:
2564: * OUT:
2565: * x_cust_acct_site_rec Returned customer account site record.
2566: * x_return_status Return status after the call. The status can
2567: * be FND_API.G_RET_STS_SUCCESS (success),
2568: * FND_API.G_RET_STS_ERROR (error),
2569: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2570: * x_msg_count Number of messages in message stack.
2571: * x_msg_data Message text if x_msg_count is 1.

Line 2568: * FND_API.G_RET_STS_ERROR (error),

2564: * OUT:
2565: * x_cust_acct_site_rec Returned customer account site record.
2566: * x_return_status Return status after the call. The status can
2567: * be FND_API.G_RET_STS_SUCCESS (success),
2568: * FND_API.G_RET_STS_ERROR (error),
2569: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2570: * x_msg_count Number of messages in message stack.
2571: * x_msg_data Message text if x_msg_count is 1.
2572: *

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

2565: * x_cust_acct_site_rec Returned customer account site record.
2566: * x_return_status Return status after the call. The status can
2567: * be FND_API.G_RET_STS_SUCCESS (success),
2568: * FND_API.G_RET_STS_ERROR (error),
2569: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2570: * x_msg_count Number of messages in message stack.
2571: * x_msg_data Message text if x_msg_count is 1.
2572: *
2573: * NOTES

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

2578: *
2579: */
2580:
2581: PROCEDURE get_cust_acct_site_rec (
2582: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2583: p_cust_acct_site_id IN NUMBER,
2584: x_cust_acct_site_rec OUT NOCOPY CUST_ACCT_SITE_REC_TYPE,
2585: x_return_status OUT NOCOPY VARCHAR2,
2586: x_msg_count OUT NOCOPY NUMBER,

Line 2603: IF FND_API.to_Boolean(p_init_msg_list) THEN

2599: p_msg_level=>fnd_log.level_procedure);
2600: END IF;
2601:
2602: -- Initialize message list if p_init_msg_list is set to TRUE.
2603: IF FND_API.to_Boolean(p_init_msg_list) THEN
2604: FND_MSG_PUB.initialize;
2605: END IF;
2606:
2607: -- Initialize API return status to success.

Line 2608: x_return_status := FND_API.G_RET_STS_SUCCESS;

2604: FND_MSG_PUB.initialize;
2605: END IF;
2606:
2607: -- Initialize API return status to success.
2608: x_return_status := FND_API.G_RET_STS_SUCCESS;
2609:
2610: -- Check whether primary key has been passed in.
2611: IF p_cust_acct_site_id IS NULL OR
2612: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN

Line 2612: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN

2608: x_return_status := FND_API.G_RET_STS_SUCCESS;
2609:
2610: -- Check whether primary key has been passed in.
2611: IF p_cust_acct_site_id IS NULL OR
2612: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN
2613: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
2614: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_acct_site_id' );
2615: FND_MSG_PUB.ADD;
2616: RAISE FND_API.G_EXC_ERROR;

Line 2616: RAISE FND_API.G_EXC_ERROR;

2612: p_cust_acct_site_id = FND_API.G_MISS_NUM THEN
2613: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
2614: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_acct_site_id' );
2615: FND_MSG_PUB.ADD;
2616: RAISE FND_API.G_EXC_ERROR;
2617: END IF;
2618:
2619: x_cust_acct_site_rec.cust_acct_site_id := p_cust_acct_site_id;
2620:

Line 2701: p_encoded => FND_API.G_FALSE,

2697: END IF;
2698:
2699: -- Standard call to get message count and if count is 1, get message info.
2700: FND_MSG_PUB.Count_And_Get(
2701: p_encoded => FND_API.G_FALSE,
2702: p_count => x_msg_count,
2703: p_data => x_msg_data );
2704:
2705: -- Debug info.

Line 2722: WHEN FND_API.G_EXC_ERROR THEN

2718: -- Check if API is called in debug mode. If yes, disable debug.
2719: --disable_debug;
2720:
2721: EXCEPTION
2722: WHEN FND_API.G_EXC_ERROR THEN
2723: x_return_status := FND_API.G_RET_STS_ERROR;
2724:
2725: FND_MSG_PUB.Count_And_Get(
2726: p_encoded => FND_API.G_FALSE,

Line 2723: x_return_status := FND_API.G_RET_STS_ERROR;

2719: --disable_debug;
2720:
2721: EXCEPTION
2722: WHEN FND_API.G_EXC_ERROR THEN
2723: x_return_status := FND_API.G_RET_STS_ERROR;
2724:
2725: FND_MSG_PUB.Count_And_Get(
2726: p_encoded => FND_API.G_FALSE,
2727: p_count => x_msg_count,

Line 2726: p_encoded => FND_API.G_FALSE,

2722: WHEN FND_API.G_EXC_ERROR THEN
2723: x_return_status := FND_API.G_RET_STS_ERROR;
2724:
2725: FND_MSG_PUB.Count_And_Get(
2726: p_encoded => FND_API.G_FALSE,
2727: p_count => x_msg_count,
2728: p_data => x_msg_data );
2729:
2730: -- Debug info.

Line 2746: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2742:
2743: -- Check if API is called in debug mode. If yes, disable debug.
2744: --disable_debug;
2745:
2746: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2747: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2748:
2749: FND_MSG_PUB.Count_And_Get(
2750: p_encoded => FND_API.G_FALSE,

Line 2747: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2743: -- Check if API is called in debug mode. If yes, disable debug.
2744: --disable_debug;
2745:
2746: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2747: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2748:
2749: FND_MSG_PUB.Count_And_Get(
2750: p_encoded => FND_API.G_FALSE,
2751: p_count => x_msg_count,

Line 2750: p_encoded => FND_API.G_FALSE,

2746: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2747: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2748:
2749: FND_MSG_PUB.Count_And_Get(
2750: p_encoded => FND_API.G_FALSE,
2751: p_count => x_msg_count,
2752: p_data => x_msg_data );
2753:
2754: -- Debug info.

Line 2771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2767: -- Check if API is called in debug mode. If yes, disable debug.
2768: --disable_debug;
2769:
2770: WHEN OTHERS THEN
2771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2772:
2773: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2774: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2775: FND_MSG_PUB.ADD;

Line 2778: p_encoded => FND_API.G_FALSE,

2774: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2775: FND_MSG_PUB.ADD;
2776:
2777: FND_MSG_PUB.Count_And_Get(
2778: p_encoded => FND_API.G_FALSE,
2779: p_count => x_msg_count,
2780: p_data => x_msg_data );
2781:
2782: -- Debug info.

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

2808: *
2809: * ARGUMENTS
2810: * IN:
2811: * p_init_msg_list Initialize message stack if it is set to
2812: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2813: * p_cust_site_use_rec Customer account site use record.
2814: * p_customer_profile_rec Customer profile record. One customer account
2815: * must have a customer profile.
2816: * p_create_profile If it is set to FND_API.G_TRUE, API create customer

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

2812: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2813: * p_cust_site_use_rec Customer account site use record.
2814: * p_customer_profile_rec Customer profile record. One customer account
2815: * must have a customer profile.
2816: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
2817: * profile based on the customer profile record passed
2818: * in.
2819: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
2820: * profile amounts by copying corresponding data

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

2815: * must have a customer profile.
2816: * p_create_profile If it is set to FND_API.G_TRUE, API create customer
2817: * profile based on the customer profile record passed
2818: * in.
2819: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
2820: * profile amounts by copying corresponding data
2821: * from customer profile class amounts.
2822: * IN/OUT:
2823: * OUT:

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

2822: * IN/OUT:
2823: * OUT:
2824: * x_site_use_id Customer account site use ID.
2825: * x_return_status Return status after the call. The status can
2826: * be FND_API.G_RET_STS_SUCCESS (success),
2827: * FND_API.G_RET_STS_ERROR (error),
2828: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2829: * x_msg_count Number of messages in message stack.
2830: * x_msg_data Message text if x_msg_count is 1.

Line 2827: * FND_API.G_RET_STS_ERROR (error),

2823: * OUT:
2824: * x_site_use_id Customer account site use ID.
2825: * x_return_status Return status after the call. The status can
2826: * be FND_API.G_RET_STS_SUCCESS (success),
2827: * FND_API.G_RET_STS_ERROR (error),
2828: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2829: * x_msg_count Number of messages in message stack.
2830: * x_msg_data Message text if x_msg_count is 1.
2831: *

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

2824: * x_site_use_id Customer account site use ID.
2825: * x_return_status Return status after the call. The status can
2826: * be FND_API.G_RET_STS_SUCCESS (success),
2827: * FND_API.G_RET_STS_ERROR (error),
2828: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2829: * x_msg_count Number of messages in message stack.
2830: * x_msg_data Message text if x_msg_count is 1.
2831: *
2832: * NOTES

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

2837: *
2838: */
2839:
2840: PROCEDURE create_cust_site_use (
2841: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2842: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2843: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2844: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
2845: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

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

2840: PROCEDURE create_cust_site_use (
2841: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2842: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2843: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2844: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
2845: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
2846: x_site_use_id OUT NOCOPY NUMBER,
2847: x_return_status OUT NOCOPY VARCHAR2,
2848: x_msg_count OUT NOCOPY NUMBER,

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

2841: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2842: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
2843: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2844: p_create_profile IN VARCHAR2 := FND_API.G_TRUE,
2845: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
2846: x_site_use_id OUT NOCOPY NUMBER,
2847: x_return_status OUT NOCOPY VARCHAR2,
2848: x_msg_count OUT NOCOPY NUMBER,
2849: x_msg_data OUT NOCOPY VARCHAR2

Line 2872: IF FND_API.to_Boolean(p_init_msg_list) THEN

2868: p_msg_level=>fnd_log.level_procedure);
2869: END IF;
2870:
2871: -- Initialize message list if p_init_msg_list is set to TRUE.
2872: IF FND_API.to_Boolean(p_init_msg_list) THEN
2873: FND_MSG_PUB.initialize;
2874: END IF;
2875:
2876: -- Initialize API return status to success.

Line 2877: x_return_status := FND_API.G_RET_STS_SUCCESS;

2873: FND_MSG_PUB.initialize;
2874: END IF;
2875:
2876: -- Initialize API return status to success.
2877: x_return_status := FND_API.G_RET_STS_SUCCESS;
2878: -- Call to business logic.
2879: do_create_cust_site_use (
2880: l_cust_site_use_rec,
2881: l_customer_profile_rec,

Line 2887: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2883: p_create_profile_amt,
2884: x_site_use_id,
2885: x_return_status );
2886:
2887: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2888: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
2889: -- Invoke business event system.
2890: HZ_BUSINESS_EVENT_V2PVT.create_cust_site_use_event (
2891: l_cust_site_use_rec,

Line 2907: p_encoded => FND_API.G_FALSE,

2903: END IF;
2904:
2905: -- Standard call to get message count and if count is 1, get message info.
2906: FND_MSG_PUB.Count_And_Get(
2907: p_encoded => FND_API.G_FALSE,
2908: p_count => x_msg_count,
2909: p_data => x_msg_data );
2910:
2911: -- Debug info.

Line 2927: WHEN FND_API.G_EXC_ERROR THEN

2923: -- Check if API is called in debug mode. If yes, disable debug.
2924: --disable_debug;
2925:
2926: EXCEPTION
2927: WHEN FND_API.G_EXC_ERROR THEN
2928: ROLLBACK TO create_cust_site_use;
2929: x_return_status := FND_API.G_RET_STS_ERROR;
2930:
2931: FND_MSG_PUB.Count_And_Get(

Line 2929: x_return_status := FND_API.G_RET_STS_ERROR;

2925:
2926: EXCEPTION
2927: WHEN FND_API.G_EXC_ERROR THEN
2928: ROLLBACK TO create_cust_site_use;
2929: x_return_status := FND_API.G_RET_STS_ERROR;
2930:
2931: FND_MSG_PUB.Count_And_Get(
2932: p_encoded => FND_API.G_FALSE,
2933: p_count => x_msg_count,

Line 2932: p_encoded => FND_API.G_FALSE,

2928: ROLLBACK TO create_cust_site_use;
2929: x_return_status := FND_API.G_RET_STS_ERROR;
2930:
2931: FND_MSG_PUB.Count_And_Get(
2932: p_encoded => FND_API.G_FALSE,
2933: p_count => x_msg_count,
2934: p_data => x_msg_data );
2935:
2936: -- Debug info.

Line 2952: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2948:
2949: -- Check if API is called in debug mode. If yes, disable debug.
2950: --disable_debug;
2951:
2952: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2953: ROLLBACK TO create_cust_site_use;
2954: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2955:
2956: FND_MSG_PUB.Count_And_Get(

Line 2954: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2950: --disable_debug;
2951:
2952: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2953: ROLLBACK TO create_cust_site_use;
2954: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2955:
2956: FND_MSG_PUB.Count_And_Get(
2957: p_encoded => FND_API.G_FALSE,
2958: p_count => x_msg_count,

Line 2957: p_encoded => FND_API.G_FALSE,

2953: ROLLBACK TO create_cust_site_use;
2954: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2955:
2956: FND_MSG_PUB.Count_And_Get(
2957: p_encoded => FND_API.G_FALSE,
2958: p_count => x_msg_count,
2959: p_data => x_msg_data );
2960:
2961: -- Debug info.

Line 2979: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2975: --disable_debug;
2976:
2977: WHEN OTHERS THEN
2978: ROLLBACK TO create_cust_site_use;
2979: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2980:
2981: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2982: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2983: FND_MSG_PUB.ADD;

Line 2986: p_encoded => FND_API.G_FALSE,

2982: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2983: FND_MSG_PUB.ADD;
2984:
2985: FND_MSG_PUB.Count_And_Get(
2986: p_encoded => FND_API.G_FALSE,
2987: p_count => x_msg_count,
2988: p_data => x_msg_data );
2989:
2990: -- Debug info.

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

3016: *
3017: * ARGUMENTS
3018: * IN:
3019: * p_init_msg_list Initialize message stack if it is set to
3020: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
3021: * p_cust_site_use_rec Customer account site use record.
3022: * IN/OUT:
3023: * p_object_version_number Used for locking the being updated record.
3024: * OUT:

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

3022: * IN/OUT:
3023: * p_object_version_number Used for locking the being updated record.
3024: * OUT:
3025: * x_return_status Return status after the call. The status can
3026: * be FND_API.G_RET_STS_SUCCESS (success),
3027: * FND_API.G_RET_STS_ERROR (error),
3028: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3029: * x_msg_count Number of messages in message stack.
3030: * x_msg_data Message text if x_msg_count is 1.

Line 3027: * FND_API.G_RET_STS_ERROR (error),

3023: * p_object_version_number Used for locking the being updated record.
3024: * OUT:
3025: * x_return_status Return status after the call. The status can
3026: * be FND_API.G_RET_STS_SUCCESS (success),
3027: * FND_API.G_RET_STS_ERROR (error),
3028: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3029: * x_msg_count Number of messages in message stack.
3030: * x_msg_data Message text if x_msg_count is 1.
3031: *

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

3024: * OUT:
3025: * x_return_status Return status after the call. The status can
3026: * be FND_API.G_RET_STS_SUCCESS (success),
3027: * FND_API.G_RET_STS_ERROR (error),
3028: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3029: * x_msg_count Number of messages in message stack.
3030: * x_msg_data Message text if x_msg_count is 1.
3031: *
3032: * NOTES

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

3037: *
3038: */
3039:
3040: PROCEDURE update_cust_site_use (
3041: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3042: p_cust_site_use_rec IN CUST_SITE_USE_REC_TYPE,
3043: p_object_version_number IN OUT NOCOPY NUMBER,
3044: x_return_status OUT NOCOPY VARCHAR2,
3045: x_msg_count OUT NOCOPY NUMBER,

Line 3070: IF FND_API.to_Boolean(p_init_msg_list) THEN

3066: p_msg_level=>fnd_log.level_procedure);
3067: END IF;
3068:
3069: -- Initialize message list if p_init_msg_list is set to TRUE.
3070: IF FND_API.to_Boolean(p_init_msg_list) THEN
3071: FND_MSG_PUB.initialize;
3072: END IF;
3073:
3074: -- Initialize API return status to success.

Line 3075: x_return_status := FND_API.G_RET_STS_SUCCESS;

3071: FND_MSG_PUB.initialize;
3072: END IF;
3073:
3074: -- Initialize API return status to success.
3075: x_return_status := FND_API.G_RET_STS_SUCCESS;
3076:
3077: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
3078: 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)
3079: 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 3077: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)

3073:
3074: -- Initialize API return status to success.
3075: x_return_status := FND_API.G_RET_STS_SUCCESS;
3076:
3077: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
3078: 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)
3079: 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
3080: hz_orig_system_ref_pub.get_owner_table_id
3081: (p_orig_system => p_cust_site_use_rec.orig_system,

Line 3078: 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)

3074: -- Initialize API return status to success.
3075: x_return_status := FND_API.G_RET_STS_SUCCESS;
3076:
3077: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
3078: 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)
3079: 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
3080: hz_orig_system_ref_pub.get_owner_table_id
3081: (p_orig_system => p_cust_site_use_rec.orig_system,
3082: p_orig_system_reference => p_cust_site_use_rec.orig_system_reference,

Line 3079: 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

3075: x_return_status := FND_API.G_RET_STS_SUCCESS;
3076:
3077: IF (p_cust_site_use_rec.orig_system is not null and p_cust_site_use_rec.orig_system <>fnd_api.g_miss_char)
3078: 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)
3079: 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
3080: hz_orig_system_ref_pub.get_owner_table_id
3081: (p_orig_system => p_cust_site_use_rec.orig_system,
3082: p_orig_system_reference => p_cust_site_use_rec.orig_system_reference,
3083: p_owner_table_name => 'HZ_CUST_SITE_USES_ALL',

Line 3086: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3082: p_orig_system_reference => p_cust_site_use_rec.orig_system_reference,
3083: p_owner_table_name => 'HZ_CUST_SITE_USES_ALL',
3084: x_owner_table_id => l_cust_site_use_rec.site_use_id ,
3085: x_return_status => x_return_status);
3086: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3087: RAISE FND_API.G_EXC_ERROR;
3088: END IF;
3089:
3090: END IF;

Line 3087: RAISE FND_API.G_EXC_ERROR;

3083: p_owner_table_name => 'HZ_CUST_SITE_USES_ALL',
3084: x_owner_table_id => l_cust_site_use_rec.site_use_id ,
3085: x_return_status => x_return_status);
3086: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3087: RAISE FND_API.G_EXC_ERROR;
3088: END IF;
3089:
3090: END IF;
3091:

Line 3101: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

3097: x_return_status => x_return_status,
3098: x_msg_count => x_msg_count,
3099: x_msg_data => x_msg_data);
3100:
3101: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3102: RAISE FND_API.G_EXC_ERROR;
3103: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3105: END IF;

Line 3102: RAISE FND_API.G_EXC_ERROR;

3098: x_msg_count => x_msg_count,
3099: x_msg_data => x_msg_data);
3100:
3101: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3102: RAISE FND_API.G_EXC_ERROR;
3103: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3105: END IF;
3106:

Line 3103: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

3099: x_msg_data => x_msg_data);
3100:
3101: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3102: RAISE FND_API.G_EXC_ERROR;
3103: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3105: END IF;
3106:
3107: -- Call to business logic.

Line 3104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3100:
3101: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3102: RAISE FND_API.G_EXC_ERROR;
3103: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3105: END IF;
3106:
3107: -- Call to business logic.
3108: do_update_cust_site_use (

Line 3113: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

3109: l_cust_site_use_rec,
3110: p_object_version_number,
3111: x_return_status );
3112:
3113: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
3114: l_old_cust_site_use_rec.orig_system := l_cust_site_use_rec.orig_system;
3115: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('EVENTS_ENABLED', 'Y')) THEN
3116: -- Invoke business event system.
3117: HZ_BUSINESS_EVENT_V2PVT.update_cust_site_use_event (

Line 3131: p_encoded => FND_API.G_FALSE,

3127: END IF;
3128:
3129: -- Standard call to get message count and if count is 1, get message info.
3130: FND_MSG_PUB.Count_And_Get(
3131: p_encoded => FND_API.G_FALSE,
3132: p_count => x_msg_count,
3133: p_data => x_msg_data );
3134:
3135: -- Debug info.

Line 3152: WHEN FND_API.G_EXC_ERROR THEN

3148: -- Check if API is called in debug mode. If yes, disable debug.
3149: --disable_debug;
3150:
3151: EXCEPTION
3152: WHEN FND_API.G_EXC_ERROR THEN
3153: ROLLBACK TO update_cust_site_use;
3154: x_return_status := FND_API.G_RET_STS_ERROR;
3155:
3156: FND_MSG_PUB.Count_And_Get(

Line 3154: x_return_status := FND_API.G_RET_STS_ERROR;

3150:
3151: EXCEPTION
3152: WHEN FND_API.G_EXC_ERROR THEN
3153: ROLLBACK TO update_cust_site_use;
3154: x_return_status := FND_API.G_RET_STS_ERROR;
3155:
3156: FND_MSG_PUB.Count_And_Get(
3157: p_encoded => FND_API.G_FALSE,
3158: p_count => x_msg_count,

Line 3157: p_encoded => FND_API.G_FALSE,

3153: ROLLBACK TO update_cust_site_use;
3154: x_return_status := FND_API.G_RET_STS_ERROR;
3155:
3156: FND_MSG_PUB.Count_And_Get(
3157: p_encoded => FND_API.G_FALSE,
3158: p_count => x_msg_count,
3159: p_data => x_msg_data );
3160:
3161: -- Debug info.

Line 3177: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3173:
3174: -- Check if API is called in debug mode. If yes, disable debug.
3175: --disable_debug;
3176:
3177: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3178: ROLLBACK TO update_cust_site_use;
3179: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3180:
3181: FND_MSG_PUB.Count_And_Get(

Line 3179: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3175: --disable_debug;
3176:
3177: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3178: ROLLBACK TO update_cust_site_use;
3179: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3180:
3181: FND_MSG_PUB.Count_And_Get(
3182: p_encoded => FND_API.G_FALSE,
3183: p_count => x_msg_count,

Line 3182: p_encoded => FND_API.G_FALSE,

3178: ROLLBACK TO update_cust_site_use;
3179: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3180:
3181: FND_MSG_PUB.Count_And_Get(
3182: p_encoded => FND_API.G_FALSE,
3183: p_count => x_msg_count,
3184: p_data => x_msg_data );
3185:
3186: -- Debug info.

Line 3204: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3200: --disable_debug;
3201:
3202: WHEN OTHERS THEN
3203: ROLLBACK TO update_cust_site_use;
3204: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3205:
3206: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3207: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3208: FND_MSG_PUB.ADD;

Line 3211: p_encoded => FND_API.G_FALSE,

3207: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3208: FND_MSG_PUB.ADD;
3209:
3210: FND_MSG_PUB.Count_And_Get(
3211: p_encoded => FND_API.G_FALSE,
3212: p_count => x_msg_count,
3213: p_data => x_msg_data );
3214:
3215: -- Debug info.

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

3241: *
3242: * ARGUMENTS
3243: * IN:
3244: * p_init_msg_list Initialize message stack if it is set to
3245: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
3246: * p_cust_site_use_id Customer account site use id.
3247: * IN/OUT:
3248: * OUT:
3249: * x_cust_site_use_rec Returned customer account site use record.

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

3248: * OUT:
3249: * x_cust_site_use_rec Returned customer account site use record.
3250: * x_customer_profile_rec Returned customer profile record.
3251: * x_return_status Return status after the call. The status can
3252: * be FND_API.G_RET_STS_SUCCESS (success),
3253: * FND_API.G_RET_STS_ERROR (error),
3254: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3255: * x_msg_count Number of messages in message stack.
3256: * x_msg_data Message text if x_msg_count is 1.

Line 3253: * FND_API.G_RET_STS_ERROR (error),

3249: * x_cust_site_use_rec Returned customer account site use record.
3250: * x_customer_profile_rec Returned customer profile record.
3251: * x_return_status Return status after the call. The status can
3252: * be FND_API.G_RET_STS_SUCCESS (success),
3253: * FND_API.G_RET_STS_ERROR (error),
3254: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3255: * x_msg_count Number of messages in message stack.
3256: * x_msg_data Message text if x_msg_count is 1.
3257: *

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

3250: * x_customer_profile_rec Returned customer profile record.
3251: * x_return_status Return status after the call. The status can
3252: * be FND_API.G_RET_STS_SUCCESS (success),
3253: * FND_API.G_RET_STS_ERROR (error),
3254: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3255: * x_msg_count Number of messages in message stack.
3256: * x_msg_data Message text if x_msg_count is 1.
3257: *
3258: * NOTES

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

3263: *
3264: */
3265:
3266: PROCEDURE get_cust_site_use_rec (
3267: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3268: p_site_use_id IN NUMBER,
3269: x_cust_site_use_rec OUT NOCOPY CUST_SITE_USE_REC_TYPE,
3270: x_customer_profile_rec OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
3271: x_return_status OUT NOCOPY VARCHAR2,

Line 3292: IF FND_API.to_Boolean(p_init_msg_list) THEN

3288: p_msg_level=>fnd_log.level_procedure);
3289: END IF;
3290:
3291: -- Initialize message list if p_init_msg_list is set to TRUE.
3292: IF FND_API.to_Boolean(p_init_msg_list) THEN
3293: FND_MSG_PUB.initialize;
3294: END IF;
3295:
3296: -- Initialize API return status to success.

Line 3297: x_return_status := FND_API.G_RET_STS_SUCCESS;

3293: FND_MSG_PUB.initialize;
3294: END IF;
3295:
3296: -- Initialize API return status to success.
3297: x_return_status := FND_API.G_RET_STS_SUCCESS;
3298:
3299: -- Check whether primary key has been passed in.
3300: IF p_site_use_id IS NULL OR
3301: p_site_use_id = FND_API.G_MISS_NUM THEN

Line 3301: p_site_use_id = FND_API.G_MISS_NUM THEN

3297: x_return_status := FND_API.G_RET_STS_SUCCESS;
3298:
3299: -- Check whether primary key has been passed in.
3300: IF p_site_use_id IS NULL OR
3301: p_site_use_id = FND_API.G_MISS_NUM THEN
3302: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3303: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'site_use_id' );
3304: FND_MSG_PUB.ADD;
3305: RAISE FND_API.G_EXC_ERROR;

Line 3305: RAISE FND_API.G_EXC_ERROR;

3301: p_site_use_id = FND_API.G_MISS_NUM THEN
3302: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3303: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'site_use_id' );
3304: FND_MSG_PUB.ADD;
3305: RAISE FND_API.G_EXC_ERROR;
3306: END IF;
3307:
3308: x_cust_site_use_rec.site_use_id := p_site_use_id;
3309:

Line 3442: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3438: x_return_status => x_return_status,
3439: x_msg_count => x_msg_count,
3440: x_msg_data => x_msg_data );
3441:
3442: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3443: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3444: RAISE FND_API.G_EXC_ERROR;
3445: ELSE
3446: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 3443: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

3439: x_msg_count => x_msg_count,
3440: x_msg_data => x_msg_data );
3441:
3442: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3443: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3444: RAISE FND_API.G_EXC_ERROR;
3445: ELSE
3446: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3447: END IF;

Line 3444: RAISE FND_API.G_EXC_ERROR;

3440: x_msg_data => x_msg_data );
3441:
3442: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3443: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3444: RAISE FND_API.G_EXC_ERROR;
3445: ELSE
3446: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3447: END IF;
3448: END IF;

Line 3446: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3442: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3443: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3444: RAISE FND_API.G_EXC_ERROR;
3445: ELSE
3446: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3447: END IF;
3448: END IF;
3449: EXCEPTION
3450: WHEN NO_DATA_FOUND THEN

Line 3456: p_encoded => FND_API.G_FALSE,

3452: END;
3453:
3454: -- Standard call to get message count and if count is 1, get message info.
3455: FND_MSG_PUB.Count_And_Get(
3456: p_encoded => FND_API.G_FALSE,
3457: p_count => x_msg_count,
3458: p_data => x_msg_data );
3459:
3460: -- Debug info.

Line 3477: WHEN FND_API.G_EXC_ERROR THEN

3473: -- Check if API is called in debug mode. If yes, disable debug.
3474: --disable_debug;
3475:
3476: EXCEPTION
3477: WHEN FND_API.G_EXC_ERROR THEN
3478: x_return_status := FND_API.G_RET_STS_ERROR;
3479:
3480: FND_MSG_PUB.Count_And_Get(
3481: p_encoded => FND_API.G_FALSE,

Line 3478: x_return_status := FND_API.G_RET_STS_ERROR;

3474: --disable_debug;
3475:
3476: EXCEPTION
3477: WHEN FND_API.G_EXC_ERROR THEN
3478: x_return_status := FND_API.G_RET_STS_ERROR;
3479:
3480: FND_MSG_PUB.Count_And_Get(
3481: p_encoded => FND_API.G_FALSE,
3482: p_count => x_msg_count,

Line 3481: p_encoded => FND_API.G_FALSE,

3477: WHEN FND_API.G_EXC_ERROR THEN
3478: x_return_status := FND_API.G_RET_STS_ERROR;
3479:
3480: FND_MSG_PUB.Count_And_Get(
3481: p_encoded => FND_API.G_FALSE,
3482: p_count => x_msg_count,
3483: p_data => x_msg_data );
3484:
3485: -- Debug info.

Line 3501: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3497:
3498: -- Check if API is called in debug mode. If yes, disable debug.
3499: --disable_debug;
3500:
3501: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3502: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3503:
3504: FND_MSG_PUB.Count_And_Get(
3505: p_encoded => FND_API.G_FALSE,

Line 3502: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3498: -- Check if API is called in debug mode. If yes, disable debug.
3499: --disable_debug;
3500:
3501: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3502: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3503:
3504: FND_MSG_PUB.Count_And_Get(
3505: p_encoded => FND_API.G_FALSE,
3506: p_count => x_msg_count,

Line 3505: p_encoded => FND_API.G_FALSE,

3501: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3502: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3503:
3504: FND_MSG_PUB.Count_And_Get(
3505: p_encoded => FND_API.G_FALSE,
3506: p_count => x_msg_count,
3507: p_data => x_msg_data );
3508:
3509: -- Debug info.

Line 3526: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3522: -- Check if API is called in debug mode. If yes, disable debug.
3523: --disable_debug;
3524:
3525: WHEN OTHERS THEN
3526: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3527:
3528: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3529: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3530: FND_MSG_PUB.ADD;

Line 3533: p_encoded => FND_API.G_FALSE,

3529: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3530: FND_MSG_PUB.ADD;
3531:
3532: FND_MSG_PUB.Count_And_Get(
3533: p_encoded => FND_API.G_FALSE,
3534: p_count => x_msg_count,
3535: p_data => x_msg_data );
3536:
3537: -- Debug info.

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

3577:
3578: -- check language
3579: IF (p_create_update_flag = 'C' AND
3580: p_account_site_rec.language IS NOT NULL AND
3581: p_account_site_rec.language <> FND_API.G_MISS_CHAR) OR
3582: (p_create_update_flag = 'U' AND
3583: p_account_site_rec.language IS NOT NULL AND
3584: p_account_site_rec.language <> p_old_account_site_rec.language)
3585: THEN

Line 3589: x_return_status := FND_API.G_RET_STS_ERROR;

3585: THEN
3586: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3587: FND_MESSAGE.SET_TOKEN('COLUMN', 'language');
3588: FND_MSG_PUB.ADD;
3589: x_return_status := FND_API.G_RET_STS_ERROR;
3590: END IF;
3591:
3592: END check_obsolete_columns;
3593: