DBA Data[Home] [Help]

APPS.HZ_CUST_ACCOUNT_V2PUB dependencies on FND_API

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

23: p_cust_account_rec IN OUT NOCOPY CUST_ACCOUNT_REC_TYPE,
24: p_person_rec IN OUT NOCOPY HZ_PARTY_V2PUB.PERSON_REC_TYPE,
25: p_organization_rec IN OUT NOCOPY HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE,
26: p_customer_profile_rec IN OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
27: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
28: x_cust_account_id OUT NOCOPY NUMBER,
29: x_account_number OUT NOCOPY VARCHAR2,
30: x_party_id OUT NOCOPY NUMBER,
31: x_party_number OUT NOCOPY VARCHAR2,

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

142: *
143: * ARGUMENTS
144: * IN:
145: * p_entity_type Either 'PERSON' or 'ORGANIZATION'.
146: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
147: * profile amounts by copying corresponding data
148: * from customer profile class amounts.
149: * IN/OUT:
150: * p_cust_account_rec Customer account record.

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

158: * API ceates a organization party based on this record.
159: * p_customer_profile_rec Customer profile record. One customer account
160: * must have a customer profile.
161: * x_return_status Return status after the call. The status can
162: * be FND_API.G_RET_STS_SUCCESS (success),
163: * FND_API.G_RET_STS_ERROR (error),
164: * OUT:
165: * x_cust_account_id Customer account ID.
166: * x_account_number Customer account number.

Line 163: * FND_API.G_RET_STS_ERROR (error),

159: * p_customer_profile_rec Customer profile record. One customer account
160: * must have a customer profile.
161: * x_return_status Return status after the call. The status can
162: * be FND_API.G_RET_STS_SUCCESS (success),
163: * FND_API.G_RET_STS_ERROR (error),
164: * OUT:
165: * x_cust_account_id Customer account ID.
166: * x_account_number Customer account number.
167: * x_party_id Party ID of the party which this account belongs to.

Line 247: if (p_cust_account_rec.orig_system is null OR p_cust_account_rec.orig_system = fnd_api.g_miss_char)

243: p_prefix=>l_debug_prefix,
244: p_msg_level=>fnd_log.level_procedure);
245: END IF;
246:
247: if (p_cust_account_rec.orig_system is null OR p_cust_account_rec.orig_system = fnd_api.g_miss_char)
248: and (p_cust_account_rec.orig_system_reference is not null and
249: p_cust_account_rec.orig_system_reference <> fnd_api.g_miss_char)
250: then
251: p_cust_account_rec.orig_system := 'UNKNOWN';

Line 249: p_cust_account_rec.orig_system_reference <> fnd_api.g_miss_char)

245: END IF;
246:
247: if (p_cust_account_rec.orig_system is null OR p_cust_account_rec.orig_system = fnd_api.g_miss_char)
248: and (p_cust_account_rec.orig_system_reference is not null and
249: p_cust_account_rec.orig_system_reference <> fnd_api.g_miss_char)
250: then
251: p_cust_account_rec.orig_system := 'UNKNOWN';
252: end if;
253:

Line 270: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

266: p_cust_account_rec => p_cust_account_rec,
267: p_rowid => NULL,
268: x_return_status => x_return_status );
269:
270: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
271: RAISE FND_API.G_EXC_ERROR;
272: END IF;
273:
274: -- Check if account is being create for an existing party.

Line 271: RAISE FND_API.G_EXC_ERROR;

267: p_rowid => NULL,
268: x_return_status => x_return_status );
269:
270: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
271: RAISE FND_API.G_EXC_ERROR;
272: END IF;
273:
274: -- Check if account is being create for an existing party.
275: -- Otherwise, create a new party and an account for this party.

Line 284: l_party_id <> FND_API.G_MISS_NUM

280: l_party_id := p_organization_rec.party_rec.party_id;
281: END IF;
282:
283: IF l_party_id IS NOT NULL AND
284: l_party_id <> FND_API.G_MISS_NUM
285: THEN
286: BEGIN
287: SELECT party_type INTO l_party_type
288: FROM HZ_PARTIES

Line 296: RAISE FND_API.G_EXC_ERROR;

292: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_INVALID_PARTY_TYPE' );
293: FND_MESSAGE.SET_TOKEN( 'PARTY_ID', l_party_id);
294: FND_MESSAGE.SET_TOKEN( 'TYPE', p_entity_type);
295: FND_MSG_PUB.ADD;
296: RAISE FND_API.G_EXC_ERROR;
297: END IF;
298:
299: -- can go ahead and create an account for this existing party.
300:

Line 314: p_person_rec.party_rec.orig_system_reference <> FND_API.G_MISS_CHAR AND

310: */
311:
312: IF p_entity_type = 'PERSON' THEN
313: IF p_person_rec.party_rec.orig_system_reference IS NOT NULL AND
314: p_person_rec.party_rec.orig_system_reference <> FND_API.G_MISS_CHAR AND
315: p_person_rec.party_rec.orig_system IS NOT NULL AND
316: p_person_rec.party_rec.orig_system <> FND_API.G_MISS_CHAR THEN
317:
318: BEGIN

Line 316: p_person_rec.party_rec.orig_system <> FND_API.G_MISS_CHAR THEN

312: IF p_entity_type = 'PERSON' THEN
313: IF p_person_rec.party_rec.orig_system_reference IS NOT NULL AND
314: p_person_rec.party_rec.orig_system_reference <> FND_API.G_MISS_CHAR AND
315: p_person_rec.party_rec.orig_system IS NOT NULL AND
316: p_person_rec.party_rec.orig_system <> FND_API.G_MISS_CHAR THEN
317:
318: BEGIN
319: SELECT owner_table_id /* party_id would also do */
320: INTO l_party_id

Line 340: RAISE FND_API.G_EXC_ERROR;

336: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_INVALID_PARTY_TYPE' );
337: FND_MESSAGE.SET_TOKEN( 'PARTY_ID', l_party_id);
338: FND_MESSAGE.SET_TOKEN( 'TYPE', p_entity_type);
339: FND_MSG_PUB.ADD;
340: RAISE FND_API.G_EXC_ERROR;
341: END IF;
342: EXCEPTION
343: WHEN NO_DATA_FOUND THEN
344: l_create_party := TRUE;

Line 352: p_organization_rec.party_rec.orig_system_reference <> FND_API.G_MISS_CHAR AND

348: END IF;
349:
350: ELSE -- i.e. p_entity_type = 'ORGANIZATION'
351: IF p_organization_rec.party_rec.orig_system_reference IS NOT NULL AND
352: p_organization_rec.party_rec.orig_system_reference <> FND_API.G_MISS_CHAR AND
353: p_organization_rec.party_rec.orig_system IS NOT NULL AND
354: p_organization_rec.party_rec.orig_system <> FND_API.G_MISS_CHAR THEN
355:
356: BEGIN

Line 354: p_organization_rec.party_rec.orig_system <> FND_API.G_MISS_CHAR THEN

350: ELSE -- i.e. p_entity_type = 'ORGANIZATION'
351: IF p_organization_rec.party_rec.orig_system_reference IS NOT NULL AND
352: p_organization_rec.party_rec.orig_system_reference <> FND_API.G_MISS_CHAR AND
353: p_organization_rec.party_rec.orig_system IS NOT NULL AND
354: p_organization_rec.party_rec.orig_system <> FND_API.G_MISS_CHAR THEN
355:
356: BEGIN
357: SELECT owner_table_id /* party_id would also do */
358: INTO l_party_id

Line 378: RAISE FND_API.G_EXC_ERROR;

374: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_INVALID_PARTY_TYPE' );
375: FND_MESSAGE.SET_TOKEN( 'PARTY_ID', l_party_id);
376: FND_MESSAGE.SET_TOKEN( 'TYPE', p_entity_type);
377: FND_MSG_PUB.ADD;
378: RAISE FND_API.G_EXC_ERROR;
379: END IF;
380: EXCEPTION
381: WHEN NO_DATA_FOUND THEN
382: l_create_party := TRUE;

Line 436: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

432: x_msg_count => l_msg_count,
433: x_msg_data => l_msg_data );
434: END IF;
435:
436: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
437: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
438: RAISE FND_API.G_EXC_ERROR;
439: ELSE
440: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 437: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

433: x_msg_data => l_msg_data );
434: END IF;
435:
436: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
437: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
438: RAISE FND_API.G_EXC_ERROR;
439: ELSE
440: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
441: END IF;

Line 438: RAISE FND_API.G_EXC_ERROR;

434: END IF;
435:
436: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
437: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
438: RAISE FND_API.G_EXC_ERROR;
439: ELSE
440: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
441: END IF;
442: END IF;

Line 440: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

436: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
437: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
438: RAISE FND_API.G_EXC_ERROR;
439: ELSE
440: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
441: END IF;
442: END IF;
443:
444: l_party_usg_validation_level := HZ_PARTY_USG_ASSIGNMENT_PVT.G_VALID_LEVEL_NONE;

Line 587: if (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)

583: p_prefix=>l_debug_prefix,
584: p_msg_level=>fnd_log.level_procedure);
585: END IF;
586:
587: if (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
588: then
589: l_orig_system_ref_rec.orig_system := p_cust_account_rec.orig_system;
590: l_orig_system_ref_rec.orig_system_reference := l_orig_system_reference;
591: l_orig_system_ref_rec.owner_table_name := 'HZ_CUST_ACCOUNTS';

Line 596: FND_API.G_FALSE,

592: l_orig_system_ref_rec.owner_table_id := p_cust_account_rec.cust_account_id;
593: l_orig_system_ref_rec.created_by_module := p_cust_account_rec.created_by_module;
594:
595: hz_orig_system_ref_pub.create_orig_system_reference(
596: FND_API.G_FALSE,
597: l_orig_system_ref_rec,
598: x_return_status,
599: l_msg_count,
600: l_msg_data);

Line 601: IF x_return_status <> fnd_api.g_ret_sts_success THEN

597: l_orig_system_ref_rec,
598: x_return_status,
599: l_msg_count,
600: l_msg_data);
601: IF x_return_status <> fnd_api.g_ret_sts_success THEN
602: RAISE FND_API.G_EXC_ERROR;
603: END IF;
604:
605: end if;

Line 602: RAISE FND_API.G_EXC_ERROR;

598: x_return_status,
599: l_msg_count,
600: l_msg_data);
601: IF x_return_status <> fnd_api.g_ret_sts_success THEN
602: RAISE FND_API.G_EXC_ERROR;
603: END IF;
604:
605: end if;
606:

Line 626: p_customer_profile_rec.site_use_id <> FND_API.G_MISS_NUM

622: --bug 2310474: add party_id for Cust Account Profile
623: p_customer_profile_rec.party_id := l_party_id;
624:
625: IF p_customer_profile_rec.site_use_id IS NOT NULL AND
626: p_customer_profile_rec.site_use_id <> FND_API.G_MISS_NUM
627: THEN
628: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_COLUMN_SHOULD_BE_NULL' );
629: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'site_use_id' );
630: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_customer_profiles' );

Line 632: RAISE FND_API.G_EXC_ERROR;

628: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_COLUMN_SHOULD_BE_NULL' );
629: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'site_use_id' );
630: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_customer_profiles' );
631: FND_MSG_PUB.ADD;
632: RAISE FND_API.G_EXC_ERROR;
633: END IF;
634:
635: p_customer_profile_rec.created_by_module := p_cust_account_rec.created_by_module;
636: p_customer_profile_rec.application_id := p_cust_account_rec.application_id;

Line 646: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

642: x_return_status => x_return_status,
643: x_msg_count => l_msg_count,
644: x_msg_data => l_msg_data );
645:
646: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
647: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
648: RAISE FND_API.G_EXC_ERROR;
649: ELSE
650: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 647: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

643: x_msg_count => l_msg_count,
644: x_msg_data => l_msg_data );
645:
646: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
647: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
648: RAISE FND_API.G_EXC_ERROR;
649: ELSE
650: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
651: END IF;

Line 648: RAISE FND_API.G_EXC_ERROR;

644: x_msg_data => l_msg_data );
645:
646: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
647: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
648: RAISE FND_API.G_EXC_ERROR;
649: ELSE
650: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
651: END IF;
652: END IF;

Line 650: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

646: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
647: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
648: RAISE FND_API.G_EXC_ERROR;
649: ELSE
650: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
651: END IF;
652: END IF;
653:
654: --

Line 680: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

676: );
677: END IF;
678: CLOSE c_has_active_account;
679:
680: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
681: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
682: RAISE FND_API.G_EXC_ERROR;
683: ELSE
684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 681: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

677: END IF;
678: CLOSE c_has_active_account;
679:
680: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
681: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
682: RAISE FND_API.G_EXC_ERROR;
683: ELSE
684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
685: END IF;

Line 682: RAISE FND_API.G_EXC_ERROR;

678: CLOSE c_has_active_account;
679:
680: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
681: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
682: RAISE FND_API.G_EXC_ERROR;
683: ELSE
684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
685: END IF;
686: END IF;

Line 684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

680: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
681: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
682: RAISE FND_API.G_EXC_ERROR;
683: ELSE
684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
685: END IF;
686: END IF;
687:
688: x_cust_account_id := p_cust_account_rec.cust_account_id;

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

714: * IN/OUT:
715: * p_cust_account_rec Customer account record.
716: * p_object_version_number Used for locking the being updated record.
717: * x_return_status Return status after the call. The status can
718: * be FND_API.G_RET_STS_SUCCESS (success),
719: * FND_API.G_RET_STS_ERROR (error),
720: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
721: *
722: * NOTES

Line 719: * FND_API.G_RET_STS_ERROR (error),

715: * p_cust_account_rec Customer account record.
716: * p_object_version_number Used for locking the being updated record.
717: * x_return_status Return status after the call. The status can
718: * be FND_API.G_RET_STS_SUCCESS (success),
719: * FND_API.G_RET_STS_ERROR (error),
720: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
721: *
722: * NOTES
723: * This procedure should always raise exception to main API.

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

716: * p_object_version_number Used for locking the being updated record.
717: * x_return_status Return status after the call. The status can
718: * be FND_API.G_RET_STS_SUCCESS (success),
719: * FND_API.G_RET_STS_ERROR (error),
720: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
721: *
722: * NOTES
723: * This procedure should always raise exception to main API.
724: *

Line 795: RAISE FND_API.G_EXC_ERROR;

791: THEN
792: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_RECORD_CHANGED' );
793: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_cust_accounts' );
794: FND_MSG_PUB.ADD;
795: RAISE FND_API.G_EXC_ERROR;
796: END IF;
797:
798: p_object_version_number := NVL( l_object_version_number, 1 ) + 1;
799:

Line 807: RAISE FND_API.G_EXC_ERROR;

803: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account' );
804: FND_MESSAGE.SET_TOKEN( 'VALUE',
805: NVL( TO_CHAR( p_cust_account_rec.cust_account_id ), 'null' ) );
806: FND_MSG_PUB.ADD;
807: RAISE FND_API.G_EXC_ERROR;
808: END;
809:
810:
811: -- Validate cust account record

Line 818: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

814: p_cust_account_rec => p_cust_account_rec,
815: p_rowid => l_rowid,
816: x_return_status => x_return_status );
817:
818: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
819: RAISE FND_API.G_EXC_ERROR;
820: END IF;
821:
822: if (p_cust_account_rec.orig_system is not null

Line 819: RAISE FND_API.G_EXC_ERROR;

815: p_rowid => l_rowid,
816: x_return_status => x_return_status );
817:
818: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
819: RAISE FND_API.G_EXC_ERROR;
820: END IF;
821:
822: if (p_cust_account_rec.orig_system is not null
823: and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)

Line 823: and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)

819: RAISE FND_API.G_EXC_ERROR;
820: END IF;
821:
822: if (p_cust_account_rec.orig_system is not null
823: and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
824: and (p_cust_account_rec.orig_system_reference is not null
825: and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)
826: then
827: p_cust_account_rec.orig_system_reference := null;

Line 825: and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)

821:
822: if (p_cust_account_rec.orig_system is not null
823: and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
824: and (p_cust_account_rec.orig_system_reference is not null
825: and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)
826: then
827: p_cust_account_rec.orig_system_reference := null;
828: -- In mosr, we have bypassed osr nonupdateable validation
829: -- but we should not update existing osr, set it to null

Line 997: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

993: END IF;
994: END IF;
995: CLOSE c_has_active_account;
996:
997: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
998: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
999: RAISE FND_API.G_EXC_ERROR;
1000: ELSE
1001: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 998: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

994: END IF;
995: CLOSE c_has_active_account;
996:
997: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
998: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
999: RAISE FND_API.G_EXC_ERROR;
1000: ELSE
1001: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1002: END IF;

Line 999: RAISE FND_API.G_EXC_ERROR;

995: CLOSE c_has_active_account;
996:
997: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
998: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
999: RAISE FND_API.G_EXC_ERROR;
1000: ELSE
1001: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1002: END IF;
1003: END IF;

Line 1001: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

997: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
998: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
999: RAISE FND_API.G_EXC_ERROR;
1000: ELSE
1001: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1002: END IF;
1003: END IF;
1004: END IF;
1005:

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

1025: * ARGUMENTS
1026: * IN/OUT:
1027: * p_cust_acct_relate_rec Customer account relate record.
1028: * x_return_status Return status after the call. The status can
1029: * be FND_API.G_RET_STS_SUCCESS (success),
1030: * FND_API.G_RET_STS_ERROR (error),
1031: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1032: *
1033: * NOTES

Line 1030: * FND_API.G_RET_STS_ERROR (error),

1026: * IN/OUT:
1027: * p_cust_acct_relate_rec Customer account relate record.
1028: * x_return_status Return status after the call. The status can
1029: * be FND_API.G_RET_STS_SUCCESS (success),
1030: * FND_API.G_RET_STS_ERROR (error),
1031: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1032: *
1033: * NOTES
1034: * This procedure should always raise exception to main API.

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

1027: * p_cust_acct_relate_rec Customer account relate record.
1028: * x_return_status Return status after the call. The status can
1029: * be FND_API.G_RET_STS_SUCCESS (success),
1030: * FND_API.G_RET_STS_ERROR (error),
1031: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1032: *
1033: * NOTES
1034: * This procedure should always raise exception to main API.
1035: *

Line 1080: RAISE FND_API.G_EXC_ERROR;

1076: MO_GLOBAL.validate_orgid_pub_api(p_cust_acct_relate_rec.org_id,'N',l_return_status);
1077: EXCEPTION
1078: WHEN OTHERS
1079: THEN
1080: RAISE FND_API.G_EXC_ERROR;
1081: END;
1082:
1083:
1084: -- Validate cust acct relate record

Line 1091: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1087: p_cust_acct_relate_rec => p_cust_acct_relate_rec,
1088: p_cust_acct_relate_id => NULL, -- Bug 4529413
1089: x_return_status => x_return_status );
1090:
1091: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1092: RAISE FND_API.G_EXC_ERROR;
1093: END IF;
1094:
1095: -- Debug info.

Line 1092: RAISE FND_API.G_EXC_ERROR;

1088: p_cust_acct_relate_id => NULL, -- Bug 4529413
1089: x_return_status => x_return_status );
1090:
1091: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1092: RAISE FND_API.G_EXC_ERROR;
1093: END IF;
1094:
1095: -- Debug info.
1096: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN

Line 1149: p_cust_acct_relate_rec.status = FND_API.G_MISS_CHAR -- Bug 3702516

1145:
1146: IF p_cust_acct_relate_rec.customer_reciprocal_flag = 'Y' AND
1147: (NVL(p_cust_acct_relate_rec.status,'A') ='A' -- Bug 3449118
1148: OR
1149: p_cust_acct_relate_rec.status = FND_API.G_MISS_CHAR -- Bug 3702516
1150: )
1151: THEN
1152: BEGIN
1153:

Line 1194: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1190: x_return_status => x_return_status,
1191: x_msg_count => l_msg_count,
1192: x_msg_data => l_msg_data );
1193:
1194: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1195: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1196: RAISE FND_API.G_EXC_ERROR;
1197: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1198: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1195: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

1191: x_msg_count => l_msg_count,
1192: x_msg_data => l_msg_data );
1193:
1194: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1195: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1196: RAISE FND_API.G_EXC_ERROR;
1197: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1198: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1199: END IF;

Line 1196: RAISE FND_API.G_EXC_ERROR;

1192: x_msg_data => l_msg_data );
1193:
1194: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1195: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1196: RAISE FND_API.G_EXC_ERROR;
1197: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1198: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1199: END IF;
1200: END IF;

Line 1197: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

1193:
1194: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1195: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1196: RAISE FND_API.G_EXC_ERROR;
1197: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1198: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1199: END IF;
1200: END IF;
1201: END;

Line 1198: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1194: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1195: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1196: RAISE FND_API.G_EXC_ERROR;
1197: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1198: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1199: END IF;
1200: END IF;
1201: END;
1202: END IF;

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

1224: * IN/OUT:
1225: * p_cust_acct_relate_rec Customer account relate record.
1226: * p_object_version_number Used for locking the being updated record.
1227: * x_return_status Return status after the call. The status can
1228: * be FND_API.G_RET_STS_SUCCESS (success),
1229: * FND_API.G_RET_STS_ERROR (error),
1230: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1231: *
1232: * NOTES

Line 1229: * FND_API.G_RET_STS_ERROR (error),

1225: * p_cust_acct_relate_rec Customer account relate record.
1226: * p_object_version_number Used for locking the being updated record.
1227: * x_return_status Return status after the call. The status can
1228: * be FND_API.G_RET_STS_SUCCESS (success),
1229: * FND_API.G_RET_STS_ERROR (error),
1230: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1231: *
1232: * NOTES
1233: * This procedure should always raise exception to main API.

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

1226: * p_object_version_number Used for locking the being updated record.
1227: * x_return_status Return status after the call. The status can
1228: * be FND_API.G_RET_STS_SUCCESS (success),
1229: * FND_API.G_RET_STS_ERROR (error),
1230: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1231: *
1232: * NOTES
1233: * This procedure should always raise exception to main API.
1234: *

Line 1302: x_return_status := FND_API.G_RET_STS_ERROR;

1298: FND_MESSAGE.SET_NAME('AR','HZ_API_NO_ACTIVE_RECORD');
1299: FND_MESSAGE.SET_TOKEN( 'ACCOUNT1',p_cust_acct_relate_rec.cust_account_id);
1300: FND_MESSAGE.SET_TOKEN( 'ACCOUNT2',p_cust_acct_relate_rec.related_cust_account_id);
1301: FND_MSG_PUB.ADD;
1302: x_return_status := FND_API.G_RET_STS_ERROR;
1303: RAISE FND_API.G_EXC_ERROR;
1304: END;
1305: ELSE --- Bug 3449118.
1306:

Line 1303: RAISE FND_API.G_EXC_ERROR;

1299: FND_MESSAGE.SET_TOKEN( 'ACCOUNT1',p_cust_acct_relate_rec.cust_account_id);
1300: FND_MESSAGE.SET_TOKEN( 'ACCOUNT2',p_cust_acct_relate_rec.related_cust_account_id);
1301: FND_MSG_PUB.ADD;
1302: x_return_status := FND_API.G_RET_STS_ERROR;
1303: RAISE FND_API.G_EXC_ERROR;
1304: END;
1305: ELSE --- Bug 3449118.
1306:
1307: IF p_cust_acct_relate_rec.cust_acct_relate_id IS NULL THEN -- Bug 4529413

Line 1321: x_return_status := FND_API.G_RET_STS_ERROR;

1317: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_NO_RECORD' );
1318: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account relate' );
1319: FND_MESSAGE.SET_TOKEN( 'VALUE',p_rowid);
1320: FND_MSG_PUB.ADD;
1321: x_return_status := FND_API.G_RET_STS_ERROR;
1322: RAISE FND_API.G_EXC_ERROR;
1323: END;
1324: ELSE
1325: l_cust_acct_relate_id := p_cust_acct_relate_rec.cust_acct_relate_id;

Line 1322: RAISE FND_API.G_EXC_ERROR;

1318: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account relate' );
1319: FND_MESSAGE.SET_TOKEN( 'VALUE',p_rowid);
1320: FND_MSG_PUB.ADD;
1321: x_return_status := FND_API.G_RET_STS_ERROR;
1322: RAISE FND_API.G_EXC_ERROR;
1323: END;
1324: ELSE
1325: l_cust_acct_relate_id := p_cust_acct_relate_rec.cust_acct_relate_id;
1326:

Line 1346: (p_cust_acct_relate_rec.cust_account_id = FND_API.G_MISS_NUM OR

1342: FOR UPDATE NOWAIT;
1343:
1344: -- cust_account_id is not updateable.
1345: IF p_cust_acct_relate_rec.cust_account_id IS NOT NULL AND
1346: (p_cust_acct_relate_rec.cust_account_id = FND_API.G_MISS_NUM OR
1347: l_cust_account_id <> p_cust_acct_relate_rec.cust_account_id)
1348: THEN
1349: FND_MESSAGE.SET_NAME ('AR','HZ_API_NONUPDATEABLE_COLUMN');
1350: FND_MESSAGE.SET_TOKEN('COLUMN','CUST_ACCOUNT_ID');

Line 1352: x_return_status := FND_API.G_RET_STS_ERROR;

1348: THEN
1349: FND_MESSAGE.SET_NAME ('AR','HZ_API_NONUPDATEABLE_COLUMN');
1350: FND_MESSAGE.SET_TOKEN('COLUMN','CUST_ACCOUNT_ID');
1351: FND_MSG_PUB.ADD;
1352: x_return_status := FND_API.G_RET_STS_ERROR;
1353: END IF;
1354:
1355: -- related_cust_account_id is not updateable.
1356: IF p_cust_acct_relate_rec.related_cust_account_id IS NOT NULL AND

Line 1357: (p_cust_acct_relate_rec.related_cust_account_id = FND_API.G_MISS_NUM OR

1353: END IF;
1354:
1355: -- related_cust_account_id is not updateable.
1356: IF p_cust_acct_relate_rec.related_cust_account_id IS NOT NULL AND
1357: (p_cust_acct_relate_rec.related_cust_account_id = FND_API.G_MISS_NUM OR
1358: l_related_cust_account_id <> p_cust_acct_relate_rec.related_cust_account_id)
1359: THEN
1360: FND_MESSAGE.SET_NAME ('AR','HZ_API_NONUPDATEABLE_COLUMN');
1361: FND_MESSAGE.SET_TOKEN('COLUMN','RELATED_CUST_ACCOUNT_ID');

Line 1363: x_return_status := FND_API.G_RET_STS_ERROR;

1359: THEN
1360: FND_MESSAGE.SET_NAME ('AR','HZ_API_NONUPDATEABLE_COLUMN');
1361: FND_MESSAGE.SET_TOKEN('COLUMN','RELATED_CUST_ACCOUNT_ID');
1362: FND_MSG_PUB.ADD;
1363: x_return_status := FND_API.G_RET_STS_ERROR;
1364: END IF;
1365:
1366: -- If status is updated to Active
1367: IF p_cust_acct_relate_rec.status = 'A'

Line 1384: x_return_status := FND_API.G_RET_STS_ERROR;

1380: FND_MESSAGE.SET_NAME ('AR','HZ_ACTIVE_CUST_ACCT_RELATE');
1381: FND_MESSAGE.SET_TOKEN('ACCOUNT1',l_cust_account_id);
1382: FND_MESSAGE.SET_TOKEN('ACCOUNT2',l_related_cust_account_id);
1383: FND_MSG_PUB.ADD;
1384: x_return_status := FND_API.G_RET_STS_ERROR;
1385: END IF;
1386:
1387: END IF;
1388:

Line 1395: x_return_status := FND_API.G_RET_STS_ERROR;

1391: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_NO_RECORD' );
1392: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account relate' );
1393: FND_MESSAGE.SET_TOKEN( 'VALUE', l_cust_acct_relate_id);
1394: FND_MSG_PUB.ADD;
1395: x_return_status := FND_API.G_RET_STS_ERROR;
1396: RAISE FND_API.G_EXC_ERROR;
1397: END;
1398: END IF;
1399:

Line 1396: RAISE FND_API.G_EXC_ERROR;

1392: FND_MESSAGE.SET_TOKEN( 'RECORD', 'customer account relate' );
1393: FND_MESSAGE.SET_TOKEN( 'VALUE', l_cust_acct_relate_id);
1394: FND_MSG_PUB.ADD;
1395: x_return_status := FND_API.G_RET_STS_ERROR;
1396: RAISE FND_API.G_EXC_ERROR;
1397: END;
1398: END IF;
1399:
1400: IF NOT (

Line 1409: RAISE FND_API.G_EXC_ERROR;

1405: THEN
1406: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_RECORD_CHANGED' );
1407: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_cust_acct_relate' );
1408: FND_MSG_PUB.ADD;
1409: RAISE FND_API.G_EXC_ERROR;
1410: END IF;
1411:
1412: p_object_version_number := NVL( l_object_version_number, 1 ) + 1;
1413:

Line 1423: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1419: p_cust_acct_relate_id => l_cust_acct_relate_id, -- Bug 4529413
1420: x_return_status => x_return_status );
1421:
1422:
1423: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1424: RAISE FND_API.G_EXC_ERROR;
1425: END IF;
1426:
1427: -- Debug info.

Line 1424: RAISE FND_API.G_EXC_ERROR;

1420: x_return_status => x_return_status );
1421:
1422:
1423: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1424: RAISE FND_API.G_EXC_ERROR;
1425: END IF;
1426:
1427: -- Debug info.
1428: IF fnd_log.level_procedure>=fnd_log.g_current_runtime_level THEN

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

1499: *
1500: * ARGUMENTS
1501: * IN:
1502: * p_init_msg_list Initialize message stack if it is set to
1503: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
1504: * p_cust_account_rec Customer account record.
1505: * p_person_rec Person party record which being created account
1506: * belongs to. If party_id in person record is not
1507: * passed in or party_id does not exist in hz_parties,

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

1507: * passed in or party_id does not exist in hz_parties,
1508: * API ceates a person party based on this record.
1509: * p_customer_profile_rec Customer profile record. One customer account
1510: * must have a customer profile.
1511: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
1512: * profile amounts by copying corresponding data
1513: * from customer profile class amounts.
1514: * IN/OUT:
1515: * OUT:

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

1520: * x_party_number Party number of the person party which this account
1521: * belongs to.
1522: * x_profile_id Person profile ID.
1523: * x_return_status Return status after the call. The status can
1524: * be FND_API.G_RET_STS_SUCCESS (success),
1525: * FND_API.G_RET_STS_ERROR (error),
1526: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1527: * x_msg_count Number of messages in message stack.
1528: * x_msg_data Message text if x_msg_count is 1.

Line 1525: * FND_API.G_RET_STS_ERROR (error),

1521: * belongs to.
1522: * x_profile_id Person profile ID.
1523: * x_return_status Return status after the call. The status can
1524: * be FND_API.G_RET_STS_SUCCESS (success),
1525: * FND_API.G_RET_STS_ERROR (error),
1526: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1527: * x_msg_count Number of messages in message stack.
1528: * x_msg_data Message text if x_msg_count is 1.
1529: *

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

1522: * x_profile_id Person profile ID.
1523: * x_return_status Return status after the call. The status can
1524: * be FND_API.G_RET_STS_SUCCESS (success),
1525: * FND_API.G_RET_STS_ERROR (error),
1526: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1527: * x_msg_count Number of messages in message stack.
1528: * x_msg_data Message text if x_msg_count is 1.
1529: *
1530: * NOTES

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

1535: *
1536: */
1537:
1538: PROCEDURE create_cust_account (
1539: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1540: p_cust_account_rec IN CUST_ACCOUNT_REC_TYPE,
1541: p_person_rec IN HZ_PARTY_V2PUB.PERSON_REC_TYPE,
1542: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
1543: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

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

1539: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1540: p_cust_account_rec IN CUST_ACCOUNT_REC_TYPE,
1541: p_person_rec IN HZ_PARTY_V2PUB.PERSON_REC_TYPE,
1542: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
1543: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
1544: x_cust_account_id OUT NOCOPY NUMBER,
1545: x_account_number OUT NOCOPY VARCHAR2,
1546: x_party_id OUT NOCOPY NUMBER,
1547: x_party_number OUT NOCOPY VARCHAR2,

Line 1574: IF FND_API.to_Boolean(p_init_msg_list) THEN

1570: p_msg_level=>fnd_log.level_procedure);
1571: END IF;
1572:
1573: -- Initialize message list if p_init_msg_list is set to TRUE.
1574: IF FND_API.to_Boolean(p_init_msg_list) THEN
1575: FND_MSG_PUB.initialize;
1576: END IF;
1577:
1578: -- Initialize API return status to success.

Line 1579: x_return_status := FND_API.G_RET_STS_SUCCESS;

1575: FND_MSG_PUB.initialize;
1576: END IF;
1577:
1578: -- Initialize API return status to success.
1579: x_return_status := FND_API.G_RET_STS_SUCCESS;
1580:
1581: -- report error on obsolete columns based on profile
1582: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN
1583: check_obsolete_columns (

Line 1589: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1585: p_cust_account_rec => l_cust_account_rec,
1586: x_return_status => x_return_status
1587: );
1588:
1589: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1590: RAISE FND_API.G_EXC_ERROR;
1591: END IF;
1592: END IF;
1593:

Line 1590: RAISE FND_API.G_EXC_ERROR;

1586: x_return_status => x_return_status
1587: );
1588:
1589: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1590: RAISE FND_API.G_EXC_ERROR;
1591: END IF;
1592: END IF;
1593:
1594: -- Call to business logic.

Line 1610: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1606: x_profile_id,
1607: x_return_status );
1608:
1609:
1610: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1611: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('Y', 'EVENTS_ENABLED')) THEN
1612: -- Invoke business event system.
1613: HZ_BUSINESS_EVENT_V2PVT.create_cust_account_event (
1614: l_cust_account_rec,

Line 1633: p_encoded => FND_API.G_FALSE,

1629: HZ_DQM_SYNC.sync_cust_account(l_cust_account_rec.CUST_ACCOUNT_ID,'C');
1630:
1631: -- Standard call to get message count and if count is 1, get message info.
1632: FND_MSG_PUB.Count_And_Get(
1633: p_encoded => FND_API.G_FALSE,
1634: p_count => x_msg_count,
1635: p_data => x_msg_data );
1636:
1637: -- Debug info.

Line 1654: WHEN FND_API.G_EXC_ERROR THEN

1650: -- Check if API is called in debug mode. If yes, disable debug.
1651: --disable_debug;
1652:
1653: EXCEPTION
1654: WHEN FND_API.G_EXC_ERROR THEN
1655: ROLLBACK TO create_cust_account;
1656: x_return_status := FND_API.G_RET_STS_ERROR;
1657:
1658: FND_MSG_PUB.Count_And_Get(

Line 1656: x_return_status := FND_API.G_RET_STS_ERROR;

1652:
1653: EXCEPTION
1654: WHEN FND_API.G_EXC_ERROR THEN
1655: ROLLBACK TO create_cust_account;
1656: x_return_status := FND_API.G_RET_STS_ERROR;
1657:
1658: FND_MSG_PUB.Count_And_Get(
1659: p_encoded => FND_API.G_FALSE,
1660: p_count => x_msg_count,

Line 1659: p_encoded => FND_API.G_FALSE,

1655: ROLLBACK TO create_cust_account;
1656: x_return_status := FND_API.G_RET_STS_ERROR;
1657:
1658: FND_MSG_PUB.Count_And_Get(
1659: p_encoded => FND_API.G_FALSE,
1660: p_count => x_msg_count,
1661: p_data => x_msg_data );
1662:
1663: -- Debug info.

Line 1680: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1676:
1677: -- Check if API is called in debug mode. If yes, disable debug.
1678: --disable_debug;
1679:
1680: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1681: ROLLBACK TO create_cust_account;
1682: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1683:
1684: FND_MSG_PUB.Count_And_Get(

Line 1682: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1678: --disable_debug;
1679:
1680: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1681: ROLLBACK TO create_cust_account;
1682: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1683:
1684: FND_MSG_PUB.Count_And_Get(
1685: p_encoded => FND_API.G_FALSE,
1686: p_count => x_msg_count,

Line 1685: p_encoded => FND_API.G_FALSE,

1681: ROLLBACK TO create_cust_account;
1682: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1683:
1684: FND_MSG_PUB.Count_And_Get(
1685: p_encoded => FND_API.G_FALSE,
1686: p_count => x_msg_count,
1687: p_data => x_msg_data );
1688:
1689: -- Debug info.

Line 1708: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1704: --disable_debug;
1705:
1706: WHEN OTHERS THEN
1707: ROLLBACK TO create_cust_account;
1708: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1709:
1710: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
1711: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
1712: FND_MSG_PUB.ADD;

Line 1715: p_encoded => FND_API.G_FALSE,

1711: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
1712: FND_MSG_PUB.ADD;
1713:
1714: FND_MSG_PUB.Count_And_Get(
1715: p_encoded => FND_API.G_FALSE,
1716: p_count => x_msg_count,
1717: p_data => x_msg_data );
1718:
1719: -- Debug info.

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

1748: *
1749: * ARGUMENTS
1750: * IN:
1751: * p_init_msg_list Initialize message stack if it is set to
1752: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
1753: * p_cust_account_rec Customer account record.
1754: * p_organization_rec Organization party record which being created account
1755: * belongs to. If party_id in organization record is not
1756: * passed in or party_id does not exist in hz_parties,

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

1756: * passed in or party_id does not exist in hz_parties,
1757: * API ceates a organization party based on this record.
1758: * p_customer_profile_rec Customer profile record. One customer account
1759: * must have a customer profile.
1760: * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
1761: * profile amounts by copying corresponding data
1762: * from customer profile class amounts.
1763: * IN/OUT:
1764: * OUT:

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

1769: * x_party_number Party number of the organization party which this
1770: * account belongs to.
1771: * x_profile_id Organization profile ID.
1772: * x_return_status Return status after the call. The status can
1773: * be FND_API.G_RET_STS_SUCCESS (success),
1774: * FND_API.G_RET_STS_ERROR (error),
1775: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1776: * x_msg_count Number of messages in message stack.
1777: * x_msg_data Message text if x_msg_count is 1.

Line 1774: * FND_API.G_RET_STS_ERROR (error),

1770: * account belongs to.
1771: * x_profile_id Organization profile ID.
1772: * x_return_status Return status after the call. The status can
1773: * be FND_API.G_RET_STS_SUCCESS (success),
1774: * FND_API.G_RET_STS_ERROR (error),
1775: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1776: * x_msg_count Number of messages in message stack.
1777: * x_msg_data Message text if x_msg_count is 1.
1778: *

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

1771: * x_profile_id Organization profile ID.
1772: * x_return_status Return status after the call. The status can
1773: * be FND_API.G_RET_STS_SUCCESS (success),
1774: * FND_API.G_RET_STS_ERROR (error),
1775: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
1776: * x_msg_count Number of messages in message stack.
1777: * x_msg_data Message text if x_msg_count is 1.
1778: *
1779: * NOTES

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

1784: *
1785: */
1786:
1787: PROCEDURE create_cust_account (
1788: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1789: p_cust_account_rec IN CUST_ACCOUNT_REC_TYPE,
1790: p_organization_rec IN HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE,
1791: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
1792: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,

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

1788: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1789: p_cust_account_rec IN CUST_ACCOUNT_REC_TYPE,
1790: p_organization_rec IN HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE,
1791: p_customer_profile_rec IN HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
1792: p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
1793: x_cust_account_id OUT NOCOPY NUMBER,
1794: x_account_number OUT NOCOPY VARCHAR2,
1795: x_party_id OUT NOCOPY NUMBER,
1796: x_party_number OUT NOCOPY VARCHAR2,

Line 1823: IF FND_API.to_Boolean(p_init_msg_list) THEN

1819: p_msg_level=>fnd_log.level_procedure);
1820: END IF;
1821:
1822: -- Initialize message list if p_init_msg_list is set to TRUE.
1823: IF FND_API.to_Boolean(p_init_msg_list) THEN
1824: FND_MSG_PUB.initialize;
1825: END IF;
1826:
1827: -- Initialize API return status to success.

Line 1828: x_return_status := FND_API.G_RET_STS_SUCCESS;

1824: FND_MSG_PUB.initialize;
1825: END IF;
1826:
1827: -- Initialize API return status to success.
1828: x_return_status := FND_API.G_RET_STS_SUCCESS;
1829:
1830: -- report error on obsolete columns based on profile
1831: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN
1832: check_obsolete_columns (

Line 1838: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1834: p_cust_account_rec => l_cust_account_rec,
1835: x_return_status => x_return_status
1836: );
1837:
1838: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1839: RAISE FND_API.G_EXC_ERROR;
1840: END IF;
1841: END IF;
1842:

Line 1839: RAISE FND_API.G_EXC_ERROR;

1835: x_return_status => x_return_status
1836: );
1837:
1838: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1839: RAISE FND_API.G_EXC_ERROR;
1840: END IF;
1841: END IF;
1842:
1843: -- Call to business logic.

Line 1858: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1854: x_party_number,
1855: x_profile_id,
1856: x_return_status );
1857:
1858: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1859: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('Y', 'EVENTS_ENABLED')) THEN
1860: -- Invoke business event system.
1861: HZ_BUSINESS_EVENT_V2PVT.create_cust_account_event (
1862: l_cust_account_rec,

Line 1881: p_encoded => FND_API.G_FALSE,

1877: HZ_DQM_SYNC.sync_cust_account(l_cust_account_rec.CUST_ACCOUNT_ID,'C');
1878:
1879: -- Standard call to get message count and if count is 1, get message info.
1880: FND_MSG_PUB.Count_And_Get(
1881: p_encoded => FND_API.G_FALSE,
1882: p_count => x_msg_count,
1883: p_data => x_msg_data );
1884:
1885: -- Debug info.

Line 1903: WHEN FND_API.G_EXC_ERROR THEN

1899: -- Check if API is called in debug mode. If yes, disable debug.
1900: --disable_debug;
1901:
1902: EXCEPTION
1903: WHEN FND_API.G_EXC_ERROR THEN
1904: ROLLBACK TO create_cust_account;
1905: x_return_status := FND_API.G_RET_STS_ERROR;
1906:
1907: FND_MSG_PUB.Count_And_Get(

Line 1905: x_return_status := FND_API.G_RET_STS_ERROR;

1901:
1902: EXCEPTION
1903: WHEN FND_API.G_EXC_ERROR THEN
1904: ROLLBACK TO create_cust_account;
1905: x_return_status := FND_API.G_RET_STS_ERROR;
1906:
1907: FND_MSG_PUB.Count_And_Get(
1908: p_encoded => FND_API.G_FALSE,
1909: p_count => x_msg_count,

Line 1908: p_encoded => FND_API.G_FALSE,

1904: ROLLBACK TO create_cust_account;
1905: x_return_status := FND_API.G_RET_STS_ERROR;
1906:
1907: FND_MSG_PUB.Count_And_Get(
1908: p_encoded => FND_API.G_FALSE,
1909: p_count => x_msg_count,
1910: p_data => x_msg_data );
1911:
1912: -- Debug info.

Line 1929: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1925:
1926: -- Check if API is called in debug mode. If yes, disable debug.
1927: --disable_debug;
1928:
1929: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1930: ROLLBACK TO create_cust_account;
1931: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1932:
1933: FND_MSG_PUB.Count_And_Get(

Line 1931: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1927: --disable_debug;
1928:
1929: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1930: ROLLBACK TO create_cust_account;
1931: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1932:
1933: FND_MSG_PUB.Count_And_Get(
1934: p_encoded => FND_API.G_FALSE,
1935: p_count => x_msg_count,

Line 1934: p_encoded => FND_API.G_FALSE,

1930: ROLLBACK TO create_cust_account;
1931: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1932:
1933: FND_MSG_PUB.Count_And_Get(
1934: p_encoded => FND_API.G_FALSE,
1935: p_count => x_msg_count,
1936: p_data => x_msg_data );
1937:
1938: -- Debug info.

Line 1957: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1953: --disable_debug;
1954:
1955: WHEN OTHERS THEN
1956: ROLLBACK TO create_cust_account;
1957: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1958:
1959: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
1960: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
1961: FND_MSG_PUB.ADD;

Line 1964: p_encoded => FND_API.G_FALSE,

1960: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
1961: FND_MSG_PUB.ADD;
1962:
1963: FND_MSG_PUB.Count_And_Get(
1964: p_encoded => FND_API.G_FALSE,
1965: p_count => x_msg_count,
1966: p_data => x_msg_data );
1967:
1968: -- Debug info.

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

1997: *
1998: * ARGUMENTS
1999: * IN:
2000: * p_init_msg_list Initialize message stack if it is set to
2001: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2002: * p_cust_account_rec Customer account record.
2003: * IN/OUT:
2004: * p_object_version_number Used for locking the being updated record.
2005: * OUT:

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

2003: * IN/OUT:
2004: * p_object_version_number Used for locking the being updated record.
2005: * OUT:
2006: * x_return_status Return status after the call. The status can
2007: * be FND_API.G_RET_STS_SUCCESS (success),
2008: * FND_API.G_RET_STS_ERROR (error),
2009: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2010: * x_msg_count Number of messages in message stack.
2011: * x_msg_data Message text if x_msg_count is 1.

Line 2008: * FND_API.G_RET_STS_ERROR (error),

2004: * p_object_version_number Used for locking the being updated record.
2005: * OUT:
2006: * x_return_status Return status after the call. The status can
2007: * be FND_API.G_RET_STS_SUCCESS (success),
2008: * FND_API.G_RET_STS_ERROR (error),
2009: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2010: * x_msg_count Number of messages in message stack.
2011: * x_msg_data Message text if x_msg_count is 1.
2012: *

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

2005: * OUT:
2006: * x_return_status Return status after the call. The status can
2007: * be FND_API.G_RET_STS_SUCCESS (success),
2008: * FND_API.G_RET_STS_ERROR (error),
2009: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2010: * x_msg_count Number of messages in message stack.
2011: * x_msg_data Message text if x_msg_count is 1.
2012: *
2013: * NOTES

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

2018: *
2019: */
2020:
2021: PROCEDURE update_cust_account (
2022: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2023: p_cust_account_rec IN CUST_ACCOUNT_REC_TYPE,
2024: p_object_version_number IN OUT NOCOPY NUMBER,
2025: x_return_status OUT NOCOPY VARCHAR2,
2026: x_msg_count OUT NOCOPY NUMBER,

Line 2060: IF FND_API.to_Boolean(p_init_msg_list) THEN

2056: p_msg_level=>fnd_log.level_procedure);
2057: END IF;
2058:
2059: -- Initialize message list if p_init_msg_list is set to TRUE.
2060: IF FND_API.to_Boolean(p_init_msg_list) THEN
2061: FND_MSG_PUB.initialize;
2062: END IF;
2063:
2064: -- Initialize API return status to success.

Line 2065: x_return_status := FND_API.G_RET_STS_SUCCESS;

2061: FND_MSG_PUB.initialize;
2062: END IF;
2063:
2064: -- Initialize API return status to success.
2065: x_return_status := FND_API.G_RET_STS_SUCCESS;
2066:
2067: IF (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
2068: and (p_cust_account_rec.orig_system_reference is not null and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)
2069: and (p_cust_account_rec.cust_account_id = FND_API.G_MISS_NUM or p_cust_account_rec.cust_account_id is null) THEN

Line 2067: IF (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)

2063:
2064: -- Initialize API return status to success.
2065: x_return_status := FND_API.G_RET_STS_SUCCESS;
2066:
2067: IF (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
2068: and (p_cust_account_rec.orig_system_reference is not null and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)
2069: and (p_cust_account_rec.cust_account_id = FND_API.G_MISS_NUM or p_cust_account_rec.cust_account_id is null) THEN
2070: hz_orig_system_ref_pub.get_owner_table_id
2071: (p_orig_system => p_cust_account_rec.orig_system,

Line 2068: and (p_cust_account_rec.orig_system_reference is not null and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)

2064: -- Initialize API return status to success.
2065: x_return_status := FND_API.G_RET_STS_SUCCESS;
2066:
2067: IF (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
2068: and (p_cust_account_rec.orig_system_reference is not null and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)
2069: and (p_cust_account_rec.cust_account_id = FND_API.G_MISS_NUM or p_cust_account_rec.cust_account_id is null) THEN
2070: hz_orig_system_ref_pub.get_owner_table_id
2071: (p_orig_system => p_cust_account_rec.orig_system,
2072: p_orig_system_reference => p_cust_account_rec.orig_system_reference,

Line 2069: and (p_cust_account_rec.cust_account_id = FND_API.G_MISS_NUM or p_cust_account_rec.cust_account_id is null) THEN

2065: x_return_status := FND_API.G_RET_STS_SUCCESS;
2066:
2067: IF (p_cust_account_rec.orig_system is not null and p_cust_account_rec.orig_system <>fnd_api.g_miss_char)
2068: and (p_cust_account_rec.orig_system_reference is not null and p_cust_account_rec.orig_system_reference <>fnd_api.g_miss_char)
2069: and (p_cust_account_rec.cust_account_id = FND_API.G_MISS_NUM or p_cust_account_rec.cust_account_id is null) THEN
2070: hz_orig_system_ref_pub.get_owner_table_id
2071: (p_orig_system => p_cust_account_rec.orig_system,
2072: p_orig_system_reference => p_cust_account_rec.orig_system_reference,
2073: p_owner_table_name => 'HZ_CUST_ACCOUNTS',

Line 2076: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2072: p_orig_system_reference => p_cust_account_rec.orig_system_reference,
2073: p_owner_table_name => 'HZ_CUST_ACCOUNTS',
2074: x_owner_table_id => l_cust_account_rec.cust_account_id,
2075: x_return_status => x_return_status);
2076: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2077: RAISE FND_API.G_EXC_ERROR;
2078: END IF;
2079:
2080: END IF;

Line 2077: RAISE FND_API.G_EXC_ERROR;

2073: p_owner_table_name => 'HZ_CUST_ACCOUNTS',
2074: x_owner_table_id => l_cust_account_rec.cust_account_id,
2075: x_return_status => x_return_status);
2076: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2077: RAISE FND_API.G_EXC_ERROR;
2078: END IF;
2079:
2080: END IF;
2081:

Line 2090: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2086: x_return_status => x_return_status,
2087: x_msg_count => x_msg_count,
2088: x_msg_data => x_msg_data);
2089:
2090: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2091: RAISE FND_API.G_EXC_ERROR;
2092: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2093: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2094: END IF;

Line 2091: RAISE FND_API.G_EXC_ERROR;

2087: x_msg_count => x_msg_count,
2088: x_msg_data => x_msg_data);
2089:
2090: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2091: RAISE FND_API.G_EXC_ERROR;
2092: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2093: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2094: END IF;
2095:

Line 2092: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2088: x_msg_data => x_msg_data);
2089:
2090: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2091: RAISE FND_API.G_EXC_ERROR;
2092: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2093: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2094: END IF;
2095:
2096: -- report error on obsolete columns based on profile

Line 2093: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2089:
2090: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2091: RAISE FND_API.G_EXC_ERROR;
2092: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2093: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2094: END IF;
2095:
2096: -- report error on obsolete columns based on profile
2097: IF NVL(FND_PROFILE.VALUE('HZ_API_ERR_ON_OBSOLETE_COLUMN'), 'Y') = 'Y' THEN

Line 2105: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2101: p_old_cust_account_rec => l_old_cust_account_rec,
2102: x_return_status => x_return_status
2103: );
2104:
2105: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2106: RAISE FND_API.G_EXC_ERROR;
2107: END IF;
2108: END IF;
2109:

Line 2106: RAISE FND_API.G_EXC_ERROR;

2102: x_return_status => x_return_status
2103: );
2104:
2105: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2106: RAISE FND_API.G_EXC_ERROR;
2107: END IF;
2108: END IF;
2109:
2110: -- Call to business logic.

Line 2116: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2112: l_cust_account_rec,
2113: p_object_version_number,
2114: x_return_status );
2115:
2116: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2117: -- Invoke business event system.
2118: l_old_cust_account_rec.orig_system := l_cust_account_rec.orig_system;
2119: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('Y', 'EVENTS_ENABLED')) THEN
2120: HZ_BUSINESS_EVENT_V2PVT.update_cust_account_event (

Line 2137: p_encoded => FND_API.G_FALSE,

2133: HZ_DQM_SYNC.sync_cust_account(l_cust_account_rec.CUST_ACCOUNT_ID,'U');
2134:
2135: -- Standard call to get message count and if count is 1, get message info.
2136: FND_MSG_PUB.Count_And_Get(
2137: p_encoded => FND_API.G_FALSE,
2138: p_count => x_msg_count,
2139: p_data => x_msg_data );
2140:
2141: -- Debug info.

Line 2158: WHEN FND_API.G_EXC_ERROR THEN

2154: -- Check if API is called in debug mode. If yes, disable debug.
2155: --disable_debug;
2156:
2157: EXCEPTION
2158: WHEN FND_API.G_EXC_ERROR THEN
2159: ROLLBACK TO update_cust_account;
2160: x_return_status := FND_API.G_RET_STS_ERROR;
2161:
2162: FND_MSG_PUB.Count_And_Get(

Line 2160: x_return_status := FND_API.G_RET_STS_ERROR;

2156:
2157: EXCEPTION
2158: WHEN FND_API.G_EXC_ERROR THEN
2159: ROLLBACK TO update_cust_account;
2160: x_return_status := FND_API.G_RET_STS_ERROR;
2161:
2162: FND_MSG_PUB.Count_And_Get(
2163: p_encoded => FND_API.G_FALSE,
2164: p_count => x_msg_count,

Line 2163: p_encoded => FND_API.G_FALSE,

2159: ROLLBACK TO update_cust_account;
2160: x_return_status := FND_API.G_RET_STS_ERROR;
2161:
2162: FND_MSG_PUB.Count_And_Get(
2163: p_encoded => FND_API.G_FALSE,
2164: p_count => x_msg_count,
2165: p_data => x_msg_data );
2166:
2167: -- Debug info.

Line 2184: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2180:
2181: -- Check if API is called in debug mode. If yes, disable debug.
2182: --disable_debug;
2183:
2184: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2185: ROLLBACK TO update_cust_account;
2186: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2187:
2188: FND_MSG_PUB.Count_And_Get(

Line 2186: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2182: --disable_debug;
2183:
2184: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2185: ROLLBACK TO update_cust_account;
2186: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2187:
2188: FND_MSG_PUB.Count_And_Get(
2189: p_encoded => FND_API.G_FALSE,
2190: p_count => x_msg_count,

Line 2189: p_encoded => FND_API.G_FALSE,

2185: ROLLBACK TO update_cust_account;
2186: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2187:
2188: FND_MSG_PUB.Count_And_Get(
2189: p_encoded => FND_API.G_FALSE,
2190: p_count => x_msg_count,
2191: p_data => x_msg_data );
2192:
2193: -- Debug info.

Line 2212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2208: --disable_debug;
2209:
2210: WHEN OTHERS THEN
2211: ROLLBACK TO update_cust_account;
2212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2213:
2214: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2215: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2216: FND_MSG_PUB.ADD;

Line 2219: p_encoded => FND_API.G_FALSE,

2215: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2216: FND_MSG_PUB.ADD;
2217:
2218: FND_MSG_PUB.Count_And_Get(
2219: p_encoded => FND_API.G_FALSE,
2220: p_count => x_msg_count,
2221: p_data => x_msg_data );
2222:
2223: -- Debug info.

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

2251: *
2252: * ARGUMENTS
2253: * IN:
2254: * p_init_msg_list Initialize message stack if it is set to
2255: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2256: * p_cust_account_id Customer account id.
2257: * IN/OUT:
2258: * OUT:
2259: * x_cust_account_rec Returned customer account record.

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

2258: * OUT:
2259: * x_cust_account_rec Returned customer account record.
2260: * x_customer_profile_rec Returned customer profile record.
2261: * x_return_status Return status after the call. The status can
2262: * be FND_API.G_RET_STS_SUCCESS (success),
2263: * FND_API.G_RET_STS_ERROR (error),
2264: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2265: * x_msg_count Number of messages in message stack.
2266: * x_msg_data Message text if x_msg_count is 1.

Line 2263: * FND_API.G_RET_STS_ERROR (error),

2259: * x_cust_account_rec Returned customer account record.
2260: * x_customer_profile_rec Returned customer profile record.
2261: * x_return_status Return status after the call. The status can
2262: * be FND_API.G_RET_STS_SUCCESS (success),
2263: * FND_API.G_RET_STS_ERROR (error),
2264: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2265: * x_msg_count Number of messages in message stack.
2266: * x_msg_data Message text if x_msg_count is 1.
2267: *

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

2260: * x_customer_profile_rec Returned customer profile record.
2261: * x_return_status Return status after the call. The status can
2262: * be FND_API.G_RET_STS_SUCCESS (success),
2263: * FND_API.G_RET_STS_ERROR (error),
2264: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2265: * x_msg_count Number of messages in message stack.
2266: * x_msg_data Message text if x_msg_count is 1.
2267: *
2268: * NOTES

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

2273: *
2274: */
2275:
2276: PROCEDURE get_cust_account_rec (
2277: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2278: p_cust_account_id IN NUMBER,
2279: x_cust_account_rec OUT NOCOPY CUST_ACCOUNT_REC_TYPE,
2280: x_customer_profile_rec OUT NOCOPY HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE,
2281: x_return_status OUT NOCOPY VARCHAR2,

Line 2301: IF FND_API.to_Boolean(p_init_msg_list) THEN

2297: p_msg_level=>fnd_log.level_procedure);
2298: END IF;
2299:
2300: -- Initialize message list if p_init_msg_list is set to TRUE.
2301: IF FND_API.to_Boolean(p_init_msg_list) THEN
2302: FND_MSG_PUB.initialize;
2303: END IF;
2304:
2305: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 2306: IF FND_API.to_Boolean(p_init_msg_list) THEN

2302: FND_MSG_PUB.initialize;
2303: END IF;
2304:
2305: -- Initialize message list if p_init_msg_list is set to TRUE.
2306: IF FND_API.to_Boolean(p_init_msg_list) THEN
2307: FND_MSG_PUB.initialize;
2308: END IF;
2309:
2310: -- Initialize API return status to success.

Line 2311: x_return_status := FND_API.G_RET_STS_SUCCESS;

2307: FND_MSG_PUB.initialize;
2308: END IF;
2309:
2310: -- Initialize API return status to success.
2311: x_return_status := FND_API.G_RET_STS_SUCCESS;
2312:
2313: -- Check whether primary key has been passed in.
2314: IF p_cust_account_id IS NULL OR
2315: p_cust_account_id = FND_API.G_MISS_NUM THEN

Line 2315: p_cust_account_id = FND_API.G_MISS_NUM THEN

2311: x_return_status := FND_API.G_RET_STS_SUCCESS;
2312:
2313: -- Check whether primary key has been passed in.
2314: IF p_cust_account_id IS NULL OR
2315: p_cust_account_id = FND_API.G_MISS_NUM THEN
2316: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
2317: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_account_id' );
2318: FND_MSG_PUB.ADD;
2319: RAISE FND_API.G_EXC_ERROR;

Line 2319: RAISE FND_API.G_EXC_ERROR;

2315: p_cust_account_id = FND_API.G_MISS_NUM THEN
2316: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
2317: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_account_id' );
2318: FND_MSG_PUB.ADD;
2319: RAISE FND_API.G_EXC_ERROR;
2320: END IF;
2321:
2322: x_cust_account_rec.cust_account_id := p_cust_account_id;
2323:

Line 2459: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2455: x_return_status => x_return_status,
2456: x_msg_count => x_msg_count,
2457: x_msg_data => x_msg_data );
2458:
2459: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2460: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2461: RAISE FND_API.G_EXC_ERROR;
2462: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2463: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2460: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2456: x_msg_count => x_msg_count,
2457: x_msg_data => x_msg_data );
2458:
2459: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2460: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2461: RAISE FND_API.G_EXC_ERROR;
2462: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2463: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2464: END IF;

Line 2461: RAISE FND_API.G_EXC_ERROR;

2457: x_msg_data => x_msg_data );
2458:
2459: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2460: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2461: RAISE FND_API.G_EXC_ERROR;
2462: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2463: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2464: END IF;
2465: END IF;

Line 2462: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2458:
2459: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2460: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2461: RAISE FND_API.G_EXC_ERROR;
2462: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2463: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2464: END IF;
2465: END IF;
2466:

Line 2463: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2459: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2460: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2461: RAISE FND_API.G_EXC_ERROR;
2462: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2463: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2464: END IF;
2465: END IF;
2466:
2467: -- Standard call to get message count and if count is 1, get message info.

Line 2469: p_encoded => FND_API.G_FALSE,

2465: END IF;
2466:
2467: -- Standard call to get message count and if count is 1, get message info.
2468: FND_MSG_PUB.Count_And_Get(
2469: p_encoded => FND_API.G_FALSE,
2470: p_count => x_msg_count,
2471: p_data => x_msg_data );
2472:
2473: -- Debug info.

Line 2490: WHEN FND_API.G_EXC_ERROR THEN

2486: -- Check if API is called in debug mode. If yes, disable debug.
2487: --disable_debug;
2488:
2489: EXCEPTION
2490: WHEN FND_API.G_EXC_ERROR THEN
2491: x_return_status := FND_API.G_RET_STS_ERROR;
2492:
2493: FND_MSG_PUB.Count_And_Get(
2494: p_encoded => FND_API.G_FALSE,

Line 2491: x_return_status := FND_API.G_RET_STS_ERROR;

2487: --disable_debug;
2488:
2489: EXCEPTION
2490: WHEN FND_API.G_EXC_ERROR THEN
2491: x_return_status := FND_API.G_RET_STS_ERROR;
2492:
2493: FND_MSG_PUB.Count_And_Get(
2494: p_encoded => FND_API.G_FALSE,
2495: p_count => x_msg_count,

Line 2494: p_encoded => FND_API.G_FALSE,

2490: WHEN FND_API.G_EXC_ERROR THEN
2491: x_return_status := FND_API.G_RET_STS_ERROR;
2492:
2493: FND_MSG_PUB.Count_And_Get(
2494: p_encoded => FND_API.G_FALSE,
2495: p_count => x_msg_count,
2496: p_data => x_msg_data );
2497:
2498: -- Debug info.

Line 2515: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2511:
2512: -- Check if API is called in debug mode. If yes, disable debug.
2513: --disable_debug;
2514:
2515: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2516: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2517:
2518: FND_MSG_PUB.Count_And_Get(
2519: p_encoded => FND_API.G_FALSE,

Line 2516: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2512: -- Check if API is called in debug mode. If yes, disable debug.
2513: --disable_debug;
2514:
2515: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2516: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2517:
2518: FND_MSG_PUB.Count_And_Get(
2519: p_encoded => FND_API.G_FALSE,
2520: p_count => x_msg_count,

Line 2519: p_encoded => FND_API.G_FALSE,

2515: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2516: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2517:
2518: FND_MSG_PUB.Count_And_Get(
2519: p_encoded => FND_API.G_FALSE,
2520: p_count => x_msg_count,
2521: p_data => x_msg_data );
2522:
2523: -- Debug info.

Line 2542: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2538: -- Check if API is called in debug mode. If yes, disable debug.
2539: --disable_debug;
2540:
2541: WHEN OTHERS THEN
2542: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2543:
2544: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2545: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2546: FND_MSG_PUB.ADD;

Line 2549: p_encoded => FND_API.G_FALSE,

2545: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2546: FND_MSG_PUB.ADD;
2547:
2548: FND_MSG_PUB.Count_And_Get(
2549: p_encoded => FND_API.G_FALSE,
2550: p_count => x_msg_count,
2551: p_data => x_msg_data );
2552:
2553: -- Debug info.

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

2580: *
2581: * ARGUMENTS
2582: * IN:
2583: * p_init_msg_list Initialize message stack if it is set to
2584: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2585: * p_cust_acct_relate_rec Customer account relate record.
2586: * IN/OUT:
2587: * OUT:
2588: * x_return_status Return status after the call. The status can

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

2585: * p_cust_acct_relate_rec Customer account relate record.
2586: * IN/OUT:
2587: * OUT:
2588: * x_return_status Return status after the call. The status can
2589: * be FND_API.G_RET_STS_SUCCESS (success),
2590: * FND_API.G_RET_STS_ERROR (error),
2591: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2592: * x_msg_count Number of messages in message stack.
2593: * x_msg_data Message text if x_msg_count is 1.

Line 2590: * FND_API.G_RET_STS_ERROR (error),

2586: * IN/OUT:
2587: * OUT:
2588: * x_return_status Return status after the call. The status can
2589: * be FND_API.G_RET_STS_SUCCESS (success),
2590: * FND_API.G_RET_STS_ERROR (error),
2591: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2592: * x_msg_count Number of messages in message stack.
2593: * x_msg_data Message text if x_msg_count is 1.
2594: *

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

2587: * OUT:
2588: * x_return_status Return status after the call. The status can
2589: * be FND_API.G_RET_STS_SUCCESS (success),
2590: * FND_API.G_RET_STS_ERROR (error),
2591: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2592: * x_msg_count Number of messages in message stack.
2593: * x_msg_data Message text if x_msg_count is 1.
2594: *
2595: * NOTES

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

2601: * with x_cust_acct_relate_id parameter.
2602: */
2603:
2604: PROCEDURE create_cust_acct_relate (
2605: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2606: p_cust_acct_relate_rec IN CUST_ACCT_RELATE_REC_TYPE,
2607: x_return_status OUT NOCOPY VARCHAR2,
2608: x_msg_count OUT NOCOPY NUMBER,
2609: x_msg_data OUT NOCOPY VARCHAR2

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

2628: *
2629: * ARGUMENTS
2630: * IN:
2631: * p_init_msg_list Initialize message stack if it is set to
2632: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2633: * p_cust_acct_relate_rec Customer account relate record.
2634: * IN/OUT:
2635: * OUT:
2636: * x_cust_acct_relate_id Return the created records primary key.

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

2634: * IN/OUT:
2635: * OUT:
2636: * x_cust_acct_relate_id Return the created records primary key.
2637: * x_return_status Return status after the call. The status can
2638: * be FND_API.G_RET_STS_SUCCESS (success),
2639: * FND_API.G_RET_STS_ERROR (error),
2640: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2641: * x_msg_count Number of messages in message stack.
2642: * x_msg_data Message text if x_msg_count is 1.

Line 2639: * FND_API.G_RET_STS_ERROR (error),

2635: * OUT:
2636: * x_cust_acct_relate_id Return the created records primary key.
2637: * x_return_status Return status after the call. The status can
2638: * be FND_API.G_RET_STS_SUCCESS (success),
2639: * FND_API.G_RET_STS_ERROR (error),
2640: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2641: * x_msg_count Number of messages in message stack.
2642: * x_msg_data Message text if x_msg_count is 1.
2643: *

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

2636: * x_cust_acct_relate_id Return the created records primary key.
2637: * x_return_status Return status after the call. The status can
2638: * be FND_API.G_RET_STS_SUCCESS (success),
2639: * FND_API.G_RET_STS_ERROR (error),
2640: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2641: * x_msg_count Number of messages in message stack.
2642: * x_msg_data Message text if x_msg_count is 1.
2643: *
2644: * NOTES

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

2649: *
2650: */
2651:
2652: PROCEDURE create_cust_acct_relate (
2653: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2654: p_cust_acct_relate_rec IN CUST_ACCT_RELATE_REC_TYPE,
2655: x_cust_acct_relate_id OUT NOCOPY NUMBER,
2656: x_return_status OUT NOCOPY VARCHAR2,
2657: x_msg_count OUT NOCOPY NUMBER,

Line 2679: IF FND_API.to_Boolean(p_init_msg_list) THEN

2675: p_msg_level=>fnd_log.level_procedure);
2676: END IF;
2677:
2678: -- Initialize message list if p_init_msg_list is set to TRUE.
2679: IF FND_API.to_Boolean(p_init_msg_list) THEN
2680: FND_MSG_PUB.initialize;
2681: END IF;
2682:
2683: -- Initialize API return status to success.

Line 2684: x_return_status := FND_API.G_RET_STS_SUCCESS;

2680: FND_MSG_PUB.initialize;
2681: END IF;
2682:
2683: -- Initialize API return status to success.
2684: x_return_status := FND_API.G_RET_STS_SUCCESS;
2685:
2686: -- Call to business logic.
2687: do_create_cust_acct_relate (
2688: l_cust_acct_relate_rec,

Line 2693: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2689: x_return_status );
2690:
2691: x_cust_acct_relate_id := l_cust_acct_relate_rec.cust_acct_relate_id;
2692:
2693: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2694: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('Y', 'EVENTS_ENABLED')) THEN
2695: -- Invoke business event system.
2696: HZ_BUSINESS_EVENT_V2PVT.create_cust_acct_relate_event (
2697: l_cust_acct_relate_rec );

Line 2710: p_encoded => FND_API.G_FALSE,

2706: END IF;
2707:
2708: -- Standard call to get message count and if count is 1, get message info.
2709: FND_MSG_PUB.Count_And_Get(
2710: p_encoded => FND_API.G_FALSE,
2711: p_count => x_msg_count,
2712: p_data => x_msg_data );
2713:
2714: -- Debug info.

Line 2731: WHEN FND_API.G_EXC_ERROR THEN

2727: -- Check if API is called in debug mode. If yes, disable debug.
2728: --disable_debug;
2729:
2730: EXCEPTION
2731: WHEN FND_API.G_EXC_ERROR THEN
2732: ROLLBACK TO create_cust_acct_relate;
2733: x_return_status := FND_API.G_RET_STS_ERROR;
2734:
2735: FND_MSG_PUB.Count_And_Get(

Line 2733: x_return_status := FND_API.G_RET_STS_ERROR;

2729:
2730: EXCEPTION
2731: WHEN FND_API.G_EXC_ERROR THEN
2732: ROLLBACK TO create_cust_acct_relate;
2733: x_return_status := FND_API.G_RET_STS_ERROR;
2734:
2735: FND_MSG_PUB.Count_And_Get(
2736: p_encoded => FND_API.G_FALSE,
2737: p_count => x_msg_count,

Line 2736: p_encoded => FND_API.G_FALSE,

2732: ROLLBACK TO create_cust_acct_relate;
2733: x_return_status := FND_API.G_RET_STS_ERROR;
2734:
2735: FND_MSG_PUB.Count_And_Get(
2736: p_encoded => FND_API.G_FALSE,
2737: p_count => x_msg_count,
2738: p_data => x_msg_data );
2739:
2740: -- Debug info.

Line 2757: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2753:
2754: -- Check if API is called in debug mode. If yes, disable debug.
2755: --disable_debug;
2756:
2757: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2758: ROLLBACK TO create_cust_acct_relate;
2759: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2760:
2761: FND_MSG_PUB.Count_And_Get(

Line 2759: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2755: --disable_debug;
2756:
2757: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2758: ROLLBACK TO create_cust_acct_relate;
2759: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2760:
2761: FND_MSG_PUB.Count_And_Get(
2762: p_encoded => FND_API.G_FALSE,
2763: p_count => x_msg_count,

Line 2762: p_encoded => FND_API.G_FALSE,

2758: ROLLBACK TO create_cust_acct_relate;
2759: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2760:
2761: FND_MSG_PUB.Count_And_Get(
2762: p_encoded => FND_API.G_FALSE,
2763: p_count => x_msg_count,
2764: p_data => x_msg_data );
2765:
2766: -- Debug info.

Line 2785: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2781: --disable_debug;
2782:
2783: WHEN OTHERS THEN
2784: ROLLBACK TO create_cust_acct_relate;
2785: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2786:
2787: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
2788: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2789: FND_MSG_PUB.ADD;

Line 2792: p_encoded => FND_API.G_FALSE,

2788: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
2789: FND_MSG_PUB.ADD;
2790:
2791: FND_MSG_PUB.Count_And_Get(
2792: p_encoded => FND_API.G_FALSE,
2793: p_count => x_msg_count,
2794: p_data => x_msg_data );
2795:
2796: -- Debug info.

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

2823: *
2824: * ARGUMENTS
2825: * IN:
2826: * p_init_msg_list Initialize message stack if it is set to
2827: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
2828: * p_cust_acct_relate_rec Customer account relate record.
2829: * IN/OUT:
2830: * p_object_version_number Used for locking the being updated record.
2831: * OUT:

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

2829: * IN/OUT:
2830: * p_object_version_number Used for locking the being updated record.
2831: * OUT:
2832: * x_return_status Return status after the call. The status can
2833: * be FND_API.G_RET_STS_SUCCESS (success),
2834: * FND_API.G_RET_STS_ERROR (error),
2835: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2836: * x_msg_count Number of messages in message stack.
2837: * x_msg_data Message text if x_msg_count is 1.

Line 2834: * FND_API.G_RET_STS_ERROR (error),

2830: * p_object_version_number Used for locking the being updated record.
2831: * OUT:
2832: * x_return_status Return status after the call. The status can
2833: * be FND_API.G_RET_STS_SUCCESS (success),
2834: * FND_API.G_RET_STS_ERROR (error),
2835: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2836: * x_msg_count Number of messages in message stack.
2837: * x_msg_data Message text if x_msg_count is 1.
2838: *

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

2831: * OUT:
2832: * x_return_status Return status after the call. The status can
2833: * be FND_API.G_RET_STS_SUCCESS (success),
2834: * FND_API.G_RET_STS_ERROR (error),
2835: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
2836: * x_msg_count Number of messages in message stack.
2837: * x_msg_data Message text if x_msg_count is 1.
2838: *
2839: * NOTES

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

2848: *
2849: */
2850:
2851: PROCEDURE update_cust_acct_relate (
2852: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2853: p_cust_acct_relate_rec IN CUST_ACCT_RELATE_REC_TYPE,
2854: p_object_version_number IN OUT NOCOPY NUMBER,
2855: x_return_status OUT NOCOPY VARCHAR2,
2856: x_msg_count OUT NOCOPY NUMBER,

Line 2879: IF FND_API.to_Boolean(p_init_msg_list) THEN

2875: p_msg_level=>fnd_log.level_procedure);
2876: END IF;
2877:
2878: -- Initialize message list if p_init_msg_list is set to TRUE.
2879: IF FND_API.to_Boolean(p_init_msg_list) THEN
2880: FND_MSG_PUB.initialize;
2881: END IF;
2882:
2883: -- Initialize API return status to success.

Line 2884: x_return_status := FND_API.G_RET_STS_SUCCESS;

2880: FND_MSG_PUB.initialize;
2881: END IF;
2882:
2883: -- Initialize API return status to success.
2884: x_return_status := FND_API.G_RET_STS_SUCCESS;
2885:
2886: -- Bug 3456489 (Org id is required for identifying correct account relationship record.)
2887: l_old_cust_acct_relate_rec.org_id := p_cust_acct_relate_rec.org_id;
2888:

Line 2901: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2897: x_msg_count => x_msg_count,
2898: x_msg_data => x_msg_data);
2899:
2900:
2901: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2902: RAISE FND_API.G_EXC_ERROR;
2903: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2905: END IF;

Line 2902: RAISE FND_API.G_EXC_ERROR;

2898: x_msg_data => x_msg_data);
2899:
2900:
2901: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2902: RAISE FND_API.G_EXC_ERROR;
2903: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2905: END IF;
2906:

Line 2903: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2899:
2900:
2901: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2902: RAISE FND_API.G_EXC_ERROR;
2903: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2905: END IF;
2906:
2907: -- Call to business logic.

Line 2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2900:
2901: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2902: RAISE FND_API.G_EXC_ERROR;
2903: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2905: END IF;
2906:
2907: -- Call to business logic.
2908: do_update_cust_acct_relate (

Line 2914: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2910: p_object_version_number,
2911: NULL, /* Bug 3449118 pass NULL for rowid */
2912: x_return_status );
2913:
2914: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2915: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('Y', 'EVENTS_ENABLED')) THEN
2916: -- Invoke business event system.
2917: HZ_BUSINESS_EVENT_V2PVT.update_cust_acct_relate_event (
2918: l_cust_acct_relate_rec , l_old_cust_acct_relate_rec);

Line 2932: p_encoded => FND_API.G_FALSE,

2928: END IF;
2929:
2930: -- Standard call to get message count and if count is 1, get message info.
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 2953: WHEN FND_API.G_EXC_ERROR THEN

2949: -- Check if API is called in debug mode. If yes, disable debug.
2950: --disable_debug;
2951:
2952: EXCEPTION
2953: WHEN FND_API.G_EXC_ERROR THEN
2954: ROLLBACK TO update_cust_acct_relate;
2955: x_return_status := FND_API.G_RET_STS_ERROR;
2956:
2957: FND_MSG_PUB.Count_And_Get(

Line 2955: x_return_status := FND_API.G_RET_STS_ERROR;

2951:
2952: EXCEPTION
2953: WHEN FND_API.G_EXC_ERROR THEN
2954: ROLLBACK TO update_cust_acct_relate;
2955: x_return_status := FND_API.G_RET_STS_ERROR;
2956:
2957: FND_MSG_PUB.Count_And_Get(
2958: p_encoded => FND_API.G_FALSE,
2959: p_count => x_msg_count,

Line 2958: p_encoded => FND_API.G_FALSE,

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

Line 2979: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2975:
2976: -- Check if API is called in debug mode. If yes, disable debug.
2977: --disable_debug;
2978:
2979: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2980: ROLLBACK TO update_cust_acct_relate;
2981: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2982:
2983: FND_MSG_PUB.Count_And_Get(

Line 2981: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2977: --disable_debug;
2978:
2979: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2980: ROLLBACK TO update_cust_acct_relate;
2981: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2982:
2983: FND_MSG_PUB.Count_And_Get(
2984: p_encoded => FND_API.G_FALSE,
2985: p_count => x_msg_count,

Line 2984: p_encoded => FND_API.G_FALSE,

2980: ROLLBACK TO update_cust_acct_relate;
2981: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2982:
2983: FND_MSG_PUB.Count_And_Get(
2984: p_encoded => FND_API.G_FALSE,
2985: p_count => x_msg_count,
2986: p_data => x_msg_data );
2987:
2988: -- Debug info.

Line 3007: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3003: --disable_debug;
3004:
3005: WHEN OTHERS THEN
3006: ROLLBACK TO update_cust_acct_relate;
3007: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3008:
3009: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3010: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3011: FND_MSG_PUB.ADD;

Line 3014: p_encoded => FND_API.G_FALSE,

3010: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3011: FND_MSG_PUB.ADD;
3012:
3013: FND_MSG_PUB.Count_And_Get(
3014: p_encoded => FND_API.G_FALSE,
3015: p_count => x_msg_count,
3016: p_data => x_msg_data );
3017:
3018: -- Debug info.

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

3049: *
3050: * ARGUMENTS
3051: * IN:
3052: * p_init_msg_list Initialize message stack if it is set to
3053: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
3054: * p_cust_acct_relate_rec Customer account relate record.
3055: * p_rowid Rowid of record that the user is trying to update.
3056: *
3057: * IN/OUT:

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

3058: * p_object_version_number Used for locking the being updated record.
3059: *
3060: * OUT:
3061: * x_return_status Return status after the call. The status can
3062: * be FND_API.G_RET_STS_SUCCESS (success),
3063: * FND_API.G_RET_STS_ERROR (error),
3064: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3065: * x_msg_count Number of messages in message stack.
3066: * x_msg_data Message text if x_msg_count is 1.

Line 3063: * FND_API.G_RET_STS_ERROR (error),

3059: *
3060: * OUT:
3061: * x_return_status Return status after the call. The status can
3062: * be FND_API.G_RET_STS_SUCCESS (success),
3063: * FND_API.G_RET_STS_ERROR (error),
3064: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3065: * x_msg_count Number of messages in message stack.
3066: * x_msg_data Message text if x_msg_count is 1.
3067: *

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

3060: * OUT:
3061: * x_return_status Return status after the call. The status can
3062: * be FND_API.G_RET_STS_SUCCESS (success),
3063: * FND_API.G_RET_STS_ERROR (error),
3064: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3065: * x_msg_count Number of messages in message stack.
3066: * x_msg_data Message text if x_msg_count is 1.
3067: *
3068: * NOTES

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

3075: * 12-AUG-2005 Idris Ali o Bug 4529413:modified the call to get_cust_acct_relate_rec
3076: */
3077:
3078: PROCEDURE update_cust_acct_relate (
3079: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3080: p_cust_acct_relate_rec IN CUST_ACCT_RELATE_REC_TYPE,
3081: p_rowid IN ROWID,
3082: p_object_version_number IN OUT NOCOPY NUMBER,
3083: x_return_status OUT NOCOPY VARCHAR2,

Line 3107: IF FND_API.to_Boolean(p_init_msg_list) THEN

3103: p_msg_level=>fnd_log.level_procedure);
3104: END IF;
3105:
3106: -- Initialize message list if p_init_msg_list is set to TRUE.
3107: IF FND_API.to_Boolean(p_init_msg_list) THEN
3108: FND_MSG_PUB.initialize;
3109: END IF;
3110:
3111: -- Initialize API return status to success.

Line 3112: x_return_status := FND_API.G_RET_STS_SUCCESS;

3108: FND_MSG_PUB.initialize;
3109: END IF;
3110:
3111: -- Initialize API return status to success.
3112: x_return_status := FND_API.G_RET_STS_SUCCESS;
3113:
3114: -- Bug 3456489. If API is called with NULL for rowid, then we need org_id to identify the record.
3115: l_old_cust_acct_relate_rec.org_id := p_cust_acct_relate_rec.org_id;
3116:

Line 3128: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

3124: x_return_status => x_return_status,
3125: x_msg_count => x_msg_count,
3126: x_msg_data => x_msg_data);
3127:
3128: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3129: RAISE FND_API.G_EXC_ERROR;
3130: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3132: END IF;

Line 3129: RAISE FND_API.G_EXC_ERROR;

3125: x_msg_count => x_msg_count,
3126: x_msg_data => x_msg_data);
3127:
3128: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3129: RAISE FND_API.G_EXC_ERROR;
3130: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3132: END IF;
3133:

Line 3130: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

3126: x_msg_data => x_msg_data);
3127:
3128: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3129: RAISE FND_API.G_EXC_ERROR;
3130: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3132: END IF;
3133:
3134: -- Call to business logic.

Line 3131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3127:
3128: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
3129: RAISE FND_API.G_EXC_ERROR;
3130: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3131: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3132: END IF;
3133:
3134: -- Call to business logic.
3135: do_update_cust_acct_relate (

Line 3141: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

3137: p_object_version_number,
3138: p_rowid,
3139: x_return_status );
3140:
3141: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
3142: IF(HZ_UTILITY_V2PUB.G_EXECUTE_API_CALLOUTS in ('Y', 'EVENTS_ENABLED')) THEN
3143: -- Invoke business event system.
3144: HZ_BUSINESS_EVENT_V2PVT.update_cust_acct_relate_event (
3145: l_cust_acct_relate_rec , l_old_cust_acct_relate_rec);

Line 3159: p_encoded => FND_API.G_FALSE,

3155: END IF;
3156:
3157: -- Standard call to get message count and if count is 1, get message info.
3158: FND_MSG_PUB.Count_And_Get(
3159: p_encoded => FND_API.G_FALSE,
3160: p_count => x_msg_count,
3161: p_data => x_msg_data );
3162:
3163: -- Debug info.

Line 3180: WHEN FND_API.G_EXC_ERROR THEN

3176: -- Check if API is called in debug mode. If yes, disable debug.
3177: --disable_debug;
3178:
3179: EXCEPTION
3180: WHEN FND_API.G_EXC_ERROR THEN
3181: ROLLBACK TO update_cust_acct_relate;
3182: x_return_status := FND_API.G_RET_STS_ERROR;
3183:
3184: FND_MSG_PUB.Count_And_Get(

Line 3182: x_return_status := FND_API.G_RET_STS_ERROR;

3178:
3179: EXCEPTION
3180: WHEN FND_API.G_EXC_ERROR THEN
3181: ROLLBACK TO update_cust_acct_relate;
3182: x_return_status := FND_API.G_RET_STS_ERROR;
3183:
3184: FND_MSG_PUB.Count_And_Get(
3185: p_encoded => FND_API.G_FALSE,
3186: p_count => x_msg_count,

Line 3185: p_encoded => FND_API.G_FALSE,

3181: ROLLBACK TO update_cust_acct_relate;
3182: x_return_status := FND_API.G_RET_STS_ERROR;
3183:
3184: FND_MSG_PUB.Count_And_Get(
3185: p_encoded => FND_API.G_FALSE,
3186: p_count => x_msg_count,
3187: p_data => x_msg_data );
3188:
3189: -- Debug info.

Line 3206: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3202:
3203: -- Check if API is called in debug mode. If yes, disable debug.
3204: --disable_debug;
3205:
3206: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3207: ROLLBACK TO update_cust_acct_relate;
3208: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3209:
3210: FND_MSG_PUB.Count_And_Get(

Line 3208: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3204: --disable_debug;
3205:
3206: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3207: ROLLBACK TO update_cust_acct_relate;
3208: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3209:
3210: FND_MSG_PUB.Count_And_Get(
3211: p_encoded => FND_API.G_FALSE,
3212: p_count => x_msg_count,

Line 3211: p_encoded => FND_API.G_FALSE,

3207: ROLLBACK TO update_cust_acct_relate;
3208: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
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 3234: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3230: --disable_debug;
3231:
3232: WHEN OTHERS THEN
3233: ROLLBACK TO update_cust_acct_relate;
3234: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3235:
3236: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3237: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3238: FND_MSG_PUB.ADD;

Line 3241: p_encoded => FND_API.G_FALSE,

3237: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3238: FND_MSG_PUB.ADD;
3239:
3240: FND_MSG_PUB.Count_And_Get(
3241: p_encoded => FND_API.G_FALSE,
3242: p_count => x_msg_count,
3243: p_data => x_msg_data );
3244:
3245: -- Debug info.

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

3273: *
3274: * ARGUMENTS
3275: * IN:
3276: * p_init_msg_list Initialize message stack if it is set to
3277: * FND_API.G_TRUE. Default is FND_API.G_FALSE.
3278: * p_cust_account_id Customer account id.
3279: * p_related_cust_account_id Related customer account id.
3280: * IN/OUT:
3281: * OUT:

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

3280: * IN/OUT:
3281: * OUT:
3282: * x_cust_acct_relate_rec Returned customer account relate record.
3283: * x_return_status Return status after the call. The status can
3284: * be FND_API.G_RET_STS_SUCCESS (success),
3285: * FND_API.G_RET_STS_ERROR (error),
3286: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3287: * x_msg_count Number of messages in message stack.
3288: * x_msg_data Message text if x_msg_count is 1.

Line 3285: * FND_API.G_RET_STS_ERROR (error),

3281: * OUT:
3282: * x_cust_acct_relate_rec Returned customer account relate record.
3283: * x_return_status Return status after the call. The status can
3284: * be FND_API.G_RET_STS_SUCCESS (success),
3285: * FND_API.G_RET_STS_ERROR (error),
3286: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3287: * x_msg_count Number of messages in message stack.
3288: * x_msg_data Message text if x_msg_count is 1.
3289: *

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

3282: * x_cust_acct_relate_rec Returned customer account relate record.
3283: * x_return_status Return status after the call. The status can
3284: * be FND_API.G_RET_STS_SUCCESS (success),
3285: * FND_API.G_RET_STS_ERROR (error),
3286: * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
3287: * x_msg_count Number of messages in message stack.
3288: * x_msg_data Message text if x_msg_count is 1.
3289: *
3290: * NOTES

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

3300: * 12-AUG-2005 Idris Ali o Bug 4529413:Added parameter cust_acct_relate_id to get_cust_acct_relate
3301: */
3302:
3303: PROCEDURE get_cust_acct_relate_rec (
3304: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3305: p_cust_account_id IN NUMBER,
3306: p_related_cust_account_id IN NUMBER,
3307: p_cust_acct_relate_id IN NUMBER, -- Bug 4529413
3308: p_rowid IN ROWID, -- Bug 3449118

Line 3328: IF FND_API.to_Boolean(p_init_msg_list) THEN

3324: p_msg_level=>fnd_log.level_procedure);
3325: END IF;
3326:
3327: -- Initialize message list if p_init_msg_list is set to TRUE.
3328: IF FND_API.to_Boolean(p_init_msg_list) THEN
3329: FND_MSG_PUB.initialize;
3330: END IF;
3331:
3332: -- Initialize API return status to success.

Line 3333: x_return_status := FND_API.G_RET_STS_SUCCESS;

3329: FND_MSG_PUB.initialize;
3330: END IF;
3331:
3332: -- Initialize API return status to success.
3333: x_return_status := FND_API.G_RET_STS_SUCCESS;
3334:
3335: IF p_cust_acct_relate_id IS NULL THEN
3336:
3337: -- Check whether primary key has been passed in.

Line 3339: p_cust_account_id = FND_API.G_MISS_NUM THEN

3335: IF p_cust_acct_relate_id IS NULL THEN
3336:
3337: -- Check whether primary key has been passed in.
3338: IF p_cust_account_id IS NULL OR
3339: p_cust_account_id = FND_API.G_MISS_NUM THEN
3340: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3341: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_account_id' );
3342: FND_MSG_PUB.ADD;
3343: RAISE FND_API.G_EXC_ERROR;

Line 3343: RAISE FND_API.G_EXC_ERROR;

3339: p_cust_account_id = FND_API.G_MISS_NUM THEN
3340: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3341: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_account_id' );
3342: FND_MSG_PUB.ADD;
3343: RAISE FND_API.G_EXC_ERROR;
3344: END IF;
3345:
3346: IF p_related_cust_account_id IS NULL OR
3347: p_related_cust_account_id = FND_API.G_MISS_NUM THEN

Line 3347: p_related_cust_account_id = FND_API.G_MISS_NUM THEN

3343: RAISE FND_API.G_EXC_ERROR;
3344: END IF;
3345:
3346: IF p_related_cust_account_id IS NULL OR
3347: p_related_cust_account_id = FND_API.G_MISS_NUM THEN
3348: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3349: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'related_cust_account_id' );
3350: FND_MSG_PUB.ADD;
3351: RAISE FND_API.G_EXC_ERROR;

Line 3351: RAISE FND_API.G_EXC_ERROR;

3347: p_related_cust_account_id = FND_API.G_MISS_NUM THEN
3348: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
3349: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'related_cust_account_id' );
3350: FND_MSG_PUB.ADD;
3351: RAISE FND_API.G_EXC_ERROR;
3352: END IF;
3353: END IF;
3354:
3355: x_cust_acct_relate_rec.cust_account_id := p_cust_account_id;

Line 3445: p_encoded => FND_API.G_FALSE,

3441: END IF;
3442:
3443: -- Standard call to get message count and if count is 1, get message info.
3444: FND_MSG_PUB.Count_And_Get(
3445: p_encoded => FND_API.G_FALSE,
3446: p_count => x_msg_count,
3447: p_data => x_msg_data );
3448:
3449: -- Debug info.

Line 3467: WHEN FND_API.G_EXC_ERROR THEN

3463: --disable_debug;
3464:
3465:
3466: EXCEPTION
3467: WHEN FND_API.G_EXC_ERROR THEN
3468: x_return_status := FND_API.G_RET_STS_ERROR;
3469:
3470: FND_MSG_PUB.Count_And_Get(
3471: p_encoded => FND_API.G_FALSE,

Line 3468: x_return_status := FND_API.G_RET_STS_ERROR;

3464:
3465:
3466: EXCEPTION
3467: WHEN FND_API.G_EXC_ERROR THEN
3468: x_return_status := FND_API.G_RET_STS_ERROR;
3469:
3470: FND_MSG_PUB.Count_And_Get(
3471: p_encoded => FND_API.G_FALSE,
3472: p_count => x_msg_count,

Line 3471: p_encoded => FND_API.G_FALSE,

3467: WHEN FND_API.G_EXC_ERROR THEN
3468: x_return_status := FND_API.G_RET_STS_ERROR;
3469:
3470: FND_MSG_PUB.Count_And_Get(
3471: p_encoded => FND_API.G_FALSE,
3472: p_count => x_msg_count,
3473: p_data => x_msg_data );
3474:
3475: -- Debug info.

Line 3492: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3488:
3489: -- Check if API is called in debug mode. If yes, disable debug.
3490: --disable_debug;
3491:
3492: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3493: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3494:
3495: FND_MSG_PUB.Count_And_Get(
3496: p_encoded => FND_API.G_FALSE,

Line 3493: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3489: -- Check if API is called in debug mode. If yes, disable debug.
3490: --disable_debug;
3491:
3492: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3493: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3494:
3495: FND_MSG_PUB.Count_And_Get(
3496: p_encoded => FND_API.G_FALSE,
3497: p_count => x_msg_count,

Line 3496: p_encoded => FND_API.G_FALSE,

3492: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3493: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3494:
3495: FND_MSG_PUB.Count_And_Get(
3496: p_encoded => FND_API.G_FALSE,
3497: p_count => x_msg_count,
3498: p_data => x_msg_data );
3499:
3500: -- Debug info.

Line 3518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3514: -- Check if API is called in debug mode. If yes, disable debug.
3515: --disable_debug;
3516:
3517: WHEN OTHERS THEN
3518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3519:
3520: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_OTHERS_EXCEP' );
3521: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3522: FND_MSG_PUB.ADD;

Line 3525: p_encoded => FND_API.G_FALSE,

3521: FND_MESSAGE.SET_TOKEN( 'ERROR' ,SQLERRM );
3522: FND_MSG_PUB.ADD;
3523:
3524: FND_MSG_PUB.Count_And_Get(
3525: p_encoded => FND_API.G_FALSE,
3526: p_count => x_msg_count,
3527: p_data => x_msg_data );
3528:
3529: -- Debug info.

Line 3576: p_cust_account_rec.account_activation_date <> FND_API.G_MISS_DATE) OR

3572:
3573: -- check account_activation_date
3574: IF (p_create_update_flag = 'C' AND
3575: p_cust_account_rec.account_activation_date IS NOT NULL AND
3576: p_cust_account_rec.account_activation_date <> FND_API.G_MISS_DATE) OR
3577: (p_create_update_flag = 'U' AND
3578: p_cust_account_rec.account_activation_date IS NOT NULL AND
3579: p_cust_account_rec.account_activation_date <> p_old_cust_account_rec.account_activation_date)
3580: THEN

Line 3584: x_return_status := FND_API.G_RET_STS_ERROR;

3580: THEN
3581: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3582: FND_MESSAGE.SET_TOKEN('COLUMN', 'account_activation_date');
3583: FND_MSG_PUB.ADD;
3584: x_return_status := FND_API.G_RET_STS_ERROR;
3585: END IF;
3586:
3587: -- check account_liable_flag
3588: IF (p_create_update_flag = 'C' AND

Line 3590: p_cust_account_rec.account_liable_flag <> FND_API.G_MISS_CHAR) OR

3586:
3587: -- check account_liable_flag
3588: IF (p_create_update_flag = 'C' AND
3589: p_cust_account_rec.account_liable_flag IS NOT NULL AND
3590: p_cust_account_rec.account_liable_flag <> FND_API.G_MISS_CHAR) OR
3591: (p_create_update_flag = 'U' AND
3592: p_cust_account_rec.account_liable_flag IS NOT NULL AND
3593: p_cust_account_rec.account_liable_flag <> p_old_cust_account_rec.account_liable_flag)
3594: THEN

Line 3598: x_return_status := FND_API.G_RET_STS_ERROR;

3594: THEN
3595: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3596: FND_MESSAGE.SET_TOKEN('COLUMN', 'account_liable_flag');
3597: FND_MSG_PUB.ADD;
3598: x_return_status := FND_API.G_RET_STS_ERROR;
3599: END IF;
3600:
3601: -- check account_termination_date
3602: IF (p_create_update_flag = 'C' AND

Line 3604: p_cust_account_rec.account_termination_date <> FND_API.G_MISS_DATE) OR

3600:
3601: -- check account_termination_date
3602: IF (p_create_update_flag = 'C' AND
3603: p_cust_account_rec.account_termination_date IS NOT NULL AND
3604: p_cust_account_rec.account_termination_date <> FND_API.G_MISS_DATE) OR
3605: (p_create_update_flag = 'U' AND
3606: p_cust_account_rec.account_termination_date IS NOT NULL AND
3607: p_cust_account_rec.account_termination_date <> p_old_cust_account_rec.account_termination_date)
3608: THEN

Line 3612: x_return_status := FND_API.G_RET_STS_ERROR;

3608: THEN
3609: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3610: FND_MESSAGE.SET_TOKEN('COLUMN', 'account_termination_date');
3611: FND_MSG_PUB.ADD;
3612: x_return_status := FND_API.G_RET_STS_ERROR;
3613: END IF;
3614:
3615: -- check acct_life_cycle_status
3616: IF (p_create_update_flag = 'C' AND

Line 3618: p_cust_account_rec.acct_life_cycle_status <> FND_API.G_MISS_CHAR) OR

3614:
3615: -- check acct_life_cycle_status
3616: IF (p_create_update_flag = 'C' AND
3617: p_cust_account_rec.acct_life_cycle_status IS NOT NULL AND
3618: p_cust_account_rec.acct_life_cycle_status <> FND_API.G_MISS_CHAR) OR
3619: (p_create_update_flag = 'U' AND
3620: p_cust_account_rec.acct_life_cycle_status IS NOT NULL AND
3621: p_cust_account_rec.acct_life_cycle_status <> p_old_cust_account_rec.acct_life_cycle_status)
3622: THEN

Line 3626: x_return_status := FND_API.G_RET_STS_ERROR;

3622: THEN
3623: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3624: FND_MESSAGE.SET_TOKEN('COLUMN', 'acct_life_cycle_status');
3625: FND_MSG_PUB.ADD;
3626: x_return_status := FND_API.G_RET_STS_ERROR;
3627: END IF;
3628:
3629: -- check current_balance
3630: IF (p_create_update_flag = 'C' AND

Line 3632: p_cust_account_rec.current_balance <> FND_API.G_MISS_NUM) OR

3628:
3629: -- check current_balance
3630: IF (p_create_update_flag = 'C' AND
3631: p_cust_account_rec.current_balance IS NOT NULL AND
3632: p_cust_account_rec.current_balance <> FND_API.G_MISS_NUM) OR
3633: (p_create_update_flag = 'U' AND
3634: p_cust_account_rec.current_balance IS NOT NULL AND
3635: p_cust_account_rec.current_balance <> p_old_cust_account_rec.current_balance)
3636: THEN

Line 3640: x_return_status := FND_API.G_RET_STS_ERROR;

3636: THEN
3637: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3638: FND_MESSAGE.SET_TOKEN('COLUMN', 'current_balance');
3639: FND_MSG_PUB.ADD;
3640: x_return_status := FND_API.G_RET_STS_ERROR;
3641: END IF;
3642:
3643: -- check department
3644: IF (p_create_update_flag = 'C' AND

Line 3646: p_cust_account_rec.department <> FND_API.G_MISS_CHAR) OR

3642:
3643: -- check department
3644: IF (p_create_update_flag = 'C' AND
3645: p_cust_account_rec.department IS NOT NULL AND
3646: p_cust_account_rec.department <> FND_API.G_MISS_CHAR) OR
3647: (p_create_update_flag = 'U' AND
3648: p_cust_account_rec.department IS NOT NULL AND
3649: p_cust_account_rec.department <> p_old_cust_account_rec.department)
3650: THEN

Line 3654: x_return_status := FND_API.G_RET_STS_ERROR;

3650: THEN
3651: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3652: FND_MESSAGE.SET_TOKEN('COLUMN', 'department');
3653: FND_MSG_PUB.ADD;
3654: x_return_status := FND_API.G_RET_STS_ERROR;
3655: END IF;
3656:
3657: -- check dormant_account_flag
3658: IF (p_create_update_flag = 'C' AND

Line 3660: p_cust_account_rec.dormant_account_flag <> FND_API.G_MISS_CHAR) OR

3656:
3657: -- check dormant_account_flag
3658: IF (p_create_update_flag = 'C' AND
3659: p_cust_account_rec.dormant_account_flag IS NOT NULL AND
3660: p_cust_account_rec.dormant_account_flag <> FND_API.G_MISS_CHAR) OR
3661: (p_create_update_flag = 'U' AND
3662: p_cust_account_rec.dormant_account_flag IS NOT NULL AND
3663: p_cust_account_rec.dormant_account_flag <> p_old_cust_account_rec.dormant_account_flag)
3664: THEN

Line 3668: x_return_status := FND_API.G_RET_STS_ERROR;

3664: THEN
3665: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3666: FND_MESSAGE.SET_TOKEN('COLUMN', 'dormant_account_flag');
3667: FND_MSG_PUB.ADD;
3668: x_return_status := FND_API.G_RET_STS_ERROR;
3669: END IF;
3670:
3671: -- check notify_flag
3672: IF (p_create_update_flag = 'C' AND

Line 3674: p_cust_account_rec.notify_flag <> FND_API.G_MISS_CHAR) OR

3670:
3671: -- check notify_flag
3672: IF (p_create_update_flag = 'C' AND
3673: p_cust_account_rec.notify_flag IS NOT NULL AND
3674: p_cust_account_rec.notify_flag <> FND_API.G_MISS_CHAR) OR
3675: (p_create_update_flag = 'U' AND
3676: p_cust_account_rec.notify_flag IS NOT NULL AND
3677: p_cust_account_rec.notify_flag <> p_old_cust_account_rec.notify_flag)
3678: THEN

Line 3682: x_return_status := FND_API.G_RET_STS_ERROR;

3678: THEN
3679: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3680: FND_MESSAGE.SET_TOKEN('COLUMN', 'notify_flag');
3681: FND_MSG_PUB.ADD;
3682: x_return_status := FND_API.G_RET_STS_ERROR;
3683: END IF;
3684:
3685: -- check order_type_id
3686: IF (p_create_update_flag = 'C' AND

Line 3688: p_cust_account_rec.order_type_id <> FND_API.G_MISS_NUM) OR

3684:
3685: -- check order_type_id
3686: IF (p_create_update_flag = 'C' AND
3687: p_cust_account_rec.order_type_id IS NOT NULL AND
3688: p_cust_account_rec.order_type_id <> FND_API.G_MISS_NUM) OR
3689: (p_create_update_flag = 'U' AND
3690: p_cust_account_rec.order_type_id IS NOT NULL AND
3691: p_cust_account_rec.order_type_id <> p_old_cust_account_rec.order_type_id)
3692: THEN

Line 3696: x_return_status := FND_API.G_RET_STS_ERROR;

3692: THEN
3693: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3694: FND_MESSAGE.SET_TOKEN('COLUMN', 'order_type_id');
3695: FND_MSG_PUB.ADD;
3696: x_return_status := FND_API.G_RET_STS_ERROR;
3697: END IF;
3698:
3699: -- check primary_salesrep_id
3700: IF (p_create_update_flag = 'C' AND

Line 3702: p_cust_account_rec.primary_salesrep_id <> FND_API.G_MISS_NUM) OR

3698:
3699: -- check primary_salesrep_id
3700: IF (p_create_update_flag = 'C' AND
3701: p_cust_account_rec.primary_salesrep_id IS NOT NULL AND
3702: p_cust_account_rec.primary_salesrep_id <> FND_API.G_MISS_NUM) OR
3703: (p_create_update_flag = 'U' AND
3704: p_cust_account_rec.primary_salesrep_id IS NOT NULL AND
3705: p_cust_account_rec.primary_salesrep_id <> p_old_cust_account_rec.primary_salesrep_id)
3706: THEN

Line 3710: x_return_status := FND_API.G_RET_STS_ERROR;

3706: THEN
3707: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3708: FND_MESSAGE.SET_TOKEN('COLUMN', 'primary_salesrep_id');
3709: FND_MSG_PUB.ADD;
3710: x_return_status := FND_API.G_RET_STS_ERROR;
3711: END IF;
3712:
3713: -- check realtime_rate_flag
3714: IF (p_create_update_flag = 'C' AND

Line 3716: p_cust_account_rec.realtime_rate_flag <> FND_API.G_MISS_CHAR) OR

3712:
3713: -- check realtime_rate_flag
3714: IF (p_create_update_flag = 'C' AND
3715: p_cust_account_rec.realtime_rate_flag IS NOT NULL AND
3716: p_cust_account_rec.realtime_rate_flag <> FND_API.G_MISS_CHAR) OR
3717: (p_create_update_flag = 'U' AND
3718: p_cust_account_rec.realtime_rate_flag IS NOT NULL AND
3719: p_cust_account_rec.realtime_rate_flag <> p_old_cust_account_rec.realtime_rate_flag)
3720: THEN

Line 3724: x_return_status := FND_API.G_RET_STS_ERROR;

3720: THEN
3721: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3722: FND_MESSAGE.SET_TOKEN('COLUMN', 'realtime_rate_flag');
3723: FND_MSG_PUB.ADD;
3724: x_return_status := FND_API.G_RET_STS_ERROR;
3725: END IF;
3726:
3727: -- check suspension_date
3728: IF (p_create_update_flag = 'C' AND

Line 3730: p_cust_account_rec.suspension_date <> FND_API.G_MISS_DATE) OR

3726:
3727: -- check suspension_date
3728: IF (p_create_update_flag = 'C' AND
3729: p_cust_account_rec.suspension_date IS NOT NULL AND
3730: p_cust_account_rec.suspension_date <> FND_API.G_MISS_DATE) OR
3731: (p_create_update_flag = 'U' AND
3732: p_cust_account_rec.suspension_date IS NOT NULL AND
3733: p_cust_account_rec.suspension_date <> p_old_cust_account_rec.suspension_date)
3734: THEN

Line 3738: x_return_status := FND_API.G_RET_STS_ERROR;

3734: THEN
3735: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3736: FND_MESSAGE.SET_TOKEN('COLUMN', 'suspension_date');
3737: FND_MSG_PUB.ADD;
3738: x_return_status := FND_API.G_RET_STS_ERROR;
3739: END IF;
3740:
3741: -- check tax_code
3742: -- Bug 4713150

Line 3745: p_cust_account_rec.tax_code <> FND_API.G_MISS_CHAR) OR

3741: -- check tax_code
3742: -- Bug 4713150
3743: /* IF (p_create_update_flag = 'C' AND
3744: p_cust_account_rec.tax_code IS NOT NULL AND
3745: p_cust_account_rec.tax_code <> FND_API.G_MISS_CHAR) OR
3746: (p_create_update_flag = 'U' AND
3747: p_cust_account_rec.tax_code IS NOT NULL AND
3748: p_cust_account_rec.tax_code <> p_old_cust_account_rec.tax_code)
3749: THEN

Line 3753: x_return_status := FND_API.G_RET_STS_ERROR;

3749: THEN
3750: FND_MESSAGE.SET_NAME('AR', 'HZ_API_OBSOLETE_COLUMN');
3751: FND_MESSAGE.SET_TOKEN('COLUMN', 'tax_code');
3752: FND_MSG_PUB.ADD;
3753: x_return_status := FND_API.G_RET_STS_ERROR;
3754: END IF;
3755: */
3756: END check_obsolete_columns;
3757: