104: AND p_column_value <> fnd_api.g_miss_char ) THEN
105: OPEN c_nace;
106: FETCH c_nace INTO l_exist;
107: IF c_nace%NOTFOUND THEN
108: fnd_message.set_name('AR','HZ_API_INVALID_LOOKUP');
109: fnd_message.set_token('COLUMN',p_column);
110: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
111: fnd_msg_pub.add;
112: x_return_status := fnd_api.g_ret_sts_error;
105: OPEN c_nace;
106: FETCH c_nace INTO l_exist;
107: IF c_nace%NOTFOUND THEN
108: fnd_message.set_name('AR','HZ_API_INVALID_LOOKUP');
109: fnd_message.set_token('COLUMN',p_column);
110: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
111: fnd_msg_pub.add;
112: x_return_status := fnd_api.g_ret_sts_error;
113: END IF;
106: FETCH c_nace INTO l_exist;
107: IF c_nace%NOTFOUND THEN
108: fnd_message.set_name('AR','HZ_API_INVALID_LOOKUP');
109: fnd_message.set_token('COLUMN',p_column);
110: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
111: fnd_msg_pub.add;
112: x_return_status := fnd_api.g_ret_sts_error;
113: END IF;
114: CLOSE c_nace;
491: -- Ensure that a party record was retrieved.
492: IF c_partytype%NOTFOUND THEN
493: -- no party and organization was found for the given ID.
494: CLOSE c_partytype;
495: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
496: fnd_message.set_token('FK', 'OWNER_TABLE_ID');
497: fnd_message.set_token('COLUMN', 'PARTY_ID');
498: fnd_message.set_token('TABLE', 'HZ_PARTIES');
499: fnd_msg_pub.add;
492: IF c_partytype%NOTFOUND THEN
493: -- no party and organization was found for the given ID.
494: CLOSE c_partytype;
495: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
496: fnd_message.set_token('FK', 'OWNER_TABLE_ID');
497: fnd_message.set_token('COLUMN', 'PARTY_ID');
498: fnd_message.set_token('TABLE', 'HZ_PARTIES');
499: fnd_msg_pub.add;
500: x_return_status := fnd_api.g_ret_sts_error;
493: -- no party and organization was found for the given ID.
494: CLOSE c_partytype;
495: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
496: fnd_message.set_token('FK', 'OWNER_TABLE_ID');
497: fnd_message.set_token('COLUMN', 'PARTY_ID');
498: fnd_message.set_token('TABLE', 'HZ_PARTIES');
499: fnd_msg_pub.add;
500: x_return_status := fnd_api.g_ret_sts_error;
501: RETURN;
494: CLOSE c_partytype;
495: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
496: fnd_message.set_token('FK', 'OWNER_TABLE_ID');
497: fnd_message.set_token('COLUMN', 'PARTY_ID');
498: fnd_message.set_token('TABLE', 'HZ_PARTIES');
499: fnd_msg_pub.add;
500: x_return_status := fnd_api.g_ret_sts_error;
501: RETURN;
502: END IF;
506: -- This is not an organization. Only organizations can have EDI
507: -- contact points.
508:
509: /* Bug 2619099.
510: | fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE'); |
511: | fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id)); |
512: | fnd_message.set_token('TYPE', 'ORGANIZATION'); */
513: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
514:
507: -- contact points.
508:
509: /* Bug 2619099.
510: | fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE'); |
511: | fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id)); |
512: | fnd_message.set_token('TYPE', 'ORGANIZATION'); */
513: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
514:
515: fnd_msg_pub.add;
508:
509: /* Bug 2619099.
510: | fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE'); |
511: | fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id)); |
512: | fnd_message.set_token('TYPE', 'ORGANIZATION'); */
513: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
514:
515: fnd_msg_pub.add;
516: x_return_status := fnd_api.g_ret_sts_error;
509: /* Bug 2619099.
510: | fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE'); |
511: | fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id)); |
512: | fnd_message.set_token('TYPE', 'ORGANIZATION'); */
513: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
514:
515: fnd_msg_pub.add;
516: x_return_status := fnd_api.g_ret_sts_error;
517: END IF;
575: IF p_table_name <> 'HZ_PARTIES' THEN
576: -- This is not a party type. This procedure was called incorrectly,
577: -- return a failure.
578: /* Bug 2619099.
579: | fnd_message.set_name('AR', 'HZ_API_INVALID_FK'); |
580: | fnd_message.set_token('FK', 'OWNER_TABLE_NAME'); |
581: | fnd_message.set_token('COLUMN', 'HZ_PARTIES'); |
582: | fnd_message.set_token('TABLE', 'FND_OBJECTS'); */
583: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
576: -- This is not a party type. This procedure was called incorrectly,
577: -- return a failure.
578: /* Bug 2619099.
579: | fnd_message.set_name('AR', 'HZ_API_INVALID_FK'); |
580: | fnd_message.set_token('FK', 'OWNER_TABLE_NAME'); |
581: | fnd_message.set_token('COLUMN', 'HZ_PARTIES'); |
582: | fnd_message.set_token('TABLE', 'FND_OBJECTS'); */
583: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
584:
577: -- return a failure.
578: /* Bug 2619099.
579: | fnd_message.set_name('AR', 'HZ_API_INVALID_FK'); |
580: | fnd_message.set_token('FK', 'OWNER_TABLE_NAME'); |
581: | fnd_message.set_token('COLUMN', 'HZ_PARTIES'); |
582: | fnd_message.set_token('TABLE', 'FND_OBJECTS'); */
583: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
584:
585: fnd_msg_pub.add;
578: /* Bug 2619099.
579: | fnd_message.set_name('AR', 'HZ_API_INVALID_FK'); |
580: | fnd_message.set_token('FK', 'OWNER_TABLE_NAME'); |
581: | fnd_message.set_token('COLUMN', 'HZ_PARTIES'); |
582: | fnd_message.set_token('TABLE', 'FND_OBJECTS'); */
583: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
584:
585: fnd_msg_pub.add;
586: x_return_status := fnd_api.g_ret_sts_error;
579: | fnd_message.set_name('AR', 'HZ_API_INVALID_FK'); |
580: | fnd_message.set_token('FK', 'OWNER_TABLE_NAME'); |
581: | fnd_message.set_token('COLUMN', 'HZ_PARTIES'); |
582: | fnd_message.set_token('TABLE', 'FND_OBJECTS'); */
583: fnd_message.set_name('AR','HZ_EDI_EFT_ORG_PARTIES_ONLY');
584:
585: fnd_msg_pub.add;
586: x_return_status := fnd_api.g_ret_sts_error;
587: RETURN;
603: -- Ensure that a party record was retrieved.
604: IF c_class%NOTFOUND THEN
605: -- no party and organization was found for the given ID.
606: CLOSE c_class;
607: fnd_message.set_name('AR', 'HZ_API_NO_RECORD');
608: fnd_message.set_token('RECORD', 'Code Assignment');
609: fnd_message.set_token('VALUE', TO_CHAR(p_party_id));
610: fnd_msg_pub.add;
611: x_return_status := fnd_api.g_ret_sts_error;
604: IF c_class%NOTFOUND THEN
605: -- no party and organization was found for the given ID.
606: CLOSE c_class;
607: fnd_message.set_name('AR', 'HZ_API_NO_RECORD');
608: fnd_message.set_token('RECORD', 'Code Assignment');
609: fnd_message.set_token('VALUE', TO_CHAR(p_party_id));
610: fnd_msg_pub.add;
611: x_return_status := fnd_api.g_ret_sts_error;
612: -- END IF;
605: -- no party and organization was found for the given ID.
606: CLOSE c_class;
607: fnd_message.set_name('AR', 'HZ_API_NO_RECORD');
608: fnd_message.set_token('RECORD', 'Code Assignment');
609: fnd_message.set_token('VALUE', TO_CHAR(p_party_id));
610: fnd_msg_pub.add;
611: x_return_status := fnd_api.g_ret_sts_error;
612: -- END IF;
613: ELSE
614: -- Check that the category class is a bank.
615: IF l_class_category NOT LIKE 'BANK%' THEN
616: -- This is not a bank-type organization. Only bank-type organizations
617: -- can have EFT contact points.
618: fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE');
619: fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id));
620: fnd_message.set_token('TYPE', 'BANK or BANK BRANCH');
621: fnd_msg_pub.add;
622: x_return_status := fnd_api.g_ret_sts_error;
615: IF l_class_category NOT LIKE 'BANK%' THEN
616: -- This is not a bank-type organization. Only bank-type organizations
617: -- can have EFT contact points.
618: fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE');
619: fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id));
620: fnd_message.set_token('TYPE', 'BANK or BANK BRANCH');
621: fnd_msg_pub.add;
622: x_return_status := fnd_api.g_ret_sts_error;
623: END IF;
616: -- This is not a bank-type organization. Only bank-type organizations
617: -- can have EFT contact points.
618: fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE');
619: fnd_message.set_token('PARTY_ID', TO_CHAR(p_party_id));
620: fnd_message.set_token('TYPE', 'BANK or BANK BRANCH');
621: fnd_msg_pub.add;
622: x_return_status := fnd_api.g_ret_sts_error;
623: END IF;
624: CLOSE c_class;
659: END IF;
660: END IF;
661:
662: IF l_error THEN
663: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
664: fnd_message.set_token('COLUMN', p_column);
665: fnd_msg_pub.add;
666: x_return_status := fnd_api.g_ret_sts_error;
667: END IF;
660: END IF;
661:
662: IF l_error THEN
663: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
664: fnd_message.set_token('COLUMN', p_column);
665: fnd_msg_pub.add;
666: x_return_status := fnd_api.g_ret_sts_error;
667: END IF;
668:
697: END IF;
698: END IF;
699:
700: IF l_error THEN
701: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
702: fnd_message.set_token('COLUMN', p_column);
703: fnd_msg_pub.add;
704: x_return_status := fnd_api.g_ret_sts_error;
705: END IF;
698: END IF;
699:
700: IF l_error THEN
701: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
702: fnd_message.set_token('COLUMN', p_column);
703: fnd_msg_pub.add;
704: x_return_status := fnd_api.g_ret_sts_error;
705: END IF;
706:
735: END IF;
736: END IF;
737:
738: IF l_error THEN
739: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
740: fnd_message.set_token('COLUMN', p_column);
741: fnd_msg_pub.add;
742: x_return_status := fnd_api.g_ret_sts_error;
743: END IF;
736: END IF;
737:
738: IF l_error THEN
739: fnd_message.set_name('AR', 'HZ_API_MISSING_COLUMN');
740: fnd_message.set_token('COLUMN', p_column);
741: fnd_msg_pub.add;
742: x_return_status := fnd_api.g_ret_sts_error;
743: END IF;
744:
778: END IF;
779: END IF;
780: IF l_error THEN
781: IF p_raise_error = 'Y' THEN
782: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_COLUMN');
783: fnd_message.set_token('COLUMN', p_column);
784: fnd_msg_pub.add;
785: END IF;
786: x_return_status := fnd_api.g_ret_sts_error;
779: END IF;
780: IF l_error THEN
781: IF p_raise_error = 'Y' THEN
782: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_COLUMN');
783: fnd_message.set_token('COLUMN', p_column);
784: fnd_msg_pub.add;
785: END IF;
786: x_return_status := fnd_api.g_ret_sts_error;
787: END IF;
823: END IF;
824:
825: IF l_error THEN
826: IF p_raise_error = 'Y' THEN
827: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_COLUMN');
828: fnd_message.set_token('COLUMN', p_column);
829: fnd_msg_pub.add;
830: END IF;
831: x_return_status := fnd_api.g_ret_sts_error;
824:
825: IF l_error THEN
826: IF p_raise_error = 'Y' THEN
827: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_COLUMN');
828: fnd_message.set_token('COLUMN', p_column);
829: fnd_msg_pub.add;
830: END IF;
831: x_return_status := fnd_api.g_ret_sts_error;
832: END IF;
868: END IF;
869:
870: IF l_error THEN
871: IF p_raise_error = 'Y' THEN
872: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_COLUMN');
873: fnd_message.set_token('COLUMN', p_column);
874: fnd_msg_pub.add;
875: END IF;
876: x_return_status := fnd_api.g_ret_sts_error;
869:
870: IF l_error THEN
871: IF p_raise_error = 'Y' THEN
872: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_COLUMN');
873: fnd_message.set_token('COLUMN', p_column);
874: fnd_msg_pub.add;
875: END IF;
876: x_return_status := fnd_api.g_ret_sts_error;
877: END IF;
922: (l_start_date IS NULL OR
923: l_start_date = FND_API.G_MISS_DATE OR
924: l_start_date > l_end_date)
925: THEN
926: fnd_message.set_name('AR', 'HZ_API_DATE_GREATER');
927: fnd_message.set_token('DATE2', p_end_date_column_name);
928: fnd_message.set_token('DATE1', p_start_date_column_name);
929: fnd_msg_pub.add;
930: x_return_status := fnd_api.g_ret_sts_error;
923: l_start_date = FND_API.G_MISS_DATE OR
924: l_start_date > l_end_date)
925: THEN
926: fnd_message.set_name('AR', 'HZ_API_DATE_GREATER');
927: fnd_message.set_token('DATE2', p_end_date_column_name);
928: fnd_message.set_token('DATE1', p_start_date_column_name);
929: fnd_msg_pub.add;
930: x_return_status := fnd_api.g_ret_sts_error;
931: END IF;
924: l_start_date > l_end_date)
925: THEN
926: fnd_message.set_name('AR', 'HZ_API_DATE_GREATER');
927: fnd_message.set_token('DATE2', p_end_date_column_name);
928: fnd_message.set_token('DATE1', p_start_date_column_name);
929: fnd_msg_pub.add;
930: x_return_status := fnd_api.g_ret_sts_error;
931: END IF;
932:
940:
941: BEGIN
942:
943: IF p_column_value = fnd_api.g_miss_char THEN
944: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_TO_NULL');
945: fnd_message.set_token('COLUMN', p_column);
946: fnd_msg_pub.add;
947: x_return_status := fnd_api.g_ret_sts_error;
948: END IF;
941: BEGIN
942:
943: IF p_column_value = fnd_api.g_miss_char THEN
944: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_TO_NULL');
945: fnd_message.set_token('COLUMN', p_column);
946: fnd_msg_pub.add;
947: x_return_status := fnd_api.g_ret_sts_error;
948: END IF;
949:
957:
958: BEGIN
959:
960: IF p_column_value = fnd_api.g_miss_num THEN
961: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_TO_NULL');
962: fnd_message.set_token('COLUMN', p_column);
963: fnd_msg_pub.add;
964: x_return_status := fnd_api.g_ret_sts_error;
965: END IF;
958: BEGIN
959:
960: IF p_column_value = fnd_api.g_miss_num THEN
961: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_TO_NULL');
962: fnd_message.set_token('COLUMN', p_column);
963: fnd_msg_pub.add;
964: x_return_status := fnd_api.g_ret_sts_error;
965: END IF;
966:
974:
975: BEGIN
976:
977: IF p_column_value = FND_API.G_MISS_DATE THEN
978: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_TO_NULL');
979: fnd_message.set_token('COLUMN', p_column);
980: fnd_msg_pub.add;
981: x_return_status := fnd_api.g_ret_sts_error;
982: END IF;
975: BEGIN
976:
977: IF p_column_value = FND_API.G_MISS_DATE THEN
978: fnd_message.set_name('AR', 'HZ_API_NONUPDATEABLE_TO_NULL');
979: fnd_message.set_token('COLUMN', p_column);
980: fnd_msg_pub.add;
981: x_return_status := fnd_api.g_ret_sts_error;
982: END IF;
983:
1011: END IF;
1012: END IF;
1013:
1014: IF l_error THEN
1015: fnd_message.set_name('AR', 'HZ_API_INVALID_LOOKUP');
1016: fnd_message.set_token('COLUMN', p_column);
1017: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
1018: fnd_msg_pub.add;
1019: x_return_status := fnd_api.g_ret_sts_error;
1012: END IF;
1013:
1014: IF l_error THEN
1015: fnd_message.set_name('AR', 'HZ_API_INVALID_LOOKUP');
1016: fnd_message.set_token('COLUMN', p_column);
1017: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
1018: fnd_msg_pub.add;
1019: x_return_status := fnd_api.g_ret_sts_error;
1020: END IF;
1013:
1014: IF l_error THEN
1015: fnd_message.set_name('AR', 'HZ_API_INVALID_LOOKUP');
1016: fnd_message.set_token('COLUMN', p_column);
1017: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
1018: fnd_msg_pub.add;
1019: x_return_status := fnd_api.g_ret_sts_error;
1020: END IF;
1021: END IF;
1034: p_column_value <> FND_API.G_MISS_CHAR
1035: THEN
1036: IF NOT search(p_column_value || G_SPECIAL_STRING, 'FND_TERRITORIES')
1037: THEN
1038: fnd_message.set_name('AR', 'HZ_API_INVALID_COUNTRY_CODE');
1039: fnd_msg_pub.add;
1040: x_return_status := fnd_api.g_ret_sts_error;
1041: END IF;
1042: END IF;
1284: FETCH c_dup INTO l_dummy;
1285:
1286: -- key is not unique, push an error onto the stack.
1287: IF NVL(c_dup%FOUND, FALSE) THEN
1288: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
1289: fnd_message.set_token('COLUMN', 'contact_point_id');
1290: fnd_msg_pub.add;
1291: x_return_status := fnd_api.g_ret_sts_error;
1292: END IF;
1285:
1286: -- key is not unique, push an error onto the stack.
1287: IF NVL(c_dup%FOUND, FALSE) THEN
1288: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
1289: fnd_message.set_token('COLUMN', 'contact_point_id');
1290: fnd_msg_pub.add;
1291: x_return_status := fnd_api.g_ret_sts_error;
1292: END IF;
1293: CLOSE c_dup;
1592: l_fk_exist := 'Y';
1593: END IF;
1594:
1595: IF l_fk_exist = 'N' THEN
1596: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
1597: fnd_message.set_token('FK', 'owner_table_id');
1598: fnd_message.set_token('COLUMN', l_fk_column);
1599: fnd_message.set_token('TABLE',
1600: LOWER(p_contact_point_rec.owner_table_name));
1593: END IF;
1594:
1595: IF l_fk_exist = 'N' THEN
1596: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
1597: fnd_message.set_token('FK', 'owner_table_id');
1598: fnd_message.set_token('COLUMN', l_fk_column);
1599: fnd_message.set_token('TABLE',
1600: LOWER(p_contact_point_rec.owner_table_name));
1601: fnd_msg_pub.add;
1594:
1595: IF l_fk_exist = 'N' THEN
1596: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
1597: fnd_message.set_token('FK', 'owner_table_id');
1598: fnd_message.set_token('COLUMN', l_fk_column);
1599: fnd_message.set_token('TABLE',
1600: LOWER(p_contact_point_rec.owner_table_name));
1601: fnd_msg_pub.add;
1602: x_return_status := fnd_api.g_ret_sts_error;
1595: IF l_fk_exist = 'N' THEN
1596: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
1597: fnd_message.set_token('FK', 'owner_table_id');
1598: fnd_message.set_token('COLUMN', l_fk_column);
1599: fnd_message.set_token('TABLE',
1600: LOWER(p_contact_point_rec.owner_table_name));
1601: fnd_msg_pub.add;
1602: x_return_status := fnd_api.g_ret_sts_error;
1603: END IF;
1907: END IF;
1908: END IF;
1909:
1910: IF l_error THEN
1911: fnd_message.set_name('AR', 'HZ_API_INACTIVE_NOT_PRIMARY');
1912: fnd_msg_pub.add;
1913: x_return_status := fnd_api.g_ret_sts_error;
1914: -- reset l_error for later use.
1915: l_error := FALSE;
1950: l_error := TRUE;
1951: END IF;
1952: END IF;
1953: IF l_error THEN
1954: fnd_message.set_name('AR', 'HZ_API_INACTIVE_NOT_PREFERRED');
1955: fnd_msg_pub.add;
1956: x_return_status := fnd_api.g_ret_sts_error;
1957:
1958: -- reset l_error for later use.
1983: IF (p_contact_point_rec.contact_point_purpose IS NULL OR
1984: p_contact_point_rec.contact_point_purpose = FND_API.G_MISS_CHAR)
1985: THEN
1986: -- Error
1987: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
1988: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
1989: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
1990: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
1991: FND_MSG_PUB.ADD;
1984: p_contact_point_rec.contact_point_purpose = FND_API.G_MISS_CHAR)
1985: THEN
1986: -- Error
1987: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
1988: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
1989: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
1990: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
1991: FND_MSG_PUB.ADD;
1992: x_return_status := FND_API.G_RET_STS_ERROR;
1985: THEN
1986: -- Error
1987: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
1988: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
1989: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
1990: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
1991: FND_MSG_PUB.ADD;
1992: x_return_status := FND_API.G_RET_STS_ERROR;
1993:
1986: -- Error
1987: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
1988: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
1989: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
1990: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
1991: FND_MSG_PUB.ADD;
1992: x_return_status := FND_API.G_RET_STS_ERROR;
1993:
1994: END IF;
2002: ( p_contact_point_rec.contact_point_purpose IS NULL AND
2003: l_contact_point_purpose IS NULL))
2004: THEN
2005: -- Error
2006: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
2007: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
2008: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
2009: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
2010: FND_MSG_PUB.ADD;
2003: l_contact_point_purpose IS NULL))
2004: THEN
2005: -- Error
2006: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
2007: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
2008: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
2009: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
2010: FND_MSG_PUB.ADD;
2011: x_return_status := FND_API.G_RET_STS_ERROR;
2004: THEN
2005: -- Error
2006: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
2007: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
2008: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
2009: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
2010: FND_MSG_PUB.ADD;
2011: x_return_status := FND_API.G_RET_STS_ERROR;
2012: END IF;
2005: -- Error
2006: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MAND_DEP_FIELDS' );
2007: FND_MESSAGE.SET_TOKEN('COLUMN1', 'primary_by_purpose');
2008: FND_MESSAGE.SET_TOKEN('VALUE1', 'Y');
2009: FND_MESSAGE.SET_TOKEN('COLUMN2','contact_point_purpose');
2010: FND_MSG_PUB.ADD;
2011: x_return_status := FND_API.G_RET_STS_ERROR;
2012: END IF;
2013: END IF;
2355: END IF;
2356: END IF;
2357:
2358: IF l_error THEN
2359: fnd_message.set_name('AR', 'HZ_INVALID_PHONE_PARAMETER');
2360: fnd_msg_pub.add;
2361: x_return_status := fnd_api.g_ret_sts_error;
2362:
2363: -- Reset l_error for later use.
2447: OPEN c_timezone(p_phone_rec.timezone_id);
2448: FETCH c_timezone INTO l_dummy;
2449:
2450: IF c_timezone%NOTFOUND THEN--updated against bug 7046491
2451: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
2452: fnd_message.set_token('FK', 'upgrade_tz_id');
2453: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
2454: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
2455: fnd_msg_pub.add;
2448: FETCH c_timezone INTO l_dummy;
2449:
2450: IF c_timezone%NOTFOUND THEN--updated against bug 7046491
2451: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
2452: fnd_message.set_token('FK', 'upgrade_tz_id');
2453: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
2454: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
2455: fnd_msg_pub.add;
2456: x_return_status := fnd_api.g_ret_sts_error;
2449:
2450: IF c_timezone%NOTFOUND THEN--updated against bug 7046491
2451: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
2452: fnd_message.set_token('FK', 'upgrade_tz_id');
2453: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
2454: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
2455: fnd_msg_pub.add;
2456: x_return_status := fnd_api.g_ret_sts_error;
2457: END IF;
2450: IF c_timezone%NOTFOUND THEN--updated against bug 7046491
2451: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
2452: fnd_message.set_token('FK', 'upgrade_tz_id');
2453: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
2454: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
2455: fnd_msg_pub.add;
2456: x_return_status := fnd_api.g_ret_sts_error;
2457: END IF;
2458:
2505: FETCH c_countrycode INTO l_dummy;
2506:
2507: IF c_countrycode%NOTFOUND THEN
2508: --Bug 4474646
2509: fnd_message.set_name('AR', 'HZ_INVALID_PHONE_COUNTRY_CODE');
2510: fnd_msg_pub.add;
2511: x_return_status := fnd_api.g_ret_sts_error;
2512: END IF;
2513:
2656: x_return_status => x_return_status);
2657: -- Bug 4693719 : set global variable to Y
2658: HZ_UTILITY_V2PUB.G_UPDATE_ACS := 'Y';
2659:
2660: /*FND_MESSAGE.SET_NAME('AR', 'HZ_NOTALLOW_UPDATE_THIRD_PARTY');
2661: FND_MSG_PUB.ADD;
2662: x_return_status := FND_API.G_RET_STS_ERROR;
2663: */
2664: END IF;
3092: /*IF nvl(p_old_party_rec.orig_system_reference,'X') LIKE 'PER%' THEN
3093: | IF NVL(fnd_profile.value('HZ_CREATED_BY_MODULE'), '-222') <> 'HR API'
3094: | AND p_create_update_flag = 'U'
3095: | THEN
3096: | fnd_message.set_name('AR', 'HZ_CREATED_BY_MISMATCH');
3097: | fnd_msg_pub.add;
3098: | x_return_status := fnd_api.g_ret_sts_error;
3099: | END IF;
3100: | END IF;
3111: |IF NVL(fnd_profile.value('HZ_CREATED_BY_MODULE'), '-222') <> 'HR API'
3112: | AND l_temp_hr_party_exist = 1
3113: | AND p_create_update_flag = 'U'
3114: |THEN
3115: | fnd_message.set_name('AR', 'HZ_CREATED_BY_MISMATCH');
3116: | fnd_msg_pub.add;
3117: | x_return_status := fnd_api.g_ret_sts_error;
3118: |END IF;
3119: */
3262: (p_person_rec.person_last_name <> p_old_person_rec.person_last_name) OR
3263: (p_person_rec.person_pre_name_adjunct <> p_old_person_rec.person_pre_name_adjunct) OR
3264: (p_person_rec.person_name_suffix <> p_old_person_rec.person_name_suffix)
3265: ) THEN
3266: fnd_message.set_name('AR', 'HZ_CUST_NAME_UPDT_NOT_ALLOWED');
3267: fnd_msg_pub.add;
3268: x_return_status := fnd_api.g_ret_sts_error;
3269: END IF;
3270:
3289: IF (p_person_rec.person_first_name = fnd_api.g_miss_char or p_person_rec.person_first_name IS NULL)
3290: AND
3291: (p_person_rec.person_last_name = fnd_api.g_miss_char or p_person_rec.person_last_name IS NULL)
3292: THEN
3293: fnd_message.set_name('AR', 'HZ_FIRST_OR_LAST_NAME_REQUIRED');
3294: fnd_msg_pub.add;
3295: x_return_status := fnd_api.g_ret_sts_error;
3296: END IF;
3297: END IF;
3303: or NVL(p_person_rec.person_first_name,p_old_person_rec.person_first_name)=fnd_api.g_miss_char)
3304: AND
3305: (p_person_rec.person_last_name = fnd_api.g_miss_char
3306: or NVL(p_person_rec.person_last_name,p_old_person_rec.person_last_name)=fnd_api.g_miss_char) THEN
3307: fnd_message.set_name('AR', 'HZ_FIRST_OR_LAST_NAME_REQUIRED');
3308: fnd_msg_pub.add;
3309: x_return_status := fnd_api.g_ret_sts_error;
3310: END IF;
3311: END IF;
3462:
3463: IF p_person_rec.deceased_flag <> 'Y'
3464: THEN
3465:
3466: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
3467: fnd_message.set_token('COLUMN1', 'DATE_OF_DEATH');
3468: fnd_message.set_token('VALUE1', 'not null');
3469: fnd_message.set_token('COLUMN2', 'DECEASED_FLAG');
3470: fnd_message.set_token('VALUE2', 'Y');
3463: IF p_person_rec.deceased_flag <> 'Y'
3464: THEN
3465:
3466: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
3467: fnd_message.set_token('COLUMN1', 'DATE_OF_DEATH');
3468: fnd_message.set_token('VALUE1', 'not null');
3469: fnd_message.set_token('COLUMN2', 'DECEASED_FLAG');
3470: fnd_message.set_token('VALUE2', 'Y');
3471: fnd_msg_pub.add;
3464: THEN
3465:
3466: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
3467: fnd_message.set_token('COLUMN1', 'DATE_OF_DEATH');
3468: fnd_message.set_token('VALUE1', 'not null');
3469: fnd_message.set_token('COLUMN2', 'DECEASED_FLAG');
3470: fnd_message.set_token('VALUE2', 'Y');
3471: fnd_msg_pub.add;
3472: x_return_status := fnd_api.g_ret_sts_error;
3465:
3466: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
3467: fnd_message.set_token('COLUMN1', 'DATE_OF_DEATH');
3468: fnd_message.set_token('VALUE1', 'not null');
3469: fnd_message.set_token('COLUMN2', 'DECEASED_FLAG');
3470: fnd_message.set_token('VALUE2', 'Y');
3471: fnd_msg_pub.add;
3472: x_return_status := fnd_api.g_ret_sts_error;
3473: END IF;
3466: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
3467: fnd_message.set_token('COLUMN1', 'DATE_OF_DEATH');
3468: fnd_message.set_token('VALUE1', 'not null');
3469: fnd_message.set_token('COLUMN2', 'DECEASED_FLAG');
3470: fnd_message.set_token('VALUE2', 'Y');
3471: fnd_msg_pub.add;
3472: x_return_status := fnd_api.g_ret_sts_error;
3473: END IF;
3474:
3492: -------------------------------------------
3493:
3494: -- date_of_birth and date_of_death should be greater than sys_date
3495: IF p_person_rec.date_of_birth > SYSDATE then
3496: fnd_message.set_name('AR','HZ_API_NO_FUTURE_DATE_ALLOWED');
3497: fnd_message.set_token('COLUMN','DATE_OF_BIRTH');
3498: fnd_msg_pub.add;
3499: x_return_status := fnd_api.g_ret_sts_error;
3500: END IF;
3493:
3494: -- date_of_birth and date_of_death should be greater than sys_date
3495: IF p_person_rec.date_of_birth > SYSDATE then
3496: fnd_message.set_name('AR','HZ_API_NO_FUTURE_DATE_ALLOWED');
3497: fnd_message.set_token('COLUMN','DATE_OF_BIRTH');
3498: fnd_msg_pub.add;
3499: x_return_status := fnd_api.g_ret_sts_error;
3500: END IF;
3501:
3499: x_return_status := fnd_api.g_ret_sts_error;
3500: END IF;
3501:
3502: IF p_person_rec.date_of_death > SYSDATE then
3503: fnd_message.set_name('AR','HZ_API_NO_FUTURE_DATE_ALLOWED');
3504: fnd_message.set_token('COLUMN','DATE_OF_DEATH');
3505: fnd_msg_pub.add;
3506: x_return_status := fnd_api.g_ret_sts_error;
3507: END IF;
3500: END IF;
3501:
3502: IF p_person_rec.date_of_death > SYSDATE then
3503: fnd_message.set_name('AR','HZ_API_NO_FUTURE_DATE_ALLOWED');
3504: fnd_message.set_token('COLUMN','DATE_OF_DEATH');
3505: fnd_msg_pub.add;
3506: x_return_status := fnd_api.g_ret_sts_error;
3507: END IF;
3508:
3896:
3897: IF(cols_updated IS NOT NULL)
3898: THEN
3899: cols_updated:=SUBSTR(cols_updated,2);
3900: FND_MESSAGE.SET_NAME('AR', 'HZ_CREATED_BY_MISMATCH');
3901: FND_MESSAGE.SET_TOKEN('COLUMN',cols_updated);
3902: FND_MSG_PUB.ADD;
3903: x_return_status := FND_API.G_RET_STS_ERROR;
3904: END IF;
3897: IF(cols_updated IS NOT NULL)
3898: THEN
3899: cols_updated:=SUBSTR(cols_updated,2);
3900: FND_MESSAGE.SET_NAME('AR', 'HZ_CREATED_BY_MISMATCH');
3901: FND_MESSAGE.SET_TOKEN('COLUMN',cols_updated);
3902: FND_MSG_PUB.ADD;
3903: x_return_status := FND_API.G_RET_STS_ERROR;
3904: END IF;
3905:
3979:
3980: IF(cols_updated IS NOT NULL)
3981: THEN
3982: cols_updated:=SUBSTR(cols_updated,2);
3983: FND_MESSAGE.SET_NAME('AR', 'HZ_CREATED_BY_MISMATCH');
3984: FND_MESSAGE.SET_TOKEN('COLUMN',cols_updated);
3985: FND_MSG_PUB.ADD;
3986: x_return_status := FND_API.G_RET_STS_ERROR;
3987: END IF;
3980: IF(cols_updated IS NOT NULL)
3981: THEN
3982: cols_updated:=SUBSTR(cols_updated,2);
3983: FND_MESSAGE.SET_NAME('AR', 'HZ_CREATED_BY_MISMATCH');
3984: FND_MESSAGE.SET_TOKEN('COLUMN',cols_updated);
3985: FND_MSG_PUB.ADD;
3986: x_return_status := FND_API.G_RET_STS_ERROR;
3987: END IF;
3988:
4243: l_change_org_name_profile := fnd_profile.VALUE('AR_CHANGE_CUST_NAME');
4244: IF (NVL(l_change_org_name_profile,'Y') = 'N') THEN -- update to party name is not allowed
4245:
4246: IF (p_organization_rec.organization_name <> p_old_organization_rec.organization_name) THEN
4247: fnd_message.set_name('AR', 'HZ_ORG_NAME_UPDT_NOT_ALLOWED');
4248: fnd_msg_pub.add;
4249: x_return_status := fnd_api.g_ret_sts_error;
4250: END IF;
4251:
5434: AND CURRENCY_FLAG = 'Y'
5435: AND ENABLED_FLAG in ('Y', 'N');
5436: EXCEPTION
5437: WHEN NO_DATA_FOUND THEN
5438: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5439: fnd_message.set_token('FK', 'maximum_credit_currency_code');
5440: fnd_message.set_token('COLUMN', 'currency_code');
5441: fnd_message.set_token('TABLE', 'fnd_currencies');
5442: fnd_msg_pub.add;
5435: AND ENABLED_FLAG in ('Y', 'N');
5436: EXCEPTION
5437: WHEN NO_DATA_FOUND THEN
5438: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5439: fnd_message.set_token('FK', 'maximum_credit_currency_code');
5440: fnd_message.set_token('COLUMN', 'currency_code');
5441: fnd_message.set_token('TABLE', 'fnd_currencies');
5442: fnd_msg_pub.add;
5443: x_return_status := fnd_api.g_ret_sts_error;
5436: EXCEPTION
5437: WHEN NO_DATA_FOUND THEN
5438: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5439: fnd_message.set_token('FK', 'maximum_credit_currency_code');
5440: fnd_message.set_token('COLUMN', 'currency_code');
5441: fnd_message.set_token('TABLE', 'fnd_currencies');
5442: fnd_msg_pub.add;
5443: x_return_status := fnd_api.g_ret_sts_error;
5444: END;
5437: WHEN NO_DATA_FOUND THEN
5438: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5439: fnd_message.set_token('FK', 'maximum_credit_currency_code');
5440: fnd_message.set_token('COLUMN', 'currency_code');
5441: fnd_message.set_token('TABLE', 'fnd_currencies');
5442: fnd_msg_pub.add;
5443: x_return_status := fnd_api.g_ret_sts_error;
5444: END;
5445:
5689: FROM HZ_PARTIES
5690: WHERE PARTY_ID = p_organization_rec.displayed_duns_party_id;
5691: EXCEPTION
5692: WHEN NO_DATA_FOUND THEN
5693: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5694: fnd_message.set_token('FK', 'displayed_duns_party_id');
5695: fnd_message.set_token('COLUMN', 'party_id');
5696: fnd_message.set_token('TABLE', 'hz_parties');
5697: fnd_msg_pub.add;
5690: WHERE PARTY_ID = p_organization_rec.displayed_duns_party_id;
5691: EXCEPTION
5692: WHEN NO_DATA_FOUND THEN
5693: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5694: fnd_message.set_token('FK', 'displayed_duns_party_id');
5695: fnd_message.set_token('COLUMN', 'party_id');
5696: fnd_message.set_token('TABLE', 'hz_parties');
5697: fnd_msg_pub.add;
5698: x_return_status := fnd_api.g_ret_sts_error;
5691: EXCEPTION
5692: WHEN NO_DATA_FOUND THEN
5693: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5694: fnd_message.set_token('FK', 'displayed_duns_party_id');
5695: fnd_message.set_token('COLUMN', 'party_id');
5696: fnd_message.set_token('TABLE', 'hz_parties');
5697: fnd_msg_pub.add;
5698: x_return_status := fnd_api.g_ret_sts_error;
5699: END;
5692: WHEN NO_DATA_FOUND THEN
5693: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
5694: fnd_message.set_token('FK', 'displayed_duns_party_id');
5695: fnd_message.set_token('COLUMN', 'party_id');
5696: fnd_message.set_token('TABLE', 'hz_parties');
5697: fnd_msg_pub.add;
5698: x_return_status := fnd_api.g_ret_sts_error;
5699: END;
5700:
5835: -- Now even_sum contains (3 times (even_sum)) + odd_sum
5836:
5837: IF ( check_digit + even_sum ) MOD 10 <> 0
5838: THEN -- Global location number did not satisfy the check digit validation.
5839: FND_MESSAGE.SET_NAME('AR','HZ_API_GLOBAL_LOC_NUM_ERRORS');
5840: FND_MSG_PUB.ADD;
5841: x_return_status := FND_API.G_RET_STS_ERROR;
5842: END IF;
5843:
5841: x_return_status := FND_API.G_RET_STS_ERROR;
5842: END IF;
5843:
5844: ELSE -- Global_location_number is not 13 digits long.
5845: FND_MESSAGE.SET_NAME('AR','HZ_API_GLOBAL_LOC_NUM_ERRORS');
5846: FND_MSG_PUB.ADD;
5847: x_return_status := FND_API.G_RET_STS_ERROR;
5848: END IF;
5849:
5850: ELSE -- corresponding to IF TRIM(TRANSLATE(global_location_number,'0123456789',' '))
5851:
5852: -- Since there are non numeric characters, therefore the expression evaluated in the if
5853: -- clause is not null.
5854: FND_MESSAGE.SET_NAME('AR','HZ_API_GLOBAL_LOC_NUM_ERRORS');
5855: FND_MSG_PUB.ADD;
5856: x_return_status := FND_API.G_RET_STS_ERROR;
5857: END IF;
5858:
6044: FROM HZ_PARTIES
6045: WHERE PARTY_ID = p_party_site_rec.party_id;
6046: EXCEPTION
6047: WHEN NO_DATA_FOUND THEN
6048: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6049: fnd_message.set_token('FK', 'party_id');
6050: fnd_message.set_token('COLUMN', 'party_id');
6051: fnd_message.set_token('TABLE', 'hz_parties');
6052: fnd_msg_pub.add;
6045: WHERE PARTY_ID = p_party_site_rec.party_id;
6046: EXCEPTION
6047: WHEN NO_DATA_FOUND THEN
6048: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6049: fnd_message.set_token('FK', 'party_id');
6050: fnd_message.set_token('COLUMN', 'party_id');
6051: fnd_message.set_token('TABLE', 'hz_parties');
6052: fnd_msg_pub.add;
6053: x_return_status := fnd_api.g_ret_sts_error;
6046: EXCEPTION
6047: WHEN NO_DATA_FOUND THEN
6048: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6049: fnd_message.set_token('FK', 'party_id');
6050: fnd_message.set_token('COLUMN', 'party_id');
6051: fnd_message.set_token('TABLE', 'hz_parties');
6052: fnd_msg_pub.add;
6053: x_return_status := fnd_api.g_ret_sts_error;
6054: END;
6047: WHEN NO_DATA_FOUND THEN
6048: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6049: fnd_message.set_token('FK', 'party_id');
6050: fnd_message.set_token('COLUMN', 'party_id');
6051: fnd_message.set_token('TABLE', 'hz_parties');
6052: fnd_msg_pub.add;
6053: x_return_status := fnd_api.g_ret_sts_error;
6054: END;
6055:
6136: FROM HZ_LOCATIONS
6137: WHERE LOCATION_ID = p_party_site_rec.location_id;
6138: EXCEPTION
6139: WHEN NO_DATA_FOUND THEN
6140: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6141: fnd_message.set_token('FK', 'location_id');
6142: fnd_message.set_token('COLUMN', 'location_id');
6143: fnd_message.set_token('TABLE', 'hz_locations');
6144: fnd_msg_pub.add;
6137: WHERE LOCATION_ID = p_party_site_rec.location_id;
6138: EXCEPTION
6139: WHEN NO_DATA_FOUND THEN
6140: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6141: fnd_message.set_token('FK', 'location_id');
6142: fnd_message.set_token('COLUMN', 'location_id');
6143: fnd_message.set_token('TABLE', 'hz_locations');
6144: fnd_msg_pub.add;
6145: x_return_status := fnd_api.g_ret_sts_error;
6138: EXCEPTION
6139: WHEN NO_DATA_FOUND THEN
6140: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6141: fnd_message.set_token('FK', 'location_id');
6142: fnd_message.set_token('COLUMN', 'location_id');
6143: fnd_message.set_token('TABLE', 'hz_locations');
6144: fnd_msg_pub.add;
6145: x_return_status := fnd_api.g_ret_sts_error;
6146: END;
6139: WHEN NO_DATA_FOUND THEN
6140: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6141: fnd_message.set_token('FK', 'location_id');
6142: fnd_message.set_token('COLUMN', 'location_id');
6143: fnd_message.set_token('TABLE', 'hz_locations');
6144: fnd_msg_pub.add;
6145: x_return_status := fnd_api.g_ret_sts_error;
6146: END;
6147:
6281: l_status = 'I' AND
6282: p_party_site_rec.status = 'A'
6283: THEN
6284: /* new message */
6285: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_CANT_ACTIVATE_SITE' );
6286: FND_MSG_PUB.ADD;
6287: x_return_status := FND_API.G_RET_STS_ERROR;
6288: END IF;
6289: END IF;
6370: INTO l_dummy
6371: FROM dual;
6372:
6373: IF l_dummy <> 'Y' THEN
6374: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
6375: fnd_message.set_token('ENTITY', 'Site');
6376: -- fnd_message.set_token('COLUMN1', 'identifying_address');
6377: -- fnd_message.set_token('COLUMN2', 'status');
6378: fnd_msg_pub.add;
6371: FROM dual;
6372:
6373: IF l_dummy <> 'Y' THEN
6374: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
6375: fnd_message.set_token('ENTITY', 'Site');
6376: -- fnd_message.set_token('COLUMN1', 'identifying_address');
6377: -- fnd_message.set_token('COLUMN2', 'status');
6378: fnd_msg_pub.add;
6379: x_return_status := FND_API.G_RET_STS_ERROR;
6372:
6373: IF l_dummy <> 'Y' THEN
6374: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
6375: fnd_message.set_token('ENTITY', 'Site');
6376: -- fnd_message.set_token('COLUMN1', 'identifying_address');
6377: -- fnd_message.set_token('COLUMN2', 'status');
6378: fnd_msg_pub.add;
6379: x_return_status := FND_API.G_RET_STS_ERROR;
6380: END IF;
6373: IF l_dummy <> 'Y' THEN
6374: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
6375: fnd_message.set_token('ENTITY', 'Site');
6376: -- fnd_message.set_token('COLUMN1', 'identifying_address');
6377: -- fnd_message.set_token('COLUMN2', 'status');
6378: fnd_msg_pub.add;
6379: x_return_status := FND_API.G_RET_STS_ERROR;
6380: END IF;
6381:
6413: WHERE LANGUAGE_CODE = p_party_site_rec.language
6414: AND INSTALLED_FLAG IN ('B', 'I');
6415: EXCEPTION
6416: WHEN NO_DATA_FOUND THEN
6417: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6418: fnd_message.set_token('FK', 'language');
6419: fnd_message.set_token('COLUMN', 'language_code');
6420: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
6421: fnd_msg_pub.add;
6414: AND INSTALLED_FLAG IN ('B', 'I');
6415: EXCEPTION
6416: WHEN NO_DATA_FOUND THEN
6417: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6418: fnd_message.set_token('FK', 'language');
6419: fnd_message.set_token('COLUMN', 'language_code');
6420: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
6421: fnd_msg_pub.add;
6422: x_return_status := fnd_api.g_ret_sts_error;
6415: EXCEPTION
6416: WHEN NO_DATA_FOUND THEN
6417: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6418: fnd_message.set_token('FK', 'language');
6419: fnd_message.set_token('COLUMN', 'language_code');
6420: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
6421: fnd_msg_pub.add;
6422: x_return_status := fnd_api.g_ret_sts_error;
6423: END;
6416: WHEN NO_DATA_FOUND THEN
6417: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6418: fnd_message.set_token('FK', 'language');
6419: fnd_message.set_token('COLUMN', 'language_code');
6420: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
6421: fnd_msg_pub.add;
6422: x_return_status := fnd_api.g_ret_sts_error;
6423: END;
6424:
6628: FROM HZ_PARTY_SITES
6629: WHERE PARTY_SITE_ID = p_party_site_use_rec.party_site_id;
6630: EXCEPTION
6631: WHEN NO_DATA_FOUND THEN
6632: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6633: fnd_message.set_token('FK', 'party_site_id');
6634: fnd_message.set_token('COLUMN', 'party_site_id');
6635: fnd_message.set_token('TABLE', 'hz_party_sites');
6636: fnd_msg_pub.add;
6629: WHERE PARTY_SITE_ID = p_party_site_use_rec.party_site_id;
6630: EXCEPTION
6631: WHEN NO_DATA_FOUND THEN
6632: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6633: fnd_message.set_token('FK', 'party_site_id');
6634: fnd_message.set_token('COLUMN', 'party_site_id');
6635: fnd_message.set_token('TABLE', 'hz_party_sites');
6636: fnd_msg_pub.add;
6637: x_return_status := fnd_api.g_ret_sts_error;
6630: EXCEPTION
6631: WHEN NO_DATA_FOUND THEN
6632: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6633: fnd_message.set_token('FK', 'party_site_id');
6634: fnd_message.set_token('COLUMN', 'party_site_id');
6635: fnd_message.set_token('TABLE', 'hz_party_sites');
6636: fnd_msg_pub.add;
6637: x_return_status := fnd_api.g_ret_sts_error;
6638: END;
6631: WHEN NO_DATA_FOUND THEN
6632: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
6633: fnd_message.set_token('FK', 'party_site_id');
6634: fnd_message.set_token('COLUMN', 'party_site_id');
6635: fnd_message.set_token('TABLE', 'hz_party_sites');
6636: fnd_msg_pub.add;
6637: x_return_status := fnd_api.g_ret_sts_error;
6638: END;
6639:
6762: AND SITE_USE_TYPE = nvl(p_party_site_use_rec.site_use_type,l_site_use_type)
6763: AND STATUS = 'A'
6764: AND PARTY_SITE_USE_ID <> NVL(p_party_site_use_rec.party_site_use_id, fnd_api.g_miss_num);
6765:
6766: fnd_message.set_name('AR', 'HZ_API_UNIQUE_SITE_USE_TYPE');
6767: fnd_msg_pub.add;
6768: x_return_status := fnd_api.g_ret_sts_error;
6769:
6770: EXCEPTION
6863:
6864: IF NVL(p_party_site_use_rec.primary_per_type,l_primary_per_type) ='Y'
6865: AND NVL(p_party_site_use_rec.status,l_status) = 'I'
6866: THEN
6867: FND_MESSAGE.SET_NAME('AR','HZ_API_INACTIVE_CANNOT_PRIM');
6868: FND_MESSAGE.SET_TOKEN('ENTITY','Party Site Use');
6869: -- FND_MESSAGE.SET_TOKEN('COLUMN1','PRIMARY_PER_TYPE');
6870: -- FND_MESSAGE.SET_TOKEN('COLUMN2','STATUS');
6871: FND_MSG_PUB.ADD;
6864: IF NVL(p_party_site_use_rec.primary_per_type,l_primary_per_type) ='Y'
6865: AND NVL(p_party_site_use_rec.status,l_status) = 'I'
6866: THEN
6867: FND_MESSAGE.SET_NAME('AR','HZ_API_INACTIVE_CANNOT_PRIM');
6868: FND_MESSAGE.SET_TOKEN('ENTITY','Party Site Use');
6869: -- FND_MESSAGE.SET_TOKEN('COLUMN1','PRIMARY_PER_TYPE');
6870: -- FND_MESSAGE.SET_TOKEN('COLUMN2','STATUS');
6871: FND_MSG_PUB.ADD;
6872: x_return_status := FND_API.G_RET_STS_ERROR;
6865: AND NVL(p_party_site_use_rec.status,l_status) = 'I'
6866: THEN
6867: FND_MESSAGE.SET_NAME('AR','HZ_API_INACTIVE_CANNOT_PRIM');
6868: FND_MESSAGE.SET_TOKEN('ENTITY','Party Site Use');
6869: -- FND_MESSAGE.SET_TOKEN('COLUMN1','PRIMARY_PER_TYPE');
6870: -- FND_MESSAGE.SET_TOKEN('COLUMN2','STATUS');
6871: FND_MSG_PUB.ADD;
6872: x_return_status := FND_API.G_RET_STS_ERROR;
6873: END IF;
6866: THEN
6867: FND_MESSAGE.SET_NAME('AR','HZ_API_INACTIVE_CANNOT_PRIM');
6868: FND_MESSAGE.SET_TOKEN('ENTITY','Party Site Use');
6869: -- FND_MESSAGE.SET_TOKEN('COLUMN1','PRIMARY_PER_TYPE');
6870: -- FND_MESSAGE.SET_TOKEN('COLUMN2','STATUS');
6871: FND_MSG_PUB.ADD;
6872: x_return_status := FND_API.G_RET_STS_ERROR;
6873: END IF;
6874:
7181: FROM HZ_PARTY_SITES
7182: WHERE PARTY_SITE_ID = p_org_contact_rec.party_site_id;
7183: EXCEPTION
7184: WHEN NO_DATA_FOUND THEN
7185: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7186: fnd_message.set_token('FK', 'party_site_id');
7187: fnd_message.set_token('COLUMN', 'party_site_id');
7188: fnd_message.set_token('TABLE', 'hz_party_sites');
7189: fnd_msg_pub.add;
7182: WHERE PARTY_SITE_ID = p_org_contact_rec.party_site_id;
7183: EXCEPTION
7184: WHEN NO_DATA_FOUND THEN
7185: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7186: fnd_message.set_token('FK', 'party_site_id');
7187: fnd_message.set_token('COLUMN', 'party_site_id');
7188: fnd_message.set_token('TABLE', 'hz_party_sites');
7189: fnd_msg_pub.add;
7190: x_return_status := fnd_api.g_ret_sts_error;
7183: EXCEPTION
7184: WHEN NO_DATA_FOUND THEN
7185: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7186: fnd_message.set_token('FK', 'party_site_id');
7187: fnd_message.set_token('COLUMN', 'party_site_id');
7188: fnd_message.set_token('TABLE', 'hz_party_sites');
7189: fnd_msg_pub.add;
7190: x_return_status := fnd_api.g_ret_sts_error;
7191: END;
7184: WHEN NO_DATA_FOUND THEN
7185: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7186: fnd_message.set_token('FK', 'party_site_id');
7187: fnd_message.set_token('COLUMN', 'party_site_id');
7188: fnd_message.set_token('TABLE', 'hz_party_sites');
7189: fnd_msg_pub.add;
7190: x_return_status := fnd_api.g_ret_sts_error;
7191: END;
7192:
7219: WHERE PARTY_SITE_ID = p_org_contact_rec.party_site_id
7220: AND PARTY_ID = p_org_contact_rec.party_rel_rec.object_id;
7221: EXCEPTION
7222: WHEN NO_DATA_FOUND THEN
7223: fnd_message.set_name('AR', 'HZ_API_PARTY_OBJECT_MISMATCH');
7224: fnd_msg_pub.add;
7225: x_return_status := fnd_api.g_ret_sts_error;
7226: END;
7227:
7410: FROM HZ_ORG_CONTACTS
7411: WHERE ORG_CONTACT_ID = p_org_contact_role_rec.org_contact_id;
7412: EXCEPTION
7413: WHEN NO_DATA_FOUND THEN
7414: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7415: fnd_message.set_token('FK', 'org_contact_id');
7416: fnd_message.set_token('COLUMN', 'org_contact_id');
7417: fnd_message.set_token('TABLE', 'hz_org_contacts');
7418: fnd_msg_pub.add;
7411: WHERE ORG_CONTACT_ID = p_org_contact_role_rec.org_contact_id;
7412: EXCEPTION
7413: WHEN NO_DATA_FOUND THEN
7414: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7415: fnd_message.set_token('FK', 'org_contact_id');
7416: fnd_message.set_token('COLUMN', 'org_contact_id');
7417: fnd_message.set_token('TABLE', 'hz_org_contacts');
7418: fnd_msg_pub.add;
7419: x_return_status := fnd_api.g_ret_sts_error;
7412: EXCEPTION
7413: WHEN NO_DATA_FOUND THEN
7414: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7415: fnd_message.set_token('FK', 'org_contact_id');
7416: fnd_message.set_token('COLUMN', 'org_contact_id');
7417: fnd_message.set_token('TABLE', 'hz_org_contacts');
7418: fnd_msg_pub.add;
7419: x_return_status := fnd_api.g_ret_sts_error;
7420: END;
7413: WHEN NO_DATA_FOUND THEN
7414: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7415: fnd_message.set_token('FK', 'org_contact_id');
7416: fnd_message.set_token('COLUMN', 'org_contact_id');
7417: fnd_message.set_token('TABLE', 'hz_org_contacts');
7418: fnd_msg_pub.add;
7419: x_return_status := fnd_api.g_ret_sts_error;
7420: END;
7421:
7597: AND ROWNUM = 1;
7598: /* Bug Fix: 3936336 */
7599: IF l_role_id <> p_org_contact_role_rec.org_contact_role_id OR
7600: p_create_update_flag = 'C' THEN
7601: fnd_message.set_name('AR', 'HZ_API_UNIQUE_PRIMARY_ROLE');
7602: fnd_msg_pub.add;
7603: x_return_status := fnd_api.g_ret_sts_error;
7604: END IF;
7605: EXCEPTION
7639: AND STATUS = 'A' -- Added: Bug#6411541
7640: AND ROWNUM = 1;
7641:
7642: IF l_role_id <> nvl(p_org_contact_role_rec.org_contact_role_id, fnd_api.g_miss_num) THEN
7643: fnd_message.set_name('AR', 'HZ_API_UNIQUE_ROLE_TYPE');
7644: fnd_msg_pub.add;
7645: x_return_status := fnd_api.g_ret_sts_error;
7646: END IF;
7647: EXCEPTION
7711: AND PR2.OBJECT_TABLE_NAME = 'HZ_PARTIES'
7712: AND PR2.DIRECTIONAL_FLAG = 'F'
7713: and ocr.org_contact_role_id <>p_org_contact_role_rec.org_contact_role_id; --db primary role id is not same as the pass in role id
7714:
7715: fnd_message.set_name('AR', 'HZ_API_UNIQUE_PRIMARY_ORG_CONT');
7716: fnd_msg_pub.add;
7717: x_return_status := fnd_api.g_ret_sts_error;
7718: EXCEPTION
7719: WHEN NO_DATA_FOUND THEN
7968: WHERE party_id = p_person_language_rec.party_id;
7969:
7970: EXCEPTION
7971: WHEN NO_DATA_FOUND THEN
7972: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7973: fnd_message.set_token('FK', 'party_id');
7974: fnd_message.set_token('COLUMN', 'party_id');
7975: fnd_message.set_token('TABLE', 'hz_parties');
7976: fnd_msg_pub.add;
7969:
7970: EXCEPTION
7971: WHEN NO_DATA_FOUND THEN
7972: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7973: fnd_message.set_token('FK', 'party_id');
7974: fnd_message.set_token('COLUMN', 'party_id');
7975: fnd_message.set_token('TABLE', 'hz_parties');
7976: fnd_msg_pub.add;
7977: x_return_status := fnd_api.g_ret_sts_error;
7970: EXCEPTION
7971: WHEN NO_DATA_FOUND THEN
7972: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7973: fnd_message.set_token('FK', 'party_id');
7974: fnd_message.set_token('COLUMN', 'party_id');
7975: fnd_message.set_token('TABLE', 'hz_parties');
7976: fnd_msg_pub.add;
7977: x_return_status := fnd_api.g_ret_sts_error;
7978: END;
7971: WHEN NO_DATA_FOUND THEN
7972: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
7973: fnd_message.set_token('FK', 'party_id');
7974: fnd_message.set_token('COLUMN', 'party_id');
7975: fnd_message.set_token('TABLE', 'hz_parties');
7976: fnd_msg_pub.add;
7977: x_return_status := fnd_api.g_ret_sts_error;
7978: END;
7979:
8051: FROM FND_LANGUAGES
8052: WHERE LANGUAGE_CODE = p_person_language_rec.language_name;
8053: EXCEPTION
8054: WHEN NO_DATA_FOUND THEN
8055: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
8056: fnd_message.set_token('FK', 'language_name');
8057: fnd_message.set_token('COLUMN', 'language_code');
8058: fnd_message.set_token('TABLE', 'fnd_languages');
8059: fnd_msg_pub.add;
8052: WHERE LANGUAGE_CODE = p_person_language_rec.language_name;
8053: EXCEPTION
8054: WHEN NO_DATA_FOUND THEN
8055: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
8056: fnd_message.set_token('FK', 'language_name');
8057: fnd_message.set_token('COLUMN', 'language_code');
8058: fnd_message.set_token('TABLE', 'fnd_languages');
8059: fnd_msg_pub.add;
8060: x_return_status := fnd_api.g_ret_sts_error;
8053: EXCEPTION
8054: WHEN NO_DATA_FOUND THEN
8055: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
8056: fnd_message.set_token('FK', 'language_name');
8057: fnd_message.set_token('COLUMN', 'language_code');
8058: fnd_message.set_token('TABLE', 'fnd_languages');
8059: fnd_msg_pub.add;
8060: x_return_status := fnd_api.g_ret_sts_error;
8061: END;
8054: WHEN NO_DATA_FOUND THEN
8055: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
8056: fnd_message.set_token('FK', 'language_name');
8057: fnd_message.set_token('COLUMN', 'language_code');
8058: fnd_message.set_token('TABLE', 'fnd_languages');
8059: fnd_msg_pub.add;
8060: x_return_status := fnd_api.g_ret_sts_error;
8061: END;
8062:
8083: WHERE PARTY_ID = l_party_id
8084: AND LANGUAGE_NAME = p_person_language_rec.language_name
8085: AND LANGUAGE_USE_REFERENCE_ID <> NVL(p_person_language_rec.language_use_reference_id, fnd_api.g_miss_num);
8086:
8087: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
8088: fnd_message.set_token('COLUMN', 'language_name');
8089: fnd_msg_pub.add;
8090: x_return_status := fnd_api.g_ret_sts_error;
8091:
8084: AND LANGUAGE_NAME = p_person_language_rec.language_name
8085: AND LANGUAGE_USE_REFERENCE_ID <> NVL(p_person_language_rec.language_use_reference_id, fnd_api.g_miss_num);
8086:
8087: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
8088: fnd_message.set_token('COLUMN', 'language_name');
8089: fnd_msg_pub.add;
8090: x_return_status := fnd_api.g_ret_sts_error;
8091:
8092: EXCEPTION
8243: INTO l_dummy
8244: FROM dual;
8245:
8246: IF l_dummy <> 'Y' THEN
8247: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8248: fnd_message.set_token('ENTITY', 'language');
8249: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8250: -- fnd_message.set_token('COLUMN2', 'status');
8251: fnd_msg_pub.add;
8244: FROM dual;
8245:
8246: IF l_dummy <> 'Y' THEN
8247: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8248: fnd_message.set_token('ENTITY', 'language');
8249: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8250: -- fnd_message.set_token('COLUMN2', 'status');
8251: fnd_msg_pub.add;
8252: x_return_status := FND_API.G_RET_STS_ERROR;
8245:
8246: IF l_dummy <> 'Y' THEN
8247: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8248: fnd_message.set_token('ENTITY', 'language');
8249: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8250: -- fnd_message.set_token('COLUMN2', 'status');
8251: fnd_msg_pub.add;
8252: x_return_status := FND_API.G_RET_STS_ERROR;
8253: END IF;
8246: IF l_dummy <> 'Y' THEN
8247: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8248: fnd_message.set_token('ENTITY', 'language');
8249: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8250: -- fnd_message.set_token('COLUMN2', 'status');
8251: fnd_msg_pub.add;
8252: x_return_status := FND_API.G_RET_STS_ERROR;
8253: END IF;
8254:
8259: THEN
8260: IF (p_person_language_rec.primary_language_indicator = 'Y'
8261: AND p_person_language_rec.status = 'I')
8262: THEN
8263: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8264: fnd_message.set_token('ENTITY', 'Language');
8265: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8266: -- fnd_message.set_token('COLUMN2', 'status');
8267: fnd_msg_pub.add;
8260: IF (p_person_language_rec.primary_language_indicator = 'Y'
8261: AND p_person_language_rec.status = 'I')
8262: THEN
8263: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8264: fnd_message.set_token('ENTITY', 'Language');
8265: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8266: -- fnd_message.set_token('COLUMN2', 'status');
8267: fnd_msg_pub.add;
8268: x_return_status := FND_API.G_RET_STS_ERROR;
8261: AND p_person_language_rec.status = 'I')
8262: THEN
8263: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8264: fnd_message.set_token('ENTITY', 'Language');
8265: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8266: -- fnd_message.set_token('COLUMN2', 'status');
8267: fnd_msg_pub.add;
8268: x_return_status := FND_API.G_RET_STS_ERROR;
8269:
8262: THEN
8263: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8264: fnd_message.set_token('ENTITY', 'Language');
8265: -- fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8266: -- fnd_message.set_token('COLUMN2', 'status');
8267: fnd_msg_pub.add;
8268: x_return_status := FND_API.G_RET_STS_ERROR;
8269:
8270: IF fnd_log.level_statement>=fnd_log.g_current_runtime_level THEN
8278: ELSE -- p_create_update_flag = 'U'
8279: IF (NVL(p_person_language_rec.primary_language_indicator,l_primary_language_indicator)='Y'
8280: AND NVL(p_person_language_rec.status,l_status)='I')
8281: THEN
8282: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8283: fnd_message.set_token('ENTITY', 'Language');
8284: --fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8285: -- fnd_message.set_token('COLUMN2', 'status');
8286: fnd_msg_pub.add;
8279: IF (NVL(p_person_language_rec.primary_language_indicator,l_primary_language_indicator)='Y'
8280: AND NVL(p_person_language_rec.status,l_status)='I')
8281: THEN
8282: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8283: fnd_message.set_token('ENTITY', 'Language');
8284: --fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8285: -- fnd_message.set_token('COLUMN2', 'status');
8286: fnd_msg_pub.add;
8287: x_return_status := FND_API.G_RET_STS_ERROR;
8280: AND NVL(p_person_language_rec.status,l_status)='I')
8281: THEN
8282: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8283: fnd_message.set_token('ENTITY', 'Language');
8284: --fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8285: -- fnd_message.set_token('COLUMN2', 'status');
8286: fnd_msg_pub.add;
8287: x_return_status := FND_API.G_RET_STS_ERROR;
8288:
8281: THEN
8282: fnd_message.set_name('AR', 'HZ_API_INACTIVE_CANNOT_PRIM');
8283: fnd_message.set_token('ENTITY', 'Language');
8284: --fnd_message.set_token('COLUMN1', 'primary_language_indicator');
8285: -- fnd_message.set_token('COLUMN2', 'status');
8286: fnd_msg_pub.add;
8287: x_return_status := FND_API.G_RET_STS_ERROR;
8288:
8289: IF fnd_log.level_statement>=fnd_log.g_current_runtime_level THEN
8440: FETCH citizen_cur INTO l_dummy;
8441:
8442: -- key is not unique, push an error onto the stack.
8443: IF NVL(citizen_cur%FOUND, FALSE) THEN
8444: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
8445: fnd_message.set_token('COLUMN', 'citizenship_id');
8446: fnd_msg_pub.add;
8447: x_return_status := fnd_api.g_ret_sts_error;
8448: END IF;
8441:
8442: -- key is not unique, push an error onto the stack.
8443: IF NVL(citizen_cur%FOUND, FALSE) THEN
8444: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
8445: fnd_message.set_token('COLUMN', 'citizenship_id');
8446: fnd_msg_pub.add;
8447: x_return_status := fnd_api.g_ret_sts_error;
8448: END IF;
8449: CLOSE citizen_cur;
8568: p.party_id = p_citizenship_rec.party_id;
8569:
8570: EXCEPTION
8571: WHEN NO_DATA_FOUND THEN
8572: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
8573: -- fnd_message.set_token('FK', 'party_id');
8574: fnd_message.set_token('TABLE_NAME', 'HZ_CITIZENSHIP');
8575: fnd_message.set_token('PARTY_ID_COL', 'party_id');
8576: fnd_msg_pub.add;
8569:
8570: EXCEPTION
8571: WHEN NO_DATA_FOUND THEN
8572: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
8573: -- fnd_message.set_token('FK', 'party_id');
8574: fnd_message.set_token('TABLE_NAME', 'HZ_CITIZENSHIP');
8575: fnd_message.set_token('PARTY_ID_COL', 'party_id');
8576: fnd_msg_pub.add;
8577: x_return_status := fnd_api.g_ret_sts_error;
8570: EXCEPTION
8571: WHEN NO_DATA_FOUND THEN
8572: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
8573: -- fnd_message.set_token('FK', 'party_id');
8574: fnd_message.set_token('TABLE_NAME', 'HZ_CITIZENSHIP');
8575: fnd_message.set_token('PARTY_ID_COL', 'party_id');
8576: fnd_msg_pub.add;
8577: x_return_status := fnd_api.g_ret_sts_error;
8578: END;
8571: WHEN NO_DATA_FOUND THEN
8572: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
8573: -- fnd_message.set_token('FK', 'party_id');
8574: fnd_message.set_token('TABLE_NAME', 'HZ_CITIZENSHIP');
8575: fnd_message.set_token('PARTY_ID_COL', 'party_id');
8576: fnd_msg_pub.add;
8577: x_return_status := fnd_api.g_ret_sts_error;
8578: END;
8579:
8884: FETCH education_cur INTO l_dummy;
8885:
8886: -- key is not unique, push an error onto the stack.
8887: IF NVL(education_cur%FOUND, FALSE) THEN
8888: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
8889: fnd_message.set_token('COLUMN', 'education_id');
8890: fnd_msg_pub.add;
8891: x_return_status := fnd_api.g_ret_sts_error;
8892: END IF;
8885:
8886: -- key is not unique, push an error onto the stack.
8887: IF NVL(education_cur%FOUND, FALSE) THEN
8888: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
8889: fnd_message.set_token('COLUMN', 'education_id');
8890: fnd_msg_pub.add;
8891: x_return_status := fnd_api.g_ret_sts_error;
8892: END IF;
8893: CLOSE education_cur;
9011: party_type = 'PERSON';
9012:
9013: EXCEPTION
9014: WHEN NO_DATA_FOUND THEN
9015: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
9016: fnd_message.set_token('TABLE_NAME', 'HZ_EDUCATION');
9017: fnd_message.set_token('PARTY_ID_COL', 'party_id');
9018: fnd_msg_pub.add;
9019: x_return_status := fnd_api.g_ret_sts_error;
9012:
9013: EXCEPTION
9014: WHEN NO_DATA_FOUND THEN
9015: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
9016: fnd_message.set_token('TABLE_NAME', 'HZ_EDUCATION');
9017: fnd_message.set_token('PARTY_ID_COL', 'party_id');
9018: fnd_msg_pub.add;
9019: x_return_status := fnd_api.g_ret_sts_error;
9020: END;
9013: EXCEPTION
9014: WHEN NO_DATA_FOUND THEN
9015: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
9016: fnd_message.set_token('TABLE_NAME', 'HZ_EDUCATION');
9017: fnd_message.set_token('PARTY_ID_COL', 'party_id');
9018: fnd_msg_pub.add;
9019: x_return_status := fnd_api.g_ret_sts_error;
9020: END;
9021:
9146: temp_school_party_id <> fnd_api.g_miss_num and
9147: temp_school_attended_name is NOT NULL and
9148: temp_school_attended_name <> fnd_api.g_miss_char then
9149:
9150: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9151: fnd_message.set_token('COLUMN1', 'school_party_id');
9152: fnd_message.set_token('COLUMN2', 'school_attended_name');
9153: fnd_msg_pub.add;
9154: x_return_status := fnd_api.g_ret_sts_error;
9147: temp_school_attended_name is NOT NULL and
9148: temp_school_attended_name <> fnd_api.g_miss_char then
9149:
9150: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9151: fnd_message.set_token('COLUMN1', 'school_party_id');
9152: fnd_message.set_token('COLUMN2', 'school_attended_name');
9153: fnd_msg_pub.add;
9154: x_return_status := fnd_api.g_ret_sts_error;
9155: END IF;
9148: temp_school_attended_name <> fnd_api.g_miss_char then
9149:
9150: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9151: fnd_message.set_token('COLUMN1', 'school_party_id');
9152: fnd_message.set_token('COLUMN2', 'school_attended_name');
9153: fnd_msg_pub.add;
9154: x_return_status := fnd_api.g_ret_sts_error;
9155: END IF;
9156:
9186: PARTY_TYPE= 'ORGANIZATION';
9187:
9188: EXCEPTION
9189: WHEN NO_DATA_FOUND THEN
9190: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_ORG');
9191: fnd_message.set_token('TABLE_NAME', 'HZ_EDUCATION');
9192: fnd_message.set_token('PARTY_ID_COL', 'school_party_id');
9193: fnd_msg_pub.add;
9194: x_return_status := fnd_api.g_ret_sts_error;
9187:
9188: EXCEPTION
9189: WHEN NO_DATA_FOUND THEN
9190: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_ORG');
9191: fnd_message.set_token('TABLE_NAME', 'HZ_EDUCATION');
9192: fnd_message.set_token('PARTY_ID_COL', 'school_party_id');
9193: fnd_msg_pub.add;
9194: x_return_status := fnd_api.g_ret_sts_error;
9195: END;
9188: EXCEPTION
9189: WHEN NO_DATA_FOUND THEN
9190: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_ORG');
9191: fnd_message.set_token('TABLE_NAME', 'HZ_EDUCATION');
9192: fnd_message.set_token('PARTY_ID_COL', 'school_party_id');
9193: fnd_msg_pub.add;
9194: x_return_status := fnd_api.g_ret_sts_error;
9195: END;
9196:
9471: FETCH employment_history_cur INTO l_dummy;
9472:
9473: -- key is not unique, push an error onto the stack.
9474: IF NVL(employment_history_cur%FOUND, FALSE) THEN
9475: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
9476: fnd_message.set_token('COLUMN', 'employment_history_id');
9477: fnd_msg_pub.add;
9478: x_return_status := fnd_api.g_ret_sts_error;
9479: END IF;
9472:
9473: -- key is not unique, push an error onto the stack.
9474: IF NVL(employment_history_cur%FOUND, FALSE) THEN
9475: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
9476: fnd_message.set_token('COLUMN', 'employment_history_id');
9477: fnd_msg_pub.add;
9478: x_return_status := fnd_api.g_ret_sts_error;
9479: END IF;
9480: CLOSE employment_history_cur;
9599: party_type = 'PERSON';
9600:
9601: EXCEPTION
9602: WHEN NO_DATA_FOUND THEN
9603: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
9604: fnd_message.set_token('TABLE_NAME', 'HZ_EMPLOYMENT_HISTORY');
9605: fnd_message.set_token('PARTY_ID_COL', 'party_id');
9606: fnd_msg_pub.add;
9607: x_return_status := fnd_api.g_ret_sts_error;
9600:
9601: EXCEPTION
9602: WHEN NO_DATA_FOUND THEN
9603: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
9604: fnd_message.set_token('TABLE_NAME', 'HZ_EMPLOYMENT_HISTORY');
9605: fnd_message.set_token('PARTY_ID_COL', 'party_id');
9606: fnd_msg_pub.add;
9607: x_return_status := fnd_api.g_ret_sts_error;
9608: END;
9601: EXCEPTION
9602: WHEN NO_DATA_FOUND THEN
9603: fnd_message.set_name('AR', 'HZ_API_PARTY_NOT_PERSON');
9604: fnd_message.set_token('TABLE_NAME', 'HZ_EMPLOYMENT_HISTORY');
9605: fnd_message.set_token('PARTY_ID_COL', 'party_id');
9606: fnd_msg_pub.add;
9607: x_return_status := fnd_api.g_ret_sts_error;
9608: END;
9609:
9788: temp_employed_as_title_code <> FND_API.G_MISS_CHAR AND
9789: temp_employed_as_title IS NOT NULL AND
9790: temp_employed_as_title <> FND_API.G_MISS_CHAR) THEN
9791:
9792: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9793: fnd_message.set_token('COLUMN1', 'employed_as_title');
9794: fnd_message.set_token('COLUMN2', 'employed_as_title_code');
9795: fnd_msg_pub.add;
9796: x_return_status := fnd_api.g_ret_sts_error;
9789: temp_employed_as_title IS NOT NULL AND
9790: temp_employed_as_title <> FND_API.G_MISS_CHAR) THEN
9791:
9792: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9793: fnd_message.set_token('COLUMN1', 'employed_as_title');
9794: fnd_message.set_token('COLUMN2', 'employed_as_title_code');
9795: fnd_msg_pub.add;
9796: x_return_status := fnd_api.g_ret_sts_error;
9797:
9790: temp_employed_as_title <> FND_API.G_MISS_CHAR) THEN
9791:
9792: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9793: fnd_message.set_token('COLUMN1', 'employed_as_title');
9794: fnd_message.set_token('COLUMN2', 'employed_as_title_code');
9795: fnd_msg_pub.add;
9796: x_return_status := fnd_api.g_ret_sts_error;
9797:
9798: /*IF g_debug THEN
9843: WHERE PARTY_ID = p_employment_history_rec.employed_by_party_id;
9844:
9845: EXCEPTION
9846: WHEN NO_DATA_FOUND THEN
9847: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
9848: fnd_message.set_token('FK', 'employed_by_party_id');
9849: fnd_message.set_token('COLUMN', 'party_id');
9850: fnd_message.set_token('TABLE', 'hz_parties');
9851: fnd_msg_pub.add;
9844:
9845: EXCEPTION
9846: WHEN NO_DATA_FOUND THEN
9847: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
9848: fnd_message.set_token('FK', 'employed_by_party_id');
9849: fnd_message.set_token('COLUMN', 'party_id');
9850: fnd_message.set_token('TABLE', 'hz_parties');
9851: fnd_msg_pub.add;
9852: x_return_status := fnd_api.g_ret_sts_error;
9845: EXCEPTION
9846: WHEN NO_DATA_FOUND THEN
9847: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
9848: fnd_message.set_token('FK', 'employed_by_party_id');
9849: fnd_message.set_token('COLUMN', 'party_id');
9850: fnd_message.set_token('TABLE', 'hz_parties');
9851: fnd_msg_pub.add;
9852: x_return_status := fnd_api.g_ret_sts_error;
9853: END;
9846: WHEN NO_DATA_FOUND THEN
9847: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
9848: fnd_message.set_token('FK', 'employed_by_party_id');
9849: fnd_message.set_token('COLUMN', 'party_id');
9850: fnd_message.set_token('TABLE', 'hz_parties');
9851: fnd_msg_pub.add;
9852: x_return_status := fnd_api.g_ret_sts_error;
9853: END;
9854:
9901: temp_employed_by_party_id <> FND_API.G_MISS_NUM AND
9902: temp_employed_by_name_company IS NOT NULL AND
9903: temp_employed_by_name_company <> FND_API.G_MISS_CHAR) THEN
9904:
9905: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9906: fnd_message.set_token('COLUMN1', 'employed_by_name_company');
9907: fnd_message.set_token('COLUMN2', 'employed_by_party_id');
9908: fnd_msg_pub.add;
9909: x_return_status := fnd_api.g_ret_sts_error;
9902: temp_employed_by_name_company IS NOT NULL AND
9903: temp_employed_by_name_company <> FND_API.G_MISS_CHAR) THEN
9904:
9905: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9906: fnd_message.set_token('COLUMN1', 'employed_by_name_company');
9907: fnd_message.set_token('COLUMN2', 'employed_by_party_id');
9908: fnd_msg_pub.add;
9909: x_return_status := fnd_api.g_ret_sts_error;
9910:
9903: temp_employed_by_name_company <> FND_API.G_MISS_CHAR) THEN
9904:
9905: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
9906: fnd_message.set_token('COLUMN1', 'employed_by_name_company');
9907: fnd_message.set_token('COLUMN2', 'employed_by_party_id');
9908: fnd_msg_pub.add;
9909: x_return_status := fnd_api.g_ret_sts_error;
9910:
9911: /*IF g_debug THEN
9953:
9954: IF p_employment_history_rec.weekly_work_hours < 0 OR
9955: p_employment_history_rec.weekly_work_hours > 168 THEN
9956:
9957: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
9958: fnd_message.set_token('COLUMN', 'weekly_work_hours');
9959: -- Bug 4226199 : This should be changed for bug 3848056
9960: fnd_message.set_token('VALUE1', '0');
9961: fnd_message.set_token('VALUE2', '168');
9954: IF p_employment_history_rec.weekly_work_hours < 0 OR
9955: p_employment_history_rec.weekly_work_hours > 168 THEN
9956:
9957: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
9958: fnd_message.set_token('COLUMN', 'weekly_work_hours');
9959: -- Bug 4226199 : This should be changed for bug 3848056
9960: fnd_message.set_token('VALUE1', '0');
9961: fnd_message.set_token('VALUE2', '168');
9962: fnd_msg_pub.add;
9956:
9957: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
9958: fnd_message.set_token('COLUMN', 'weekly_work_hours');
9959: -- Bug 4226199 : This should be changed for bug 3848056
9960: fnd_message.set_token('VALUE1', '0');
9961: fnd_message.set_token('VALUE2', '168');
9962: fnd_msg_pub.add;
9963: x_return_status := fnd_api.g_ret_sts_error;
9964: END IF;
9957: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
9958: fnd_message.set_token('COLUMN', 'weekly_work_hours');
9959: -- Bug 4226199 : This should be changed for bug 3848056
9960: fnd_message.set_token('VALUE1', '0');
9961: fnd_message.set_token('VALUE2', '168');
9962: fnd_msg_pub.add;
9963: x_return_status := fnd_api.g_ret_sts_error;
9964: END IF;
9965:
10085: p_msg_level=>fnd_log.level_statement);
10086: END IF;
10087:
10088: ELSE
10089: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10090: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10091: fnd_message.set_token('COLUMN2', 'tenure_code');
10092: fnd_message.set_token('VALUE1', 'N');
10093: fnd_message.set_token('VALUE2', 'null');
10086: END IF;
10087:
10088: ELSE
10089: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10090: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10091: fnd_message.set_token('COLUMN2', 'tenure_code');
10092: fnd_message.set_token('VALUE1', 'N');
10093: fnd_message.set_token('VALUE2', 'null');
10094: fnd_msg_pub.add;
10087:
10088: ELSE
10089: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10090: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10091: fnd_message.set_token('COLUMN2', 'tenure_code');
10092: fnd_message.set_token('VALUE1', 'N');
10093: fnd_message.set_token('VALUE2', 'null');
10094: fnd_msg_pub.add;
10095: x_return_status := fnd_api.g_ret_sts_error;
10088: ELSE
10089: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10090: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10091: fnd_message.set_token('COLUMN2', 'tenure_code');
10092: fnd_message.set_token('VALUE1', 'N');
10093: fnd_message.set_token('VALUE2', 'null');
10094: fnd_msg_pub.add;
10095: x_return_status := fnd_api.g_ret_sts_error;
10096:
10089: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10090: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10091: fnd_message.set_token('COLUMN2', 'tenure_code');
10092: fnd_message.set_token('VALUE1', 'N');
10093: fnd_message.set_token('VALUE2', 'null');
10094: fnd_msg_pub.add;
10095: x_return_status := fnd_api.g_ret_sts_error;
10096:
10097: END IF;
10122: IF temp_faculty_position_flag = 'Y' then
10123: IF p_employment_history_rec.fraction_of_tenure < 0 OR
10124: p_employment_history_rec.fraction_of_tenure > 100 THEN
10125:
10126: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
10127: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10128: fnd_message.set_token('VALUE1', '0');
10129: fnd_message.set_token('VALUE2', '100');
10130: fnd_msg_pub.add;
10123: IF p_employment_history_rec.fraction_of_tenure < 0 OR
10124: p_employment_history_rec.fraction_of_tenure > 100 THEN
10125:
10126: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
10127: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10128: fnd_message.set_token('VALUE1', '0');
10129: fnd_message.set_token('VALUE2', '100');
10130: fnd_msg_pub.add;
10131: x_return_status := fnd_api.g_ret_sts_error;
10124: p_employment_history_rec.fraction_of_tenure > 100 THEN
10125:
10126: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
10127: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10128: fnd_message.set_token('VALUE1', '0');
10129: fnd_message.set_token('VALUE2', '100');
10130: fnd_msg_pub.add;
10131: x_return_status := fnd_api.g_ret_sts_error;
10132: END IF;
10125:
10126: fnd_message.set_name('AR', 'HZ_API_VALUE_BETWEEN');
10127: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10128: fnd_message.set_token('VALUE1', '0');
10129: fnd_message.set_token('VALUE2', '100');
10130: fnd_msg_pub.add;
10131: x_return_status := fnd_api.g_ret_sts_error;
10132: END IF;
10133:
10144: p_msg_level=>fnd_log.level_statement);
10145: END IF;
10146:
10147: ELSE
10148: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10149: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10150: fnd_message.set_token('COLUMN2', 'fraction_of_tenure');
10151: fnd_message.set_token('VALUE1', 'N');
10152: fnd_message.set_token('VALUE2', 'null');
10145: END IF;
10146:
10147: ELSE
10148: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10149: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10150: fnd_message.set_token('COLUMN2', 'fraction_of_tenure');
10151: fnd_message.set_token('VALUE1', 'N');
10152: fnd_message.set_token('VALUE2', 'null');
10153:
10146:
10147: ELSE
10148: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10149: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10150: fnd_message.set_token('COLUMN2', 'fraction_of_tenure');
10151: fnd_message.set_token('VALUE1', 'N');
10152: fnd_message.set_token('VALUE2', 'null');
10153:
10154: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10147: ELSE
10148: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10149: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10150: fnd_message.set_token('COLUMN2', 'fraction_of_tenure');
10151: fnd_message.set_token('VALUE1', 'N');
10152: fnd_message.set_token('VALUE2', 'null');
10153:
10154: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10155: fnd_msg_pub.add;
10148: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
10149: fnd_message.set_token('COLUMN1', 'faculty_position_flag');
10150: fnd_message.set_token('COLUMN2', 'fraction_of_tenure');
10151: fnd_message.set_token('VALUE1', 'N');
10152: fnd_message.set_token('VALUE2', 'null');
10153:
10154: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10155: fnd_msg_pub.add;
10156: x_return_status := fnd_api.g_ret_sts_error;
10150: fnd_message.set_token('COLUMN2', 'fraction_of_tenure');
10151: fnd_message.set_token('VALUE1', 'N');
10152: fnd_message.set_token('VALUE2', 'null');
10153:
10154: fnd_message.set_token('COLUMN', 'fraction_of_tenure');
10155: fnd_msg_pub.add;
10156: x_return_status := fnd_api.g_ret_sts_error;
10157: END IF;
10158:
10354: FETCH work_class_cur INTO l_dummy;
10355:
10356: -- key is not unique, push an error onto the stack.
10357: IF NVL(work_class_cur%FOUND, FALSE) THEN
10358: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
10359: fnd_message.set_token('COLUMN', 'work_class_id');
10360: fnd_msg_pub.add;
10361: x_return_status := fnd_api.g_ret_sts_error;
10362: END IF;
10355:
10356: -- key is not unique, push an error onto the stack.
10357: IF NVL(work_class_cur%FOUND, FALSE) THEN
10358: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
10359: fnd_message.set_token('COLUMN', 'work_class_id');
10360: fnd_msg_pub.add;
10361: x_return_status := fnd_api.g_ret_sts_error;
10362: END IF;
10363: CLOSE work_class_cur;
10479: WHERE p.employment_history_id = p_work_class_rec.employment_history_id;
10480:
10481: EXCEPTION
10482: WHEN NO_DATA_FOUND THEN
10483: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10484: fnd_message.set_token('FK', 'employment_history_id');
10485: fnd_message.set_token('COLUMN', 'employment_history_id');
10486: fnd_message.set_token('TABLE', 'hz_employment_history');
10487: fnd_msg_pub.add;
10480:
10481: EXCEPTION
10482: WHEN NO_DATA_FOUND THEN
10483: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10484: fnd_message.set_token('FK', 'employment_history_id');
10485: fnd_message.set_token('COLUMN', 'employment_history_id');
10486: fnd_message.set_token('TABLE', 'hz_employment_history');
10487: fnd_msg_pub.add;
10488: x_return_status := fnd_api.g_ret_sts_error;
10481: EXCEPTION
10482: WHEN NO_DATA_FOUND THEN
10483: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10484: fnd_message.set_token('FK', 'employment_history_id');
10485: fnd_message.set_token('COLUMN', 'employment_history_id');
10486: fnd_message.set_token('TABLE', 'hz_employment_history');
10487: fnd_msg_pub.add;
10488: x_return_status := fnd_api.g_ret_sts_error;
10489: END;
10482: WHEN NO_DATA_FOUND THEN
10483: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10484: fnd_message.set_token('FK', 'employment_history_id');
10485: fnd_message.set_token('COLUMN', 'employment_history_id');
10486: fnd_message.set_token('TABLE', 'hz_employment_history');
10487: fnd_msg_pub.add;
10488: x_return_status := fnd_api.g_ret_sts_error;
10489: END;
10490:
10716: FETCH person_interest_cur INTO l_dummy;
10717:
10718: -- key is not unique, push an error onto the stack.
10719: IF NVL(person_interest_cur%FOUND, FALSE) THEN
10720: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
10721: fnd_message.set_token('COLUMN', 'person_interest_id');
10722: fnd_msg_pub.add;
10723: x_return_status := fnd_api.g_ret_sts_error;
10724: END IF;
10717:
10718: -- key is not unique, push an error onto the stack.
10719: IF NVL(person_interest_cur%FOUND, FALSE) THEN
10720: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
10721: fnd_message.set_token('COLUMN', 'person_interest_id');
10722: fnd_msg_pub.add;
10723: x_return_status := fnd_api.g_ret_sts_error;
10724: END IF;
10725: CLOSE person_interest_cur;
10846: */
10847:
10848: EXCEPTION
10849: WHEN NO_DATA_FOUND THEN
10850: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10851: fnd_message.set_token('FK', 'party_id');
10852: fnd_message.set_token('COLUMN', 'party_id');
10853: fnd_message.set_token('TABLE', 'hz_parties');
10854: fnd_msg_pub.add;
10847:
10848: EXCEPTION
10849: WHEN NO_DATA_FOUND THEN
10850: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10851: fnd_message.set_token('FK', 'party_id');
10852: fnd_message.set_token('COLUMN', 'party_id');
10853: fnd_message.set_token('TABLE', 'hz_parties');
10854: fnd_msg_pub.add;
10855: x_return_status := fnd_api.g_ret_sts_error;
10848: EXCEPTION
10849: WHEN NO_DATA_FOUND THEN
10850: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10851: fnd_message.set_token('FK', 'party_id');
10852: fnd_message.set_token('COLUMN', 'party_id');
10853: fnd_message.set_token('TABLE', 'hz_parties');
10854: fnd_msg_pub.add;
10855: x_return_status := fnd_api.g_ret_sts_error;
10856: END;
10849: WHEN NO_DATA_FOUND THEN
10850: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
10851: fnd_message.set_token('FK', 'party_id');
10852: fnd_message.set_token('COLUMN', 'party_id');
10853: fnd_message.set_token('TABLE', 'hz_parties');
10854: fnd_msg_pub.add;
10855: x_return_status := fnd_api.g_ret_sts_error;
10856: END;
10857:
11381: x_return_status => x_return_status);
11382: -- Bug 4693719 : set global variable to Y
11383: HZ_UTILITY_V2PUB.G_UPDATE_ACS := 'Y';
11384: /*
11385: FND_MESSAGE.SET_NAME('AR', 'HZ_NOTALLOW_UPDATE_THIRD_PARTY');
11386: FND_MSG_PUB.ADD;
11387: x_return_status := FND_API.G_RET_STS_ERROR;
11388: */
11389: END IF;
11420: WHERE LANGUAGE_CODE = p_location_rec.language
11421: AND INSTALLED_FLAG IN ('B', 'I');
11422: EXCEPTION
11423: WHEN NO_DATA_FOUND THEN
11424: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11425: fnd_message.set_token('FK', 'language');
11426: fnd_message.set_token('COLUMN', 'language_code');
11427: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
11428: fnd_msg_pub.add;
11421: AND INSTALLED_FLAG IN ('B', 'I');
11422: EXCEPTION
11423: WHEN NO_DATA_FOUND THEN
11424: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11425: fnd_message.set_token('FK', 'language');
11426: fnd_message.set_token('COLUMN', 'language_code');
11427: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
11428: fnd_msg_pub.add;
11429: x_return_status := fnd_api.g_ret_sts_error;
11422: EXCEPTION
11423: WHEN NO_DATA_FOUND THEN
11424: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11425: fnd_message.set_token('FK', 'language');
11426: fnd_message.set_token('COLUMN', 'language_code');
11427: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
11428: fnd_msg_pub.add;
11429: x_return_status := fnd_api.g_ret_sts_error;
11430: END;
11423: WHEN NO_DATA_FOUND THEN
11424: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11425: fnd_message.set_token('FK', 'language');
11426: fnd_message.set_token('COLUMN', 'language_code');
11427: fnd_message.set_token('TABLE', 'fnd_languages(installed)');
11428: fnd_msg_pub.add;
11429: x_return_status := fnd_api.g_ret_sts_error;
11430: END;
11431:
11464: FROM FND_TIMEZONES_VL
11465: WHERE UPGRADE_TZ_ID = p_location_rec.timezone_id;
11466: EXCEPTION
11467: WHEN NO_DATA_FOUND THEN
11468: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11469: fnd_message.set_token('FK', 'timezone_id');
11470: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
11471: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
11472: fnd_msg_pub.add;
11465: WHERE UPGRADE_TZ_ID = p_location_rec.timezone_id;
11466: EXCEPTION
11467: WHEN NO_DATA_FOUND THEN
11468: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11469: fnd_message.set_token('FK', 'timezone_id');
11470: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
11471: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
11472: fnd_msg_pub.add;
11473: x_return_status := fnd_api.g_ret_sts_error;
11466: EXCEPTION
11467: WHEN NO_DATA_FOUND THEN
11468: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11469: fnd_message.set_token('FK', 'timezone_id');
11470: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
11471: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
11472: fnd_msg_pub.add;
11473: x_return_status := fnd_api.g_ret_sts_error;
11474: END;
11467: WHEN NO_DATA_FOUND THEN
11468: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
11469: fnd_message.set_token('FK', 'timezone_id');
11470: fnd_message.set_token('COLUMN', 'upgrade_tz_id');
11471: fnd_message.set_token('TABLE', 'fnd_timezones_vl');
11472: fnd_msg_pub.add;
11473: x_return_status := fnd_api.g_ret_sts_error;
11474: END;
11475:
11755: )
11756: THEN
11757: IF ARH_ADDR_PKG.check_tran_for_all_accts(p_location_rec.location_id)
11758: THEN
11759: fnd_message.set_name('AR', 'AR_CUST_ADDR_HAS_TRANSACTION');
11760: --Bug 2452282 fnd_message.set_token('COLUMN', 'tax related fields');
11761: fnd_msg_pub.add;
11762: x_return_status := fnd_api.g_ret_sts_error;
11763: ELSE -- non taxable components to be modified
11756: THEN
11757: IF ARH_ADDR_PKG.check_tran_for_all_accts(p_location_rec.location_id)
11758: THEN
11759: fnd_message.set_name('AR', 'AR_CUST_ADDR_HAS_TRANSACTION');
11760: --Bug 2452282 fnd_message.set_token('COLUMN', 'tax related fields');
11761: fnd_msg_pub.add;
11762: x_return_status := fnd_api.g_ret_sts_error;
11763: ELSE -- non taxable components to be modified
11764: null; -- allow updates
12127: AND TRUNC(SYSDATE) BETWEEN TRUNC(START_DATE) AND TRUNC(NVL(END_DATE, SYSDATE))
12128: AND ROWNUM = 1;
12129:
12130: -- update is not allowed, raise error
12131: fnd_message.set_name('AR', 'HZ_API_CPF_NON_UPDATEABLE');
12132: fnd_msg_pub.add;
12133: x_return_status := fnd_api.g_ret_sts_error;
12134:
12135: EXCEPTION
12153: AND TRUNC(SYSDATE) BETWEEN TRUNC(START_DATE) AND TRUNC(NVL(END_DATE, SYSDATE))
12154: AND ROWNUM = 1;
12155:
12156: -- update is not allowed, raise error
12157: fnd_message.set_name('AR', 'HZ_API_CPF_NON_UPDATEABLE');
12158: fnd_msg_pub.add;
12159: x_return_status := fnd_api.g_ret_sts_error;
12160:
12161: EXCEPTION
12490: FROM FND_OBJECT_INSTANCE_SETS
12491: WHERE INSTANCE_SET_NAME = p_relationship_type_rec.subject_type;
12492: EXCEPTION
12493: WHEN NO_DATA_FOUND THEN
12494: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12495: fnd_message.set_token('FK', 'subject_type');
12496: fnd_message.set_token('COLUMN', 'instance_set_name');
12497: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12498: fnd_msg_pub.add;
12491: WHERE INSTANCE_SET_NAME = p_relationship_type_rec.subject_type;
12492: EXCEPTION
12493: WHEN NO_DATA_FOUND THEN
12494: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12495: fnd_message.set_token('FK', 'subject_type');
12496: fnd_message.set_token('COLUMN', 'instance_set_name');
12497: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12498: fnd_msg_pub.add;
12499: x_return_status := fnd_api.g_ret_sts_error;
12492: EXCEPTION
12493: WHEN NO_DATA_FOUND THEN
12494: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12495: fnd_message.set_token('FK', 'subject_type');
12496: fnd_message.set_token('COLUMN', 'instance_set_name');
12497: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12498: fnd_msg_pub.add;
12499: x_return_status := fnd_api.g_ret_sts_error;
12500: END;
12493: WHEN NO_DATA_FOUND THEN
12494: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12495: fnd_message.set_token('FK', 'subject_type');
12496: fnd_message.set_token('COLUMN', 'instance_set_name');
12497: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12498: fnd_msg_pub.add;
12499: x_return_status := fnd_api.g_ret_sts_error;
12500: END;
12501:
12573: FROM FND_OBJECT_INSTANCE_SETS
12574: WHERE INSTANCE_SET_NAME = p_relationship_type_rec.object_type;
12575: EXCEPTION
12576: WHEN NO_DATA_FOUND THEN
12577: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12578: fnd_message.set_token('FK', 'object_type');
12579: fnd_message.set_token('COLUMN', 'instance_set_name');
12580: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12581: fnd_msg_pub.add;
12574: WHERE INSTANCE_SET_NAME = p_relationship_type_rec.object_type;
12575: EXCEPTION
12576: WHEN NO_DATA_FOUND THEN
12577: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12578: fnd_message.set_token('FK', 'object_type');
12579: fnd_message.set_token('COLUMN', 'instance_set_name');
12580: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12581: fnd_msg_pub.add;
12582: x_return_status := fnd_api.g_ret_sts_error;
12575: EXCEPTION
12576: WHEN NO_DATA_FOUND THEN
12577: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12578: fnd_message.set_token('FK', 'object_type');
12579: fnd_message.set_token('COLUMN', 'instance_set_name');
12580: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12581: fnd_msg_pub.add;
12582: x_return_status := fnd_api.g_ret_sts_error;
12583: END;
12576: WHEN NO_DATA_FOUND THEN
12577: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
12578: fnd_message.set_token('FK', 'object_type');
12579: fnd_message.set_token('COLUMN', 'instance_set_name');
12580: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
12581: fnd_msg_pub.add;
12582: x_return_status := fnd_api.g_ret_sts_error;
12583: END;
12584:
12655: | AND ROWNUM = 1;
12656: | -- if the backward_rel_code passed do not match with whatever
12657: | -- obtained from above query, error out NOCOPY
12658: | IF l_code <> p_relationship_type_rec.backward_rel_code then
12659: | fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION');
12660: | fnd_msg_pub.add;
12661: | x_return_status := FND_API.G_RET_STS_ERROR;
12662: | END IF;
12663: | END IF;
12707: );
12708:
12709: IF l_count <> 0
12710: THEN
12711: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION');
12712: fnd_msg_pub.add;
12713: x_return_status := FND_API.G_RET_STS_ERROR;
12714: END IF;
12715:
12742: AND SUBJECT_TYPE = p_relationship_type_rec.subject_type
12743: AND OBJECT_TYPE = p_relationship_type_rec.object_type
12744: AND RELATIONSHIP_TYPE_ID <> NVL(p_relationship_type_rec.relationship_type_id,-1);
12745:
12746: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
12747: fnd_message.set_token('COLUMN', 'relationship type, forward rel code, backward rel code, subject type, object type');
12748: fnd_msg_pub.add;
12749: x_return_status := fnd_api.g_ret_sts_error;
12750:
12743: AND OBJECT_TYPE = p_relationship_type_rec.object_type
12744: AND RELATIONSHIP_TYPE_ID <> NVL(p_relationship_type_rec.relationship_type_id,-1);
12745:
12746: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
12747: fnd_message.set_token('COLUMN', 'relationship type, forward rel code, backward rel code, subject type, object type');
12748: fnd_msg_pub.add;
12749: x_return_status := fnd_api.g_ret_sts_error;
12750:
12751: EXCEPTION
12775: IF p_relationship_type_rec.forward_rel_code = p_relationship_type_rec.backward_rel_code
12776: AND
12777: p_relationship_type_rec.direction_code <> 'N'
12778: THEN
12779: fnd_message.set_name('AR', 'HZ_INVALID_DIRECTION_CODE1');
12780: fnd_msg_pub.add;
12781: x_return_status := FND_API.G_RET_STS_ERROR;
12782: END IF;
12783:
12785: -- cannot be 'N'
12786: IF p_relationship_type_rec.forward_rel_code <> p_relationship_type_rec.backward_rel_code
12787: AND p_relationship_type_rec.direction_code = 'N'
12788: THEN
12789: fnd_message.set_name('AR', 'HZ_INVALID_DIRECTION_CODE2');
12790: fnd_msg_pub.add;
12791: x_return_status := FND_API.G_RET_STS_ERROR;
12792: END IF;
12793:
12858: IF p_create_update_flag = 'C' THEN
12859: -- if hierarchical_flag = 'Y', then allow_circular_relationships must be 'N'
12860: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12861: IF p_relationship_type_rec.allow_circular_relationships = 'Y' THEN
12862: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12863: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12864: fnd_message.set_token('VALUE1', 'Y(Yes)');
12865: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
12866: fnd_message.set_token('VALUE2', 'N(No)');
12859: -- if hierarchical_flag = 'Y', then allow_circular_relationships must be 'N'
12860: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12861: IF p_relationship_type_rec.allow_circular_relationships = 'Y' THEN
12862: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12863: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12864: fnd_message.set_token('VALUE1', 'Y(Yes)');
12865: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
12866: fnd_message.set_token('VALUE2', 'N(No)');
12867: fnd_msg_pub.add;
12860: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12861: IF p_relationship_type_rec.allow_circular_relationships = 'Y' THEN
12862: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12863: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12864: fnd_message.set_token('VALUE1', 'Y(Yes)');
12865: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
12866: fnd_message.set_token('VALUE2', 'N(No)');
12867: fnd_msg_pub.add;
12868: x_return_status := FND_API.G_RET_STS_ERROR;
12861: IF p_relationship_type_rec.allow_circular_relationships = 'Y' THEN
12862: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12863: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12864: fnd_message.set_token('VALUE1', 'Y(Yes)');
12865: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
12866: fnd_message.set_token('VALUE2', 'N(No)');
12867: fnd_msg_pub.add;
12868: x_return_status := FND_API.G_RET_STS_ERROR;
12869: END IF;
12862: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12863: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12864: fnd_message.set_token('VALUE1', 'Y(Yes)');
12865: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
12866: fnd_message.set_token('VALUE2', 'N(No)');
12867: fnd_msg_pub.add;
12868: x_return_status := FND_API.G_RET_STS_ERROR;
12869: END IF;
12870: END IF;
12890: IF p_create_update_flag = 'C' THEN
12891: -- if hierarchical_flag = 'Y', the direction_code must be 'P' or 'C'
12892: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12893: IF p_relationship_type_rec.direction_code = 'N' THEN
12894: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12895: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12896: fnd_message.set_token('VALUE1', 'Y(Yes)');
12897: fnd_message.set_token('COLUMN2', 'direction_code');
12898: fnd_message.set_token('VALUE2', 'P(Parent)/C(Child)');
12891: -- if hierarchical_flag = 'Y', the direction_code must be 'P' or 'C'
12892: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12893: IF p_relationship_type_rec.direction_code = 'N' THEN
12894: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12895: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12896: fnd_message.set_token('VALUE1', 'Y(Yes)');
12897: fnd_message.set_token('COLUMN2', 'direction_code');
12898: fnd_message.set_token('VALUE2', 'P(Parent)/C(Child)');
12899: fnd_msg_pub.add;
12892: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12893: IF p_relationship_type_rec.direction_code = 'N' THEN
12894: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12895: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12896: fnd_message.set_token('VALUE1', 'Y(Yes)');
12897: fnd_message.set_token('COLUMN2', 'direction_code');
12898: fnd_message.set_token('VALUE2', 'P(Parent)/C(Child)');
12899: fnd_msg_pub.add;
12900: x_return_status := FND_API.G_RET_STS_ERROR;
12893: IF p_relationship_type_rec.direction_code = 'N' THEN
12894: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12895: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12896: fnd_message.set_token('VALUE1', 'Y(Yes)');
12897: fnd_message.set_token('COLUMN2', 'direction_code');
12898: fnd_message.set_token('VALUE2', 'P(Parent)/C(Child)');
12899: fnd_msg_pub.add;
12900: x_return_status := FND_API.G_RET_STS_ERROR;
12901: END IF;
12894: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12895: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12896: fnd_message.set_token('VALUE1', 'Y(Yes)');
12897: fnd_message.set_token('COLUMN2', 'direction_code');
12898: fnd_message.set_token('VALUE2', 'P(Parent)/C(Child)');
12899: fnd_msg_pub.add;
12900: x_return_status := FND_API.G_RET_STS_ERROR;
12901: END IF;
12902: END IF;
12924: FROM HZ_RELATIONSHIP_TYPES
12925: WHERE ROLE = p_relationship_type_rec.forward_role
12926: OR ROLE = p_relationship_type_rec.backward_role;
12927: IF l_count > 0 THEN
12928: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
12929: fnd_message.set_token('COLUMN', 'role');
12930: fnd_msg_pub.add;
12931: x_return_status := fnd_api.g_ret_sts_error;
12932: END IF;
12925: WHERE ROLE = p_relationship_type_rec.forward_role
12926: OR ROLE = p_relationship_type_rec.backward_role;
12927: IF l_count > 0 THEN
12928: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
12929: fnd_message.set_token('COLUMN', 'role');
12930: fnd_msg_pub.add;
12931: x_return_status := fnd_api.g_ret_sts_error;
12932: END IF;
12933: END;
12974: IF p_create_update_flag = 'C' THEN
12975: -- if hierarchical_flag = 'Y', then allow_relate_to_self_flag must be 'N'
12976: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12977: IF p_relationship_type_rec.allow_relate_to_self_flag = 'Y' THEN
12978: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12979: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12980: fnd_message.set_token('VALUE1', 'Y(Yes)');
12981: fnd_message.set_token('COLUMN2', 'allow_relate_to_self_flag');
12982: fnd_message.set_token('VALUE2', 'N(No)');
12975: -- if hierarchical_flag = 'Y', then allow_relate_to_self_flag must be 'N'
12976: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12977: IF p_relationship_type_rec.allow_relate_to_self_flag = 'Y' THEN
12978: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12979: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12980: fnd_message.set_token('VALUE1', 'Y(Yes)');
12981: fnd_message.set_token('COLUMN2', 'allow_relate_to_self_flag');
12982: fnd_message.set_token('VALUE2', 'N(No)');
12983: fnd_msg_pub.add;
12976: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'Y' THEN
12977: IF p_relationship_type_rec.allow_relate_to_self_flag = 'Y' THEN
12978: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12979: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12980: fnd_message.set_token('VALUE1', 'Y(Yes)');
12981: fnd_message.set_token('COLUMN2', 'allow_relate_to_self_flag');
12982: fnd_message.set_token('VALUE2', 'N(No)');
12983: fnd_msg_pub.add;
12984: x_return_status := FND_API.G_RET_STS_ERROR;
12977: IF p_relationship_type_rec.allow_relate_to_self_flag = 'Y' THEN
12978: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12979: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12980: fnd_message.set_token('VALUE1', 'Y(Yes)');
12981: fnd_message.set_token('COLUMN2', 'allow_relate_to_self_flag');
12982: fnd_message.set_token('VALUE2', 'N(No)');
12983: fnd_msg_pub.add;
12984: x_return_status := FND_API.G_RET_STS_ERROR;
12985: END IF;
12978: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
12979: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
12980: fnd_message.set_token('VALUE1', 'Y(Yes)');
12981: fnd_message.set_token('COLUMN2', 'allow_relate_to_self_flag');
12982: fnd_message.set_token('VALUE2', 'N(No)');
12983: fnd_msg_pub.add;
12984: x_return_status := FND_API.G_RET_STS_ERROR;
12985: END IF;
12986: END IF;
13007: IF p_create_update_flag = 'C' THEN
13008: -- if direction_code = 'N', the allow_circular_relationships must be 'Y'
13009: IF p_relationship_type_rec.direction_code = 'N' THEN
13010: IF NVL(p_relationship_type_rec.allow_circular_relationships, 'Y') = 'N' THEN
13011: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13012: fnd_message.set_token('COLUMN1', 'direction_code');
13013: fnd_message.set_token('VALUE1', 'N(No)');
13014: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13015: fnd_message.set_token('VALUE2', 'Y(Yes)');
13008: -- if direction_code = 'N', the allow_circular_relationships must be 'Y'
13009: IF p_relationship_type_rec.direction_code = 'N' THEN
13010: IF NVL(p_relationship_type_rec.allow_circular_relationships, 'Y') = 'N' THEN
13011: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13012: fnd_message.set_token('COLUMN1', 'direction_code');
13013: fnd_message.set_token('VALUE1', 'N(No)');
13014: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13015: fnd_message.set_token('VALUE2', 'Y(Yes)');
13016: fnd_msg_pub.add;
13009: IF p_relationship_type_rec.direction_code = 'N' THEN
13010: IF NVL(p_relationship_type_rec.allow_circular_relationships, 'Y') = 'N' THEN
13011: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13012: fnd_message.set_token('COLUMN1', 'direction_code');
13013: fnd_message.set_token('VALUE1', 'N(No)');
13014: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13015: fnd_message.set_token('VALUE2', 'Y(Yes)');
13016: fnd_msg_pub.add;
13017: x_return_status := FND_API.G_RET_STS_ERROR;
13010: IF NVL(p_relationship_type_rec.allow_circular_relationships, 'Y') = 'N' THEN
13011: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13012: fnd_message.set_token('COLUMN1', 'direction_code');
13013: fnd_message.set_token('VALUE1', 'N(No)');
13014: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13015: fnd_message.set_token('VALUE2', 'Y(Yes)');
13016: fnd_msg_pub.add;
13017: x_return_status := FND_API.G_RET_STS_ERROR;
13018: END IF;
13011: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13012: fnd_message.set_token('COLUMN1', 'direction_code');
13013: fnd_message.set_token('VALUE1', 'N(No)');
13014: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13015: fnd_message.set_token('VALUE2', 'Y(Yes)');
13016: fnd_msg_pub.add;
13017: x_return_status := FND_API.G_RET_STS_ERROR;
13018: END IF;
13019: END IF;
13049: IF p_create_update_flag = 'C' THEN
13050: -- if hierarchical_flag = 'N', then multiple_parent_allowed must be 'Y'
13051: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'N' THEN
13052: IF NVL(p_relationship_type_rec.multiple_parent_allowed, 'Y') = 'N' THEN
13053: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13054: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
13055: fnd_message.set_token('VALUE1', 'N(No)');
13056: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13057: fnd_message.set_token('VALUE2', 'Y(Yes)');
13050: -- if hierarchical_flag = 'N', then multiple_parent_allowed must be 'Y'
13051: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'N' THEN
13052: IF NVL(p_relationship_type_rec.multiple_parent_allowed, 'Y') = 'N' THEN
13053: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13054: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
13055: fnd_message.set_token('VALUE1', 'N(No)');
13056: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13057: fnd_message.set_token('VALUE2', 'Y(Yes)');
13058: fnd_msg_pub.add;
13051: IF NVL(p_relationship_type_rec.hierarchical_flag, 'N') = 'N' THEN
13052: IF NVL(p_relationship_type_rec.multiple_parent_allowed, 'Y') = 'N' THEN
13053: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13054: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
13055: fnd_message.set_token('VALUE1', 'N(No)');
13056: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13057: fnd_message.set_token('VALUE2', 'Y(Yes)');
13058: fnd_msg_pub.add;
13059: x_return_status := FND_API.G_RET_STS_ERROR;
13052: IF NVL(p_relationship_type_rec.multiple_parent_allowed, 'Y') = 'N' THEN
13053: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13054: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
13055: fnd_message.set_token('VALUE1', 'N(No)');
13056: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13057: fnd_message.set_token('VALUE2', 'Y(Yes)');
13058: fnd_msg_pub.add;
13059: x_return_status := FND_API.G_RET_STS_ERROR;
13060: END IF;
13053: fnd_message.set_name('AR', 'HZ_API_VAL_DEP_FIELDS');
13054: fnd_message.set_token('COLUMN1', 'hierarchical_flag');
13055: fnd_message.set_token('VALUE1', 'N(No)');
13056: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13057: fnd_message.set_token('VALUE2', 'Y(Yes)');
13058: fnd_msg_pub.add;
13059: x_return_status := FND_API.G_RET_STS_ERROR;
13060: END IF;
13061: END IF;
13090: and
13091: NVL(p_relationship_type_rec.hierarchical_flag, 'Y')
13092: <> NVL(l_hierarchical_flag, 'Y')
13093: THEN
13094: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13095: fnd_message.set_token('ENTITY', 'relationship type');
13096: fnd_message.set_token('COLUMN1', 'relationship_type');
13097: fnd_message.set_token('COLUMN2', 'hierarchical_flag');
13098: fnd_msg_pub.add;
13091: NVL(p_relationship_type_rec.hierarchical_flag, 'Y')
13092: <> NVL(l_hierarchical_flag, 'Y')
13093: THEN
13094: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13095: fnd_message.set_token('ENTITY', 'relationship type');
13096: fnd_message.set_token('COLUMN1', 'relationship_type');
13097: fnd_message.set_token('COLUMN2', 'hierarchical_flag');
13098: fnd_msg_pub.add;
13099: x_return_status := FND_API.G_RET_STS_ERROR;
13092: <> NVL(l_hierarchical_flag, 'Y')
13093: THEN
13094: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13095: fnd_message.set_token('ENTITY', 'relationship type');
13096: fnd_message.set_token('COLUMN1', 'relationship_type');
13097: fnd_message.set_token('COLUMN2', 'hierarchical_flag');
13098: fnd_msg_pub.add;
13099: x_return_status := FND_API.G_RET_STS_ERROR;
13100: END IF;
13093: THEN
13094: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13095: fnd_message.set_token('ENTITY', 'relationship type');
13096: fnd_message.set_token('COLUMN1', 'relationship_type');
13097: fnd_message.set_token('COLUMN2', 'hierarchical_flag');
13098: fnd_msg_pub.add;
13099: x_return_status := FND_API.G_RET_STS_ERROR;
13100: END IF;
13101:
13136: and
13137: NVL(p_relationship_type_rec.allow_circular_relationships, 'Y') <>
13138: NVL(l_allow_circular_relationships, 'Y')
13139: THEN
13140: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13141: fnd_message.set_token('ENTITY', 'relationship type');
13142: fnd_message.set_token('COLUMN1', 'relationship_type');
13143: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13144: fnd_msg_pub.add;
13137: NVL(p_relationship_type_rec.allow_circular_relationships, 'Y') <>
13138: NVL(l_allow_circular_relationships, 'Y')
13139: THEN
13140: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13141: fnd_message.set_token('ENTITY', 'relationship type');
13142: fnd_message.set_token('COLUMN1', 'relationship_type');
13143: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13144: fnd_msg_pub.add;
13145: x_return_status := FND_API.G_RET_STS_ERROR;
13138: NVL(l_allow_circular_relationships, 'Y')
13139: THEN
13140: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13141: fnd_message.set_token('ENTITY', 'relationship type');
13142: fnd_message.set_token('COLUMN1', 'relationship_type');
13143: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13144: fnd_msg_pub.add;
13145: x_return_status := FND_API.G_RET_STS_ERROR;
13146: END IF;
13139: THEN
13140: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13141: fnd_message.set_token('ENTITY', 'relationship type');
13142: fnd_message.set_token('COLUMN1', 'relationship_type');
13143: fnd_message.set_token('COLUMN2', 'allow_circular_relationships');
13144: fnd_msg_pub.add;
13145: x_return_status := FND_API.G_RET_STS_ERROR;
13146: END IF;
13147:
13179: and
13180: NVL(p_relationship_type_rec.multiple_parent_allowed, 'Y') <>
13181: NVL(l_multiple_parent_allowed, 'Y')
13182: THEN
13183: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13184: fnd_message.set_token('ENTITY', 'relationship type');
13185: fnd_message.set_token('COLUMN1', 'relationship_type');
13186: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13187: fnd_msg_pub.add;
13180: NVL(p_relationship_type_rec.multiple_parent_allowed, 'Y') <>
13181: NVL(l_multiple_parent_allowed, 'Y')
13182: THEN
13183: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13184: fnd_message.set_token('ENTITY', 'relationship type');
13185: fnd_message.set_token('COLUMN1', 'relationship_type');
13186: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13187: fnd_msg_pub.add;
13188: x_return_status := FND_API.G_RET_STS_ERROR;
13181: NVL(l_multiple_parent_allowed, 'Y')
13182: THEN
13183: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13184: fnd_message.set_token('ENTITY', 'relationship type');
13185: fnd_message.set_token('COLUMN1', 'relationship_type');
13186: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13187: fnd_msg_pub.add;
13188: x_return_status := FND_API.G_RET_STS_ERROR;
13189: END IF;
13182: THEN
13183: fnd_message.set_name('AR', 'HZ_DIFF_VALUE_NOT_ALLOWED');
13184: fnd_message.set_token('ENTITY', 'relationship type');
13185: fnd_message.set_token('COLUMN1', 'relationship_type');
13186: fnd_message.set_token('COLUMN2', 'multiple_parent_allowed');
13187: fnd_msg_pub.add;
13188: x_return_status := FND_API.G_RET_STS_ERROR;
13189: END IF;
13190:
13308: IF (p_create_update_flag = 'C') THEN
13309: IF((p_relationship_type_rec.forward_rel_code = p_relationship_type_rec.backward_rel_code)
13310: AND (p_relationship_type_rec.subject_type <> p_relationship_type_rec.object_type))
13311: THEN
13312: fnd_message.set_name('AR', 'HZ_API_RELTYPE_INVALID');
13313: fnd_msg_pub.add;
13314: x_return_status := fnd_api.g_ret_sts_error;
13315:
13316: IF fnd_log.level_statement>=fnd_log.g_current_runtime_level THEN
13655: p_relationship_rec.subject_id
13656: );
13657:
13658: IF l_in = 'N' THEN
13659: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13660: fnd_message.set_token('FK', 'subject_id');
13661: fnd_message.set_token('COLUMN',
13662: lower(p_relationship_rec.subject_type)||' id');
13663: fnd_message.set_token('TABLE', p_relationship_rec.subject_table_name);
13656: );
13657:
13658: IF l_in = 'N' THEN
13659: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13660: fnd_message.set_token('FK', 'subject_id');
13661: fnd_message.set_token('COLUMN',
13662: lower(p_relationship_rec.subject_type)||' id');
13663: fnd_message.set_token('TABLE', p_relationship_rec.subject_table_name);
13664: fnd_msg_pub.add;
13657:
13658: IF l_in = 'N' THEN
13659: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13660: fnd_message.set_token('FK', 'subject_id');
13661: fnd_message.set_token('COLUMN',
13662: lower(p_relationship_rec.subject_type)||' id');
13663: fnd_message.set_token('TABLE', p_relationship_rec.subject_table_name);
13664: fnd_msg_pub.add;
13665: x_return_status := fnd_api.g_ret_sts_error;
13659: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13660: fnd_message.set_token('FK', 'subject_id');
13661: fnd_message.set_token('COLUMN',
13662: lower(p_relationship_rec.subject_type)||' id');
13663: fnd_message.set_token('TABLE', p_relationship_rec.subject_table_name);
13664: fnd_msg_pub.add;
13665: x_return_status := fnd_api.g_ret_sts_error;
13666: END IF;
13667:
13738: FROM fnd_objects fo
13739: WHERE fo.obj_name = p_relationship_rec.subject_table_name;
13740: EXCEPTION
13741: WHEN NO_DATA_FOUND THEN
13742: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13743: fnd_message.set_token('FK', 'subject_table_name');
13744: fnd_message.set_token('COLUMN', 'obj_name');
13745: fnd_message.set_token('TABLE', 'fnd_objects');
13746: fnd_msg_pub.add;
13739: WHERE fo.obj_name = p_relationship_rec.subject_table_name;
13740: EXCEPTION
13741: WHEN NO_DATA_FOUND THEN
13742: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13743: fnd_message.set_token('FK', 'subject_table_name');
13744: fnd_message.set_token('COLUMN', 'obj_name');
13745: fnd_message.set_token('TABLE', 'fnd_objects');
13746: fnd_msg_pub.add;
13747: x_return_status := fnd_api.g_ret_sts_error;
13740: EXCEPTION
13741: WHEN NO_DATA_FOUND THEN
13742: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13743: fnd_message.set_token('FK', 'subject_table_name');
13744: fnd_message.set_token('COLUMN', 'obj_name');
13745: fnd_message.set_token('TABLE', 'fnd_objects');
13746: fnd_msg_pub.add;
13747: x_return_status := fnd_api.g_ret_sts_error;
13748: END;
13741: WHEN NO_DATA_FOUND THEN
13742: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13743: fnd_message.set_token('FK', 'subject_table_name');
13744: fnd_message.set_token('COLUMN', 'obj_name');
13745: fnd_message.set_token('TABLE', 'fnd_objects');
13746: fnd_msg_pub.add;
13747: x_return_status := fnd_api.g_ret_sts_error;
13748: END;
13749:
13824: FROM fnd_object_instance_sets fois
13825: WHERE fois.instance_set_name = p_relationship_rec.subject_type;
13826: EXCEPTION
13827: WHEN NO_DATA_FOUND THEN
13828: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13829: fnd_message.set_token('FK', 'subject_type');
13830: fnd_message.set_token('COLUMN', 'instance_set_name');
13831: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
13832: fnd_msg_pub.add;
13825: WHERE fois.instance_set_name = p_relationship_rec.subject_type;
13826: EXCEPTION
13827: WHEN NO_DATA_FOUND THEN
13828: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13829: fnd_message.set_token('FK', 'subject_type');
13830: fnd_message.set_token('COLUMN', 'instance_set_name');
13831: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
13832: fnd_msg_pub.add;
13833: x_return_status := fnd_api.g_ret_sts_error;
13826: EXCEPTION
13827: WHEN NO_DATA_FOUND THEN
13828: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13829: fnd_message.set_token('FK', 'subject_type');
13830: fnd_message.set_token('COLUMN', 'instance_set_name');
13831: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
13832: fnd_msg_pub.add;
13833: x_return_status := fnd_api.g_ret_sts_error;
13834: END;
13827: WHEN NO_DATA_FOUND THEN
13828: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13829: fnd_message.set_token('FK', 'subject_type');
13830: fnd_message.set_token('COLUMN', 'instance_set_name');
13831: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
13832: fnd_msg_pub.add;
13833: x_return_status := fnd_api.g_ret_sts_error;
13834: END;
13835:
13909: p_relationship_rec.object_id
13910: );
13911:
13912: IF l_in = 'N' THEN
13913: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13914: fnd_message.set_token('FK', 'object_id');
13915: fnd_message.set_token('COLUMN',
13916: LOWER(p_relationship_rec.object_type)||' id');
13917: fnd_message.set_token('TABLE', p_relationship_rec.object_table_name);
13910: );
13911:
13912: IF l_in = 'N' THEN
13913: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13914: fnd_message.set_token('FK', 'object_id');
13915: fnd_message.set_token('COLUMN',
13916: LOWER(p_relationship_rec.object_type)||' id');
13917: fnd_message.set_token('TABLE', p_relationship_rec.object_table_name);
13918: fnd_msg_pub.add;
13911:
13912: IF l_in = 'N' THEN
13913: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13914: fnd_message.set_token('FK', 'object_id');
13915: fnd_message.set_token('COLUMN',
13916: LOWER(p_relationship_rec.object_type)||' id');
13917: fnd_message.set_token('TABLE', p_relationship_rec.object_table_name);
13918: fnd_msg_pub.add;
13919: x_return_status := fnd_api.g_ret_sts_error;
13913: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13914: fnd_message.set_token('FK', 'object_id');
13915: fnd_message.set_token('COLUMN',
13916: LOWER(p_relationship_rec.object_type)||' id');
13917: fnd_message.set_token('TABLE', p_relationship_rec.object_table_name);
13918: fnd_msg_pub.add;
13919: x_return_status := fnd_api.g_ret_sts_error;
13920: END IF;
13921:
13994: FROM fnd_objects fo
13995: WHERE fo.obj_name = p_relationship_rec.object_table_name;
13996: EXCEPTION
13997: WHEN NO_DATA_FOUND THEN
13998: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13999: fnd_message.set_token('FK', 'object_table_name');
14000: fnd_message.set_token('COLUMN', 'obj_name');
14001: fnd_message.set_token('TABLE', 'fnd_objects');
14002: fnd_msg_pub.add;
13995: WHERE fo.obj_name = p_relationship_rec.object_table_name;
13996: EXCEPTION
13997: WHEN NO_DATA_FOUND THEN
13998: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13999: fnd_message.set_token('FK', 'object_table_name');
14000: fnd_message.set_token('COLUMN', 'obj_name');
14001: fnd_message.set_token('TABLE', 'fnd_objects');
14002: fnd_msg_pub.add;
14003: x_return_status := fnd_api.g_ret_sts_error;
13996: EXCEPTION
13997: WHEN NO_DATA_FOUND THEN
13998: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13999: fnd_message.set_token('FK', 'object_table_name');
14000: fnd_message.set_token('COLUMN', 'obj_name');
14001: fnd_message.set_token('TABLE', 'fnd_objects');
14002: fnd_msg_pub.add;
14003: x_return_status := fnd_api.g_ret_sts_error;
14004: END;
13997: WHEN NO_DATA_FOUND THEN
13998: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
13999: fnd_message.set_token('FK', 'object_table_name');
14000: fnd_message.set_token('COLUMN', 'obj_name');
14001: fnd_message.set_token('TABLE', 'fnd_objects');
14002: fnd_msg_pub.add;
14003: x_return_status := fnd_api.g_ret_sts_error;
14004: END;
14005:
14082: FROM fnd_object_instance_sets fois
14083: WHERE fois.instance_set_name = p_relationship_rec.object_type;
14084: EXCEPTION
14085: WHEN NO_DATA_FOUND THEN
14086: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
14087: fnd_message.set_token('FK', 'object_type');
14088: fnd_message.set_token('COLUMN', 'instance_set_name');
14089: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
14090: fnd_msg_pub.add;
14083: WHERE fois.instance_set_name = p_relationship_rec.object_type;
14084: EXCEPTION
14085: WHEN NO_DATA_FOUND THEN
14086: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
14087: fnd_message.set_token('FK', 'object_type');
14088: fnd_message.set_token('COLUMN', 'instance_set_name');
14089: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
14090: fnd_msg_pub.add;
14091: x_return_status := fnd_api.g_ret_sts_error;
14084: EXCEPTION
14085: WHEN NO_DATA_FOUND THEN
14086: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
14087: fnd_message.set_token('FK', 'object_type');
14088: fnd_message.set_token('COLUMN', 'instance_set_name');
14089: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
14090: fnd_msg_pub.add;
14091: x_return_status := fnd_api.g_ret_sts_error;
14092: END;
14085: WHEN NO_DATA_FOUND THEN
14086: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
14087: fnd_message.set_token('FK', 'object_type');
14088: fnd_message.set_token('COLUMN', 'instance_set_name');
14089: fnd_message.set_token('TABLE', 'fnd_object_instance_sets');
14090: fnd_msg_pub.add;
14091: x_return_status := fnd_api.g_ret_sts_error;
14092: END;
14093:
14314: IF p_relationship_rec.end_date IS NOT NULL AND
14315: p_relationship_rec.end_date <> fnd_api.g_miss_date AND
14316: p_relationship_rec.end_date < p_relationship_rec.start_date
14317: THEN
14318: fnd_message.set_name('AR', 'HZ_API_START_DATE_GREATER');
14319: fnd_msg_pub.add;
14320: x_return_status := fnd_api.g_ret_sts_error;
14321: END IF;
14322: ELSIF (p_create_update_flag = 'U') THEN
14335:
14336: IF l_end_date IS NOT NULL
14337: AND l_end_date < l_start_date
14338: THEN
14339: fnd_message.set_name('AR', 'HZ_API_START_DATE_GREATER');
14340: fnd_msg_pub.add;
14341: x_return_status := fnd_api.g_ret_sts_error;
14342: END IF;
14343: END IF;
14389: r1.start_date,
14390: r1.end_date
14391: );
14392: IF l_overlap = 'Y' THEN
14393: fnd_message.set_name('AR', 'HZ_RELATIONSHIP_DATE_OVERLAP');
14394: fnd_msg_pub.add;
14395: x_return_status := fnd_api.g_ret_sts_error;
14396: -- Bug 3294936 : Add exit to come out of loop
14397: EXIT;
14977: ( p_organization_rec.avg_high_credit = FND_API.G_MISS_NUM OR
14978: p_organization_rec.avg_high_credit IS NOT NULL
14979: ) )
14980: THEN
14981: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
14982: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'avg_high_credit' );
14983: FND_MSG_PUB.ADD;
14984: x_return_status := FND_API.G_RET_STS_ERROR;
14985: END IF;
14978: p_organization_rec.avg_high_credit IS NOT NULL
14979: ) )
14980: THEN
14981: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
14982: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'avg_high_credit' );
14983: FND_MSG_PUB.ADD;
14984: x_return_status := FND_API.G_RET_STS_ERROR;
14985: END IF;
14986:
14992: ( p_organization_rec.credit_score = FND_API.G_MISS_CHAR OR
14993: p_organization_rec.credit_score IS NOT NULL
14994: ) )
14995: THEN
14996: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
14997: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score' );
14998: FND_MSG_PUB.ADD;
14999: x_return_status := FND_API.G_RET_STS_ERROR;
15000: END IF;
14993: p_organization_rec.credit_score IS NOT NULL
14994: ) )
14995: THEN
14996: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
14997: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score' );
14998: FND_MSG_PUB.ADD;
14999: x_return_status := FND_API.G_RET_STS_ERROR;
15000: END IF;
15001:
15007: ( p_organization_rec.credit_score_age = FND_API.G_MISS_NUM OR
15008: p_organization_rec.credit_score_age IS NOT NULL
15009: ) )
15010: THEN
15011: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15012: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_age' );
15013: FND_MSG_PUB.ADD;
15014: x_return_status := FND_API.G_RET_STS_ERROR;
15015: END IF;
15008: p_organization_rec.credit_score_age IS NOT NULL
15009: ) )
15010: THEN
15011: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15012: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_age' );
15013: FND_MSG_PUB.ADD;
15014: x_return_status := FND_API.G_RET_STS_ERROR;
15015: END IF;
15016:
15022: ( p_organization_rec.credit_score_class = FND_API.G_MISS_NUM OR
15023: p_organization_rec.credit_score_class IS NOT NULL
15024: ) )
15025: THEN
15026: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15027: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_class' );
15028: FND_MSG_PUB.ADD;
15029: x_return_status := FND_API.G_RET_STS_ERROR;
15030: END IF;
15023: p_organization_rec.credit_score_class IS NOT NULL
15024: ) )
15025: THEN
15026: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15027: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_class' );
15028: FND_MSG_PUB.ADD;
15029: x_return_status := FND_API.G_RET_STS_ERROR;
15030: END IF;
15031:
15037: ( p_organization_rec.credit_score_commentary = FND_API.G_MISS_CHAR OR
15038: p_organization_rec.credit_score_commentary IS NOT NULL
15039: ) )
15040: THEN
15041: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15042: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary' );
15043: FND_MSG_PUB.ADD;
15044: x_return_status := FND_API.G_RET_STS_ERROR;
15045: END IF;
15038: p_organization_rec.credit_score_commentary IS NOT NULL
15039: ) )
15040: THEN
15041: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15042: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary' );
15043: FND_MSG_PUB.ADD;
15044: x_return_status := FND_API.G_RET_STS_ERROR;
15045: END IF;
15046:
15052: ( p_organization_rec.credit_score_commentary2 = FND_API.G_MISS_CHAR OR
15053: p_organization_rec.credit_score_commentary2 IS NOT NULL
15054: ) )
15055: THEN
15056: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15057: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary2' );
15058: FND_MSG_PUB.ADD;
15059: x_return_status := FND_API.G_RET_STS_ERROR;
15060: END IF;
15053: p_organization_rec.credit_score_commentary2 IS NOT NULL
15054: ) )
15055: THEN
15056: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15057: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary2' );
15058: FND_MSG_PUB.ADD;
15059: x_return_status := FND_API.G_RET_STS_ERROR;
15060: END IF;
15061:
15067: ( p_organization_rec.credit_score_commentary3 = FND_API.G_MISS_CHAR OR
15068: p_organization_rec.credit_score_commentary3 IS NOT NULL
15069: ) )
15070: THEN
15071: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15072: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary3' );
15073: FND_MSG_PUB.ADD;
15074: x_return_status := FND_API.G_RET_STS_ERROR;
15075: END IF;
15068: p_organization_rec.credit_score_commentary3 IS NOT NULL
15069: ) )
15070: THEN
15071: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15072: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary3' );
15073: FND_MSG_PUB.ADD;
15074: x_return_status := FND_API.G_RET_STS_ERROR;
15075: END IF;
15076:
15082: ( p_organization_rec.credit_score_commentary4 = FND_API.G_MISS_CHAR OR
15083: p_organization_rec.credit_score_commentary4 IS NOT NULL
15084: ) )
15085: THEN
15086: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15087: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary4' );
15088: FND_MSG_PUB.ADD;
15089: x_return_status := FND_API.G_RET_STS_ERROR;
15090: END IF;
15083: p_organization_rec.credit_score_commentary4 IS NOT NULL
15084: ) )
15085: THEN
15086: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15087: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary4' );
15088: FND_MSG_PUB.ADD;
15089: x_return_status := FND_API.G_RET_STS_ERROR;
15090: END IF;
15091:
15097: ( p_organization_rec.credit_score_commentary5 = FND_API.G_MISS_CHAR OR
15098: p_organization_rec.credit_score_commentary5 IS NOT NULL
15099: ) )
15100: THEN
15101: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15102: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary5' );
15103: FND_MSG_PUB.ADD;
15104: x_return_status := FND_API.G_RET_STS_ERROR;
15105: END IF;
15098: p_organization_rec.credit_score_commentary5 IS NOT NULL
15099: ) )
15100: THEN
15101: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15102: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary5' );
15103: FND_MSG_PUB.ADD;
15104: x_return_status := FND_API.G_RET_STS_ERROR;
15105: END IF;
15106:
15112: ( p_organization_rec.credit_score_commentary6 = FND_API.G_MISS_CHAR OR
15113: p_organization_rec.credit_score_commentary6 IS NOT NULL
15114: ) )
15115: THEN
15116: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15117: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary6' );
15118: FND_MSG_PUB.ADD;
15119: x_return_status := FND_API.G_RET_STS_ERROR;
15120: END IF;
15113: p_organization_rec.credit_score_commentary6 IS NOT NULL
15114: ) )
15115: THEN
15116: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15117: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary6' );
15118: FND_MSG_PUB.ADD;
15119: x_return_status := FND_API.G_RET_STS_ERROR;
15120: END IF;
15121:
15127: ( p_organization_rec.credit_score_commentary7 = FND_API.G_MISS_CHAR OR
15128: p_organization_rec.credit_score_commentary7 IS NOT NULL
15129: ) )
15130: THEN
15131: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15132: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary7' );
15133: FND_MSG_PUB.ADD;
15134: x_return_status := FND_API.G_RET_STS_ERROR;
15135: END IF;
15128: p_organization_rec.credit_score_commentary7 IS NOT NULL
15129: ) )
15130: THEN
15131: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15132: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary7' );
15133: FND_MSG_PUB.ADD;
15134: x_return_status := FND_API.G_RET_STS_ERROR;
15135: END IF;
15136:
15142: ( p_organization_rec.credit_score_commentary8 = FND_API.G_MISS_CHAR OR
15143: p_organization_rec.credit_score_commentary8 IS NOT NULL
15144: ) )
15145: THEN
15146: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15147: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary8' );
15148: FND_MSG_PUB.ADD;
15149: x_return_status := FND_API.G_RET_STS_ERROR;
15150: END IF;
15143: p_organization_rec.credit_score_commentary8 IS NOT NULL
15144: ) )
15145: THEN
15146: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15147: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary8' );
15148: FND_MSG_PUB.ADD;
15149: x_return_status := FND_API.G_RET_STS_ERROR;
15150: END IF;
15151:
15157: ( p_organization_rec.credit_score_commentary9 = FND_API.G_MISS_CHAR OR
15158: p_organization_rec.credit_score_commentary9 IS NOT NULL
15159: ) )
15160: THEN
15161: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15162: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary9' );
15163: FND_MSG_PUB.ADD;
15164: x_return_status := FND_API.G_RET_STS_ERROR;
15165: END IF;
15158: p_organization_rec.credit_score_commentary9 IS NOT NULL
15159: ) )
15160: THEN
15161: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15162: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary9' );
15163: FND_MSG_PUB.ADD;
15164: x_return_status := FND_API.G_RET_STS_ERROR;
15165: END IF;
15166:
15172: ( p_organization_rec.credit_score_commentary10 = FND_API.G_MISS_CHAR OR
15173: p_organization_rec.credit_score_commentary10 IS NOT NULL
15174: ) )
15175: THEN
15176: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15177: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary10' );
15178: FND_MSG_PUB.ADD;
15179: x_return_status := FND_API.G_RET_STS_ERROR;
15180: END IF;
15173: p_organization_rec.credit_score_commentary10 IS NOT NULL
15174: ) )
15175: THEN
15176: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15177: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_commentary10' );
15178: FND_MSG_PUB.ADD;
15179: x_return_status := FND_API.G_RET_STS_ERROR;
15180: END IF;
15181:
15187: ( p_organization_rec.credit_score_date = FND_API.G_MISS_DATE OR
15188: p_organization_rec.credit_score_date IS NOT NULL
15189: ) )
15190: THEN
15191: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15192: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_date' );
15193: FND_MSG_PUB.ADD;
15194: x_return_status := FND_API.G_RET_STS_ERROR;
15195: END IF;
15188: p_organization_rec.credit_score_date IS NOT NULL
15189: ) )
15190: THEN
15191: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15192: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_date' );
15193: FND_MSG_PUB.ADD;
15194: x_return_status := FND_API.G_RET_STS_ERROR;
15195: END IF;
15196:
15202: ( p_organization_rec.credit_score_incd_default = FND_API.G_MISS_NUM OR
15203: p_organization_rec.credit_score_incd_default IS NOT NULL
15204: ) )
15205: THEN
15206: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15207: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_incd_default' );
15208: FND_MSG_PUB.ADD;
15209: x_return_status := FND_API.G_RET_STS_ERROR;
15210: END IF;
15203: p_organization_rec.credit_score_incd_default IS NOT NULL
15204: ) )
15205: THEN
15206: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15207: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_incd_default' );
15208: FND_MSG_PUB.ADD;
15209: x_return_status := FND_API.G_RET_STS_ERROR;
15210: END IF;
15211:
15217: ( p_organization_rec.credit_score_natl_percentile = FND_API.G_MISS_NUM OR
15218: p_organization_rec.credit_score_natl_percentile IS NOT NULL
15219: ) )
15220: THEN
15221: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15222: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_natl_percentile' );
15223: FND_MSG_PUB.ADD;
15224: x_return_status := FND_API.G_RET_STS_ERROR;
15225: END IF;
15218: p_organization_rec.credit_score_natl_percentile IS NOT NULL
15219: ) )
15220: THEN
15221: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15222: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'credit_score_natl_percentile' );
15223: FND_MSG_PUB.ADD;
15224: x_return_status := FND_API.G_RET_STS_ERROR;
15225: END IF;
15226:
15232: ( p_organization_rec.db_rating = FND_API.G_MISS_CHAR OR
15233: p_organization_rec.db_rating IS NOT NULL
15234: ) )
15235: THEN
15236: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15237: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'db_rating' );
15238: FND_MSG_PUB.ADD;
15239: x_return_status := FND_API.G_RET_STS_ERROR;
15240: END IF;
15233: p_organization_rec.db_rating IS NOT NULL
15234: ) )
15235: THEN
15236: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15237: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'db_rating' );
15238: FND_MSG_PUB.ADD;
15239: x_return_status := FND_API.G_RET_STS_ERROR;
15240: END IF;
15241:
15247: ( p_organization_rec.debarment_ind = FND_API.G_MISS_CHAR OR
15248: p_organization_rec.debarment_ind IS NOT NULL
15249: ) )
15250: THEN
15251: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15252: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'debarment_ind' );
15253: FND_MSG_PUB.ADD;
15254: x_return_status := FND_API.G_RET_STS_ERROR;
15255: END IF;
15248: p_organization_rec.debarment_ind IS NOT NULL
15249: ) )
15250: THEN
15251: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15252: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'debarment_ind' );
15253: FND_MSG_PUB.ADD;
15254: x_return_status := FND_API.G_RET_STS_ERROR;
15255: END IF;
15256:
15262: ( p_organization_rec.debarments_count = FND_API.G_MISS_NUM OR
15263: p_organization_rec.debarments_count IS NOT NULL
15264: ) )
15265: THEN
15266: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15267: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'debarments_count' );
15268: FND_MSG_PUB.ADD;
15269: x_return_status := FND_API.G_RET_STS_ERROR;
15270: END IF;
15263: p_organization_rec.debarments_count IS NOT NULL
15264: ) )
15265: THEN
15266: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15267: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'debarments_count' );
15268: FND_MSG_PUB.ADD;
15269: x_return_status := FND_API.G_RET_STS_ERROR;
15270: END IF;
15271:
15277: ( p_organization_rec.debarments_date = FND_API.G_MISS_DATE OR
15278: p_organization_rec.debarments_date IS NOT NULL
15279: ) )
15280: THEN
15281: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15282: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'debarments_date' );
15283: FND_MSG_PUB.ADD;
15284: x_return_status := FND_API.G_RET_STS_ERROR;
15285: END IF;
15278: p_organization_rec.debarments_date IS NOT NULL
15279: ) )
15280: THEN
15281: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15282: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'debarments_date' );
15283: FND_MSG_PUB.ADD;
15284: x_return_status := FND_API.G_RET_STS_ERROR;
15285: END IF;
15286:
15292: ( p_organization_rec.high_credit = FND_API.G_MISS_NUM OR
15293: p_organization_rec.high_credit IS NOT NULL
15294: ) )
15295: THEN
15296: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15297: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'high_credit' );
15298: FND_MSG_PUB.ADD;
15299: x_return_status := FND_API.G_RET_STS_ERROR;
15300: END IF;
15293: p_organization_rec.high_credit IS NOT NULL
15294: ) )
15295: THEN
15296: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15297: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'high_credit' );
15298: FND_MSG_PUB.ADD;
15299: x_return_status := FND_API.G_RET_STS_ERROR;
15300: END IF;
15301:
15307: ( p_organization_rec.maximum_credit_currency_code = FND_API.G_MISS_CHAR OR
15308: p_organization_rec.maximum_credit_currency_code IS NOT NULL
15309: ) )
15310: THEN
15311: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15312: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'maximum_credit_currency_code' );
15313: FND_MSG_PUB.ADD;
15314: x_return_status := FND_API.G_RET_STS_ERROR;
15315: END IF;
15308: p_organization_rec.maximum_credit_currency_code IS NOT NULL
15309: ) )
15310: THEN
15311: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15312: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'maximum_credit_currency_code' );
15313: FND_MSG_PUB.ADD;
15314: x_return_status := FND_API.G_RET_STS_ERROR;
15315: END IF;
15316:
15322: ( p_organization_rec.maximum_credit_recommendation = FND_API.G_MISS_NUM OR
15323: p_organization_rec.maximum_credit_recommendation IS NOT NULL
15324: ) )
15325: THEN
15326: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15327: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'maximum_credit_recommendation' );
15328: FND_MSG_PUB.ADD;
15329: x_return_status := FND_API.G_RET_STS_ERROR;
15330: END IF;
15323: p_organization_rec.maximum_credit_recommendation IS NOT NULL
15324: ) )
15325: THEN
15326: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15327: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'maximum_credit_recommendation' );
15328: FND_MSG_PUB.ADD;
15329: x_return_status := FND_API.G_RET_STS_ERROR;
15330: END IF;
15331:
15337: ( p_organization_rec.paydex_norm = FND_API.G_MISS_CHAR OR
15338: p_organization_rec.paydex_norm IS NOT NULL
15339: ) )
15340: THEN
15341: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15342: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'paydex_norm' );
15343: FND_MSG_PUB.ADD;
15344: x_return_status := FND_API.G_RET_STS_ERROR;
15345: END IF;
15338: p_organization_rec.paydex_norm IS NOT NULL
15339: ) )
15340: THEN
15341: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15342: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'paydex_norm' );
15343: FND_MSG_PUB.ADD;
15344: x_return_status := FND_API.G_RET_STS_ERROR;
15345: END IF;
15346:
15352: ( p_organization_rec.paydex_score = FND_API.G_MISS_CHAR OR
15353: p_organization_rec.paydex_score IS NOT NULL
15354: ) )
15355: THEN
15356: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15357: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'paydex_score' );
15358: FND_MSG_PUB.ADD;
15359: x_return_status := FND_API.G_RET_STS_ERROR;
15360: END IF;
15353: p_organization_rec.paydex_score IS NOT NULL
15354: ) )
15355: THEN
15356: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15357: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'paydex_score' );
15358: FND_MSG_PUB.ADD;
15359: x_return_status := FND_API.G_RET_STS_ERROR;
15360: END IF;
15361:
15367: ( p_organization_rec.paydex_three_months_ago = FND_API.G_MISS_CHAR OR
15368: p_organization_rec.paydex_three_months_ago IS NOT NULL
15369: ) )
15370: THEN
15371: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15372: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'paydex_three_months_ago' );
15373: FND_MSG_PUB.ADD;
15374: x_return_status := FND_API.G_RET_STS_ERROR;
15375: END IF;
15368: p_organization_rec.paydex_three_months_ago IS NOT NULL
15369: ) )
15370: THEN
15371: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15372: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'paydex_three_months_ago' );
15373: FND_MSG_PUB.ADD;
15374: x_return_status := FND_API.G_RET_STS_ERROR;
15375: END IF;
15376:
15382: ( p_organization_rec.failure_score = FND_API.G_MISS_CHAR OR
15383: p_organization_rec.failure_score IS NOT NULL
15384: ) )
15385: THEN
15386: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15387: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score' );
15388: FND_MSG_PUB.ADD;
15389: x_return_status := FND_API.G_RET_STS_ERROR;
15390: END IF;
15383: p_organization_rec.failure_score IS NOT NULL
15384: ) )
15385: THEN
15386: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15387: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score' );
15388: FND_MSG_PUB.ADD;
15389: x_return_status := FND_API.G_RET_STS_ERROR;
15390: END IF;
15391:
15397: ( p_organization_rec.failure_score_age = FND_API.G_MISS_NUM OR
15398: p_organization_rec.failure_score_age IS NOT NULL
15399: ) )
15400: THEN
15401: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15402: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_age' );
15403: FND_MSG_PUB.ADD;
15404: x_return_status := FND_API.G_RET_STS_ERROR;
15405: END IF;
15398: p_organization_rec.failure_score_age IS NOT NULL
15399: ) )
15400: THEN
15401: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15402: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_age' );
15403: FND_MSG_PUB.ADD;
15404: x_return_status := FND_API.G_RET_STS_ERROR;
15405: END IF;
15406:
15412: ( p_organization_rec.failure_score_class = FND_API.G_MISS_NUM OR
15413: p_organization_rec.failure_score_class IS NOT NULL
15414: ) )
15415: THEN
15416: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15417: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_class' );
15418: FND_MSG_PUB.ADD;
15419: x_return_status := FND_API.G_RET_STS_ERROR;
15420: END IF;
15413: p_organization_rec.failure_score_class IS NOT NULL
15414: ) )
15415: THEN
15416: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15417: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_class' );
15418: FND_MSG_PUB.ADD;
15419: x_return_status := FND_API.G_RET_STS_ERROR;
15420: END IF;
15421:
15427: ( p_organization_rec.failure_score_commentary = FND_API.G_MISS_CHAR OR
15428: p_organization_rec.failure_score_commentary IS NOT NULL
15429: ) )
15430: THEN
15431: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15432: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary' );
15433: FND_MSG_PUB.ADD;
15434: x_return_status := FND_API.G_RET_STS_ERROR;
15435: END IF;
15428: p_organization_rec.failure_score_commentary IS NOT NULL
15429: ) )
15430: THEN
15431: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15432: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary' );
15433: FND_MSG_PUB.ADD;
15434: x_return_status := FND_API.G_RET_STS_ERROR;
15435: END IF;
15436:
15442: ( p_organization_rec.failure_score_commentary2 = FND_API.G_MISS_CHAR OR
15443: p_organization_rec.failure_score_commentary2 IS NOT NULL
15444: ) )
15445: THEN
15446: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15447: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary2' );
15448: FND_MSG_PUB.ADD;
15449: x_return_status := FND_API.G_RET_STS_ERROR;
15450: END IF;
15443: p_organization_rec.failure_score_commentary2 IS NOT NULL
15444: ) )
15445: THEN
15446: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15447: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary2' );
15448: FND_MSG_PUB.ADD;
15449: x_return_status := FND_API.G_RET_STS_ERROR;
15450: END IF;
15451:
15457: ( p_organization_rec.failure_score_commentary3 = FND_API.G_MISS_CHAR OR
15458: p_organization_rec.failure_score_commentary3 IS NOT NULL
15459: ) )
15460: THEN
15461: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15462: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary3' );
15463: FND_MSG_PUB.ADD;
15464: x_return_status := FND_API.G_RET_STS_ERROR;
15465: END IF;
15458: p_organization_rec.failure_score_commentary3 IS NOT NULL
15459: ) )
15460: THEN
15461: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15462: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary3' );
15463: FND_MSG_PUB.ADD;
15464: x_return_status := FND_API.G_RET_STS_ERROR;
15465: END IF;
15466:
15472: ( p_organization_rec.failure_score_commentary4 = FND_API.G_MISS_CHAR OR
15473: p_organization_rec.failure_score_commentary4 IS NOT NULL
15474: ) )
15475: THEN
15476: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15477: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary4' );
15478: FND_MSG_PUB.ADD;
15479: x_return_status := FND_API.G_RET_STS_ERROR;
15480: END IF;
15473: p_organization_rec.failure_score_commentary4 IS NOT NULL
15474: ) )
15475: THEN
15476: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15477: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary4' );
15478: FND_MSG_PUB.ADD;
15479: x_return_status := FND_API.G_RET_STS_ERROR;
15480: END IF;
15481:
15487: ( p_organization_rec.failure_score_commentary5 = FND_API.G_MISS_CHAR OR
15488: p_organization_rec.failure_score_commentary5 IS NOT NULL
15489: ) )
15490: THEN
15491: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15492: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary5' );
15493: FND_MSG_PUB.ADD;
15494: x_return_status := FND_API.G_RET_STS_ERROR;
15495: END IF;
15488: p_organization_rec.failure_score_commentary5 IS NOT NULL
15489: ) )
15490: THEN
15491: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15492: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary5' );
15493: FND_MSG_PUB.ADD;
15494: x_return_status := FND_API.G_RET_STS_ERROR;
15495: END IF;
15496:
15502: ( p_organization_rec.failure_score_commentary6 = FND_API.G_MISS_CHAR OR
15503: p_organization_rec.failure_score_commentary6 IS NOT NULL
15504: ) )
15505: THEN
15506: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15507: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary6' );
15508: FND_MSG_PUB.ADD;
15509: x_return_status := FND_API.G_RET_STS_ERROR;
15510: END IF;
15503: p_organization_rec.failure_score_commentary6 IS NOT NULL
15504: ) )
15505: THEN
15506: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15507: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary6' );
15508: FND_MSG_PUB.ADD;
15509: x_return_status := FND_API.G_RET_STS_ERROR;
15510: END IF;
15511:
15517: ( p_organization_rec.failure_score_commentary7 = FND_API.G_MISS_CHAR OR
15518: p_organization_rec.failure_score_commentary7 IS NOT NULL
15519: ) )
15520: THEN
15521: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15522: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary7' );
15523: FND_MSG_PUB.ADD;
15524: x_return_status := FND_API.G_RET_STS_ERROR;
15525: END IF;
15518: p_organization_rec.failure_score_commentary7 IS NOT NULL
15519: ) )
15520: THEN
15521: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15522: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary7' );
15523: FND_MSG_PUB.ADD;
15524: x_return_status := FND_API.G_RET_STS_ERROR;
15525: END IF;
15526:
15532: ( p_organization_rec.failure_score_commentary8 = FND_API.G_MISS_CHAR OR
15533: p_organization_rec.failure_score_commentary8 IS NOT NULL
15534: ) )
15535: THEN
15536: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15537: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary8' );
15538: FND_MSG_PUB.ADD;
15539: x_return_status := FND_API.G_RET_STS_ERROR;
15540: END IF;
15533: p_organization_rec.failure_score_commentary8 IS NOT NULL
15534: ) )
15535: THEN
15536: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15537: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary8' );
15538: FND_MSG_PUB.ADD;
15539: x_return_status := FND_API.G_RET_STS_ERROR;
15540: END IF;
15541:
15547: ( p_organization_rec.failure_score_commentary9 = FND_API.G_MISS_CHAR OR
15548: p_organization_rec.failure_score_commentary9 IS NOT NULL
15549: ) )
15550: THEN
15551: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15552: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary9' );
15553: FND_MSG_PUB.ADD;
15554: x_return_status := FND_API.G_RET_STS_ERROR;
15555: END IF;
15548: p_organization_rec.failure_score_commentary9 IS NOT NULL
15549: ) )
15550: THEN
15551: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15552: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary9' );
15553: FND_MSG_PUB.ADD;
15554: x_return_status := FND_API.G_RET_STS_ERROR;
15555: END IF;
15556:
15562: ( p_organization_rec.failure_score_commentary10 = FND_API.G_MISS_CHAR OR
15563: p_organization_rec.failure_score_commentary10 IS NOT NULL
15564: ) )
15565: THEN
15566: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15567: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary10' );
15568: FND_MSG_PUB.ADD;
15569: x_return_status := FND_API.G_RET_STS_ERROR;
15570: END IF;
15563: p_organization_rec.failure_score_commentary10 IS NOT NULL
15564: ) )
15565: THEN
15566: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15567: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_commentary10' );
15568: FND_MSG_PUB.ADD;
15569: x_return_status := FND_API.G_RET_STS_ERROR;
15570: END IF;
15571:
15577: ( p_organization_rec.failure_score_date = FND_API.G_MISS_DATE OR
15578: p_organization_rec.failure_score_date IS NOT NULL
15579: ) )
15580: THEN
15581: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15582: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_date' );
15583: FND_MSG_PUB.ADD;
15584: x_return_status := FND_API.G_RET_STS_ERROR;
15585: END IF;
15578: p_organization_rec.failure_score_date IS NOT NULL
15579: ) )
15580: THEN
15581: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15582: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_date' );
15583: FND_MSG_PUB.ADD;
15584: x_return_status := FND_API.G_RET_STS_ERROR;
15585: END IF;
15586:
15592: ( p_organization_rec.failure_score_incd_default = FND_API.G_MISS_NUM OR
15593: p_organization_rec.failure_score_incd_default IS NOT NULL
15594: ) )
15595: THEN
15596: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15597: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_incd_default' );
15598: FND_MSG_PUB.ADD;
15599: x_return_status := FND_API.G_RET_STS_ERROR;
15600: END IF;
15593: p_organization_rec.failure_score_incd_default IS NOT NULL
15594: ) )
15595: THEN
15596: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15597: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_incd_default' );
15598: FND_MSG_PUB.ADD;
15599: x_return_status := FND_API.G_RET_STS_ERROR;
15600: END IF;
15601:
15607: ( p_organization_rec.failure_score_natnl_percentile = FND_API.G_MISS_NUM OR
15608: p_organization_rec.failure_score_natnl_percentile IS NOT NULL
15609: ) )
15610: THEN
15611: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15612: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_natnl_percentile' );
15613: FND_MSG_PUB.ADD;
15614: x_return_status := FND_API.G_RET_STS_ERROR;
15615: END IF;
15608: p_organization_rec.failure_score_natnl_percentile IS NOT NULL
15609: ) )
15610: THEN
15611: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15612: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_natnl_percentile' );
15613: FND_MSG_PUB.ADD;
15614: x_return_status := FND_API.G_RET_STS_ERROR;
15615: END IF;
15616:
15622: ( p_organization_rec.failure_score_override_code = FND_API.G_MISS_CHAR OR
15623: p_organization_rec.failure_score_override_code IS NOT NULL
15624: ) )
15625: THEN
15626: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15627: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_override_code' );
15628: FND_MSG_PUB.ADD;
15629: x_return_status := FND_API.G_RET_STS_ERROR;
15630: END IF;
15623: p_organization_rec.failure_score_override_code IS NOT NULL
15624: ) )
15625: THEN
15626: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15627: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'failure_score_override_code' );
15628: FND_MSG_PUB.ADD;
15629: x_return_status := FND_API.G_RET_STS_ERROR;
15630: END IF;
15631:
15637: ( p_organization_rec.global_failure_score = FND_API.G_MISS_CHAR OR
15638: p_organization_rec.global_failure_score IS NOT NULL
15639: ) )
15640: THEN
15641: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15642: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'global_failure_score' );
15643: FND_MSG_PUB.ADD;
15644: x_return_status := FND_API.G_RET_STS_ERROR;
15645: END IF;
15638: p_organization_rec.global_failure_score IS NOT NULL
15639: ) )
15640: THEN
15641: FND_MESSAGE.SET_NAME( 'AR', 'HZ_DNB_MOVED_COLUMN' );
15642: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'global_failure_score' );
15643: FND_MSG_PUB.ADD;
15644: x_return_status := FND_API.G_RET_STS_ERROR;
15645: END IF;
15646:
15670: BEGIN
15671:
15672: IF p_forward_rel_code = p_backward_rel_code THEN
15673: IF p_forward_role <> p_backward_role THEN
15674: fnd_message.set_name('AR', 'HZ_INVALID_ROLE1');
15675: fnd_msg_pub.add;
15676: x_return_status := FND_API.G_RET_STS_ERROR;
15677: END IF;
15678: END IF;
15678: END IF;
15679:
15680: IF p_forward_rel_code <> p_backward_rel_code THEN
15681: IF p_forward_role = p_backward_role THEN
15682: fnd_message.set_name('AR', 'HZ_INVALID_ROLE2');
15683: fnd_msg_pub.add;
15684: x_return_status := FND_API.G_RET_STS_ERROR;
15685: END IF;
15686: END IF;
15915: FETCH c_dup_financial_report_id INTO l_dummy;
15916:
15917: -- key is not unique, push an error onto the stack.
15918: IF NVL(c_dup_financial_report_id%FOUND, FALSE) THEN
15919: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
15920: fnd_message.set_token('COLUMN', 'financial_report_id');
15921: fnd_msg_pub.add;
15922: x_return_status := fnd_api.g_ret_sts_error;
15923: END IF;
15916:
15917: -- key is not unique, push an error onto the stack.
15918: IF NVL(c_dup_financial_report_id%FOUND, FALSE) THEN
15919: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
15920: fnd_message.set_token('COLUMN', 'financial_report_id');
15921: fnd_msg_pub.add;
15922: x_return_status := fnd_api.g_ret_sts_error;
15923: END IF;
15924: CLOSE c_dup_financial_report_id;
16041: WHERE p.party_id = p_financial_report_rec.party_id;
16042:
16043: EXCEPTION
16044: WHEN NO_DATA_FOUND THEN
16045: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16046: fnd_message.set_token('FK', 'party_id');
16047: fnd_message.set_token('COLUMN', 'party_id');
16048: fnd_message.set_token('TABLE', 'hz_parties');
16049: fnd_msg_pub.add;
16042:
16043: EXCEPTION
16044: WHEN NO_DATA_FOUND THEN
16045: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16046: fnd_message.set_token('FK', 'party_id');
16047: fnd_message.set_token('COLUMN', 'party_id');
16048: fnd_message.set_token('TABLE', 'hz_parties');
16049: fnd_msg_pub.add;
16050: x_return_status := fnd_api.g_ret_sts_error;
16043: EXCEPTION
16044: WHEN NO_DATA_FOUND THEN
16045: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16046: fnd_message.set_token('FK', 'party_id');
16047: fnd_message.set_token('COLUMN', 'party_id');
16048: fnd_message.set_token('TABLE', 'hz_parties');
16049: fnd_msg_pub.add;
16050: x_return_status := fnd_api.g_ret_sts_error;
16051: END;
16044: WHEN NO_DATA_FOUND THEN
16045: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16046: fnd_message.set_token('FK', 'party_id');
16047: fnd_message.set_token('COLUMN', 'party_id');
16048: fnd_message.set_token('TABLE', 'hz_parties');
16049: fnd_msg_pub.add;
16050: x_return_status := fnd_api.g_ret_sts_error;
16051: END;
16052: */
16083: THEN
16084: IF rtrim(ltrim(l_party_type)) <> 'ORGANIZATION'
16085: THEN
16086: -- This is not an organization. Hence throw error
16087: fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE');
16088: fnd_message.set_token('PARTY_ID', TO_CHAR(p_financial_report_rec.party_id));
16089: fnd_message.set_token('TYPE', 'ORGANIZATION');
16090: fnd_msg_pub.add;
16091: x_return_status := fnd_api.g_ret_sts_error;
16084: IF rtrim(ltrim(l_party_type)) <> 'ORGANIZATION'
16085: THEN
16086: -- This is not an organization. Hence throw error
16087: fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE');
16088: fnd_message.set_token('PARTY_ID', TO_CHAR(p_financial_report_rec.party_id));
16089: fnd_message.set_token('TYPE', 'ORGANIZATION');
16090: fnd_msg_pub.add;
16091: x_return_status := fnd_api.g_ret_sts_error;
16092: END IF;
16085: THEN
16086: -- This is not an organization. Hence throw error
16087: fnd_message.set_name('AR', 'HZ_API_INVALID_PARTY_TYPE');
16088: fnd_message.set_token('PARTY_ID', TO_CHAR(p_financial_report_rec.party_id));
16089: fnd_message.set_token('TYPE', 'ORGANIZATION');
16090: fnd_msg_pub.add;
16091: x_return_status := fnd_api.g_ret_sts_error;
16092: END IF;
16093: ELSE -- 3456205
16092: END IF;
16093: ELSE -- 3456205
16094: -- party_id has foreign key HZ_PARTIES.PARTY_ID
16095: -- However since no record found in HZ_PARTIES, therefore throw error.
16096: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16097: fnd_message.set_token('FK', 'party_id');
16098: fnd_message.set_token('COLUMN', 'party_id');
16099: fnd_message.set_token('TABLE', 'hz_parties');
16100: fnd_msg_pub.add;
16093: ELSE -- 3456205
16094: -- party_id has foreign key HZ_PARTIES.PARTY_ID
16095: -- However since no record found in HZ_PARTIES, therefore throw error.
16096: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16097: fnd_message.set_token('FK', 'party_id');
16098: fnd_message.set_token('COLUMN', 'party_id');
16099: fnd_message.set_token('TABLE', 'hz_parties');
16100: fnd_msg_pub.add;
16101: x_return_status := fnd_api.g_ret_sts_error;
16094: -- party_id has foreign key HZ_PARTIES.PARTY_ID
16095: -- However since no record found in HZ_PARTIES, therefore throw error.
16096: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16097: fnd_message.set_token('FK', 'party_id');
16098: fnd_message.set_token('COLUMN', 'party_id');
16099: fnd_message.set_token('TABLE', 'hz_parties');
16100: fnd_msg_pub.add;
16101: x_return_status := fnd_api.g_ret_sts_error;
16102: END IF;
16095: -- However since no record found in HZ_PARTIES, therefore throw error.
16096: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
16097: fnd_message.set_token('FK', 'party_id');
16098: fnd_message.set_token('COLUMN', 'party_id');
16099: fnd_message.set_token('TABLE', 'hz_parties');
16100: fnd_msg_pub.add;
16101: x_return_status := fnd_api.g_ret_sts_error;
16102: END IF;
16103: CLOSE c_partytype;
16129: | nvl(p_financial_report_rec.issued_period, l_issued_period) <> fnd_api.g_miss_char) AND
16130: | (nvl(p_financial_report_rec.report_start_date, l_report_start_date) IS NOT NULL AND
16131: | nvl(p_financial_report_rec.report_start_date, l_report_start_date) <> fnd_api.g_miss_date))
16132: |THEN
16133: | fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
16134: | fnd_message.set_token('COLUMN1', 'issued_period');
16135: | fnd_message.set_token('COLUMN2', 'report_start_date');
16136: | fnd_msg_pub.add;
16137: | x_return_status := fnd_api.g_ret_sts_error;
16130: | (nvl(p_financial_report_rec.report_start_date, l_report_start_date) IS NOT NULL AND
16131: | nvl(p_financial_report_rec.report_start_date, l_report_start_date) <> fnd_api.g_miss_date))
16132: |THEN
16133: | fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
16134: | fnd_message.set_token('COLUMN1', 'issued_period');
16135: | fnd_message.set_token('COLUMN2', 'report_start_date');
16136: | fnd_msg_pub.add;
16137: | x_return_status := fnd_api.g_ret_sts_error;
16138: |END IF;
16131: | nvl(p_financial_report_rec.report_start_date, l_report_start_date) <> fnd_api.g_miss_date))
16132: |THEN
16133: | fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
16134: | fnd_message.set_token('COLUMN1', 'issued_period');
16135: | fnd_message.set_token('COLUMN2', 'report_start_date');
16136: | fnd_msg_pub.add;
16137: | x_return_status := fnd_api.g_ret_sts_error;
16138: |END IF;
16139: */
16181: )
16182: )
16183: )
16184: THEN
16185: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
16186: fnd_message.set_token('COLUMN1', 'issued_period');
16187: fnd_message.set_token('COLUMN2', 'report_start_date');
16188: fnd_msg_pub.add;
16189: x_return_status := fnd_api.g_ret_sts_error;
16182: )
16183: )
16184: THEN
16185: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
16186: fnd_message.set_token('COLUMN1', 'issued_period');
16187: fnd_message.set_token('COLUMN2', 'report_start_date');
16188: fnd_msg_pub.add;
16189: x_return_status := fnd_api.g_ret_sts_error;
16190: END IF;
16183: )
16184: THEN
16185: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION2');
16186: fnd_message.set_token('COLUMN1', 'issued_period');
16187: fnd_message.set_token('COLUMN2', 'report_start_date');
16188: fnd_msg_pub.add;
16189: x_return_status := fnd_api.g_ret_sts_error;
16190: END IF;
16191: END IF;
16207: AND (p_financial_report_rec.report_start_date IS NULL OR
16208: p_financial_report_rec.report_start_date = fnd_api.g_miss_date)
16209: ))
16210: THEN
16211: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION3');
16212: fnd_message.set_token('COLUMN1', 'report_start_date');
16213: fnd_message.set_token('COLUMN2', 'report_end_date');
16214: fnd_msg_pub.add;
16215: x_return_status := fnd_api.g_ret_sts_error;
16208: p_financial_report_rec.report_start_date = fnd_api.g_miss_date)
16209: ))
16210: THEN
16211: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION3');
16212: fnd_message.set_token('COLUMN1', 'report_start_date');
16213: fnd_message.set_token('COLUMN2', 'report_end_date');
16214: fnd_msg_pub.add;
16215: x_return_status := fnd_api.g_ret_sts_error;
16216: END IF;
16209: ))
16210: THEN
16211: fnd_message.set_name('AR', 'HZ_API_INVALID_COMBINATION3');
16212: fnd_message.set_token('COLUMN1', 'report_start_date');
16213: fnd_message.set_token('COLUMN2', 'report_end_date');
16214: fnd_msg_pub.add;
16215: x_return_status := fnd_api.g_ret_sts_error;
16216: END IF;
16217:
16224: p_financial_report_rec.report_end_date <> FND_API.G_MISS_DATE THEN
16225: if (p_financial_report_rec.report_end_date
16226: < p_financial_report_rec.report_start_date
16227: ) THEN
16228: FND_MESSAGE.SET_NAME('AR', 'HZ_API_START_DATE_GREATER');
16229: FND_MSG_PUB.ADD;
16230: x_return_status := FND_API.G_RET_STS_ERROR;
16231: end if;
16232: END IF;
16242: if p_financial_report_rec.report_start_date is NOT NULL AND
16243: p_financial_report_rec.report_start_date <> FND_API.G_MISS_DATE then
16244: if p_financial_report_rec.report_end_date
16245: < p_financial_report_rec.report_start_date then
16246: FND_MESSAGE.SET_NAME('AR', 'HZ_API_START_DATE_GREATER');
16247: FND_MSG_PUB.ADD;
16248: x_return_status := FND_API.G_RET_STS_ERROR;
16249:
16250: end if;
16249:
16250: end if;
16251: elsif ( p_financial_report_rec.report_end_date < l_report_start_date OR
16252: l_report_start_date is NULL) then
16253: FND_MESSAGE.SET_NAME('AR', 'HZ_API_START_DATE_GREATER');
16254: FND_MSG_PUB.ADD;
16255: x_return_status := FND_API.G_RET_STS_ERROR;
16256:
16257: end if;
16257: end if;
16258: elsif (p_financial_report_rec.report_start_date is NOT NULL AND
16259: p_financial_report_rec.report_start_date <> FND_API.G_MISS_DATE) THEN
16260: if l_report_end_date < p_financial_report_rec.report_start_date then
16261: FND_MESSAGE.SET_NAME('AR', 'HZ_API_START_DATE_GREATER');
16262: FND_MSG_PUB.ADD;
16263: x_return_status := FND_API.G_RET_STS_ERROR;
16264:
16265: end if;
16283: FETCH c_unique_financial_report_rec INTO l_dummy;
16284:
16285: -- combination key is not unique, push an error onto the stack.
16286: IF NVL(c_unique_financial_report_rec%FOUND, FALSE) THEN
16287: fnd_message.set_name('AR', 'HZ_API_DUP_FIN_REPORT_REC');
16288: fnd_msg_pub.add;
16289: x_return_status := fnd_api.g_ret_sts_error;
16290: END IF;
16291: CLOSE c_unique_financial_report_rec;
17002: FETCH c_dup_financial_number_id INTO l_dummy;
17003:
17004: -- key is not unique, push an error onto the stack.
17005: IF NVL(c_dup_financial_number_id%FOUND, FALSE) THEN
17006: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
17007: fnd_message.set_token('COLUMN', 'financial_number_id');
17008: fnd_msg_pub.add;
17009: x_return_status := fnd_api.g_ret_sts_error;
17010: END IF;
17003:
17004: -- key is not unique, push an error onto the stack.
17005: IF NVL(c_dup_financial_number_id%FOUND, FALSE) THEN
17006: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
17007: fnd_message.set_token('COLUMN', 'financial_number_id');
17008: fnd_msg_pub.add;
17009: x_return_status := fnd_api.g_ret_sts_error;
17010: END IF;
17011: CLOSE c_dup_financial_number_id;
17083: WHERE hfr.financial_report_id = p_financial_number_rec.financial_report_id;
17084:
17085: EXCEPTION
17086: WHEN NO_DATA_FOUND THEN
17087: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17088: fnd_message.set_token('FK', 'financial_report_id');
17089: fnd_message.set_token('COLUMN', 'financial_report_id');
17090: fnd_message.set_token('TABLE', 'hz_financial_reports');
17091: fnd_msg_pub.add;
17084:
17085: EXCEPTION
17086: WHEN NO_DATA_FOUND THEN
17087: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17088: fnd_message.set_token('FK', 'financial_report_id');
17089: fnd_message.set_token('COLUMN', 'financial_report_id');
17090: fnd_message.set_token('TABLE', 'hz_financial_reports');
17091: fnd_msg_pub.add;
17092: x_return_status := fnd_api.g_ret_sts_error;
17085: EXCEPTION
17086: WHEN NO_DATA_FOUND THEN
17087: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17088: fnd_message.set_token('FK', 'financial_report_id');
17089: fnd_message.set_token('COLUMN', 'financial_report_id');
17090: fnd_message.set_token('TABLE', 'hz_financial_reports');
17091: fnd_msg_pub.add;
17092: x_return_status := fnd_api.g_ret_sts_error;
17093: END;
17086: WHEN NO_DATA_FOUND THEN
17087: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17088: fnd_message.set_token('FK', 'financial_report_id');
17089: fnd_message.set_token('COLUMN', 'financial_report_id');
17090: fnd_message.set_token('TABLE', 'hz_financial_reports');
17091: fnd_msg_pub.add;
17092: x_return_status := fnd_api.g_ret_sts_error;
17093: END;
17094:
17162: FETCH c_unique_financial_number_rec INTO l_dummy;
17163:
17164: -- combination key is not unique, push an error onto the stack.
17165: IF NVL(c_unique_financial_number_rec%FOUND, FALSE) THEN
17166: fnd_message.set_name('AR', 'HZ_API_DUP_FIN_NUMBER_REC');
17167: fnd_msg_pub.add;
17168: x_return_status := fnd_api.g_ret_sts_error;
17169: END IF;
17170: CLOSE c_unique_financial_number_rec;
17527: FETCH c_dup_credit_rating_id INTO l_dummy;
17528:
17529: -- key is not unique, push an error onto the stack.
17530: IF NVL(c_dup_credit_rating_id%FOUND, FALSE) THEN
17531: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
17532: fnd_message.set_token('COLUMN', 'credit_rating_id');
17533: fnd_msg_pub.add;
17534: x_return_status := fnd_api.g_ret_sts_error;
17535: END IF;
17528:
17529: -- key is not unique, push an error onto the stack.
17530: IF NVL(c_dup_credit_rating_id%FOUND, FALSE) THEN
17531: fnd_message.set_name('AR', 'HZ_API_DUPLICATE_COLUMN');
17532: fnd_message.set_token('COLUMN', 'credit_rating_id');
17533: fnd_msg_pub.add;
17534: x_return_status := fnd_api.g_ret_sts_error;
17535: END IF;
17536: CLOSE c_dup_credit_rating_id;
17626: WHERE p.party_id = p_credit_rating_rec.party_id;
17627:
17628: EXCEPTION
17629: WHEN NO_DATA_FOUND THEN
17630: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17631: fnd_message.set_token('FK', 'party_id');
17632: fnd_message.set_token('COLUMN', 'party_id');
17633: fnd_message.set_token('TABLE', 'hz_parties');
17634: fnd_msg_pub.add;
17627:
17628: EXCEPTION
17629: WHEN NO_DATA_FOUND THEN
17630: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17631: fnd_message.set_token('FK', 'party_id');
17632: fnd_message.set_token('COLUMN', 'party_id');
17633: fnd_message.set_token('TABLE', 'hz_parties');
17634: fnd_msg_pub.add;
17635: x_return_status := fnd_api.g_ret_sts_error;
17628: EXCEPTION
17629: WHEN NO_DATA_FOUND THEN
17630: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17631: fnd_message.set_token('FK', 'party_id');
17632: fnd_message.set_token('COLUMN', 'party_id');
17633: fnd_message.set_token('TABLE', 'hz_parties');
17634: fnd_msg_pub.add;
17635: x_return_status := fnd_api.g_ret_sts_error;
17636: END;
17629: WHEN NO_DATA_FOUND THEN
17630: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
17631: fnd_message.set_token('FK', 'party_id');
17632: fnd_message.set_token('COLUMN', 'party_id');
17633: fnd_message.set_token('TABLE', 'hz_parties');
17634: fnd_msg_pub.add;
17635: x_return_status := fnd_api.g_ret_sts_error;
17636: END;
17637:
17689: | FETCH c_unique_credit_rating_rec INTO l_dummy;
17690: |
17691: | -- combination key is not unique, push an error onto the stack.
17692: | IF NVL(c_unique_credit_rating_rec%FOUND, FALSE) THEN
17693: | fnd_message.set_name('AR', 'HZ_API_DUP_CREDIT_RATING_REC');
17694: | fnd_msg_pub.add;
17695: | x_return_status := fnd_api.g_ret_sts_error;
17696: | END IF;
17697: | CLOSE c_unique_credit_rating_rec;
18450: AND trunc(sysdate) between trunc(nvl(start_date_active,sysdate))
18451: and trunc(nvl(end_date_active,sysdate));
18452: EXCEPTION
18453: WHEN NO_DATA_FOUND THEN
18454: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
18455: fnd_message.set_token('FK', 'currency_code');
18456: fnd_message.set_token('COLUMN', 'maximum_credit_currency_code');
18457: fnd_message.set_token('TABLE', 'fnd_currencies');
18458: fnd_msg_pub.add;
18451: and trunc(nvl(end_date_active,sysdate));
18452: EXCEPTION
18453: WHEN NO_DATA_FOUND THEN
18454: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
18455: fnd_message.set_token('FK', 'currency_code');
18456: fnd_message.set_token('COLUMN', 'maximum_credit_currency_code');
18457: fnd_message.set_token('TABLE', 'fnd_currencies');
18458: fnd_msg_pub.add;
18459: x_return_status := fnd_api.g_ret_sts_error;
18452: EXCEPTION
18453: WHEN NO_DATA_FOUND THEN
18454: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
18455: fnd_message.set_token('FK', 'currency_code');
18456: fnd_message.set_token('COLUMN', 'maximum_credit_currency_code');
18457: fnd_message.set_token('TABLE', 'fnd_currencies');
18458: fnd_msg_pub.add;
18459: x_return_status := fnd_api.g_ret_sts_error;
18460: END;
18453: WHEN NO_DATA_FOUND THEN
18454: fnd_message.set_name('AR', 'HZ_API_INVALID_FK');
18455: fnd_message.set_token('FK', 'currency_code');
18456: fnd_message.set_token('COLUMN', 'maximum_credit_currency_code');
18457: fnd_message.set_token('TABLE', 'fnd_currencies');
18458: fnd_msg_pub.add;
18459: x_return_status := fnd_api.g_ret_sts_error;
18460: END;
18461:
18539: THEN
18540: IF p_credit_rating_rec.credit_score_natl_percentile < 0 OR
18541: p_credit_rating_rec.credit_score_natl_percentile > 100
18542: THEN
18543: FND_MESSAGE.SET_NAME('AR', 'HZ_API_INVALID_PERCENTAGE');
18544: FND_MESSAGE.SET_TOKEN('INVALIDVAL', p_credit_rating_rec.credit_score_natl_percentile);
18545: FND_MESSAGE.SET_TOKEN('ATTRIBUTE', 'credit_score_natl_percentile');
18546: FND_MSG_PUB.ADD;
18547: x_return_status := fnd_api.g_ret_sts_error;
18540: IF p_credit_rating_rec.credit_score_natl_percentile < 0 OR
18541: p_credit_rating_rec.credit_score_natl_percentile > 100
18542: THEN
18543: FND_MESSAGE.SET_NAME('AR', 'HZ_API_INVALID_PERCENTAGE');
18544: FND_MESSAGE.SET_TOKEN('INVALIDVAL', p_credit_rating_rec.credit_score_natl_percentile);
18545: FND_MESSAGE.SET_TOKEN('ATTRIBUTE', 'credit_score_natl_percentile');
18546: FND_MSG_PUB.ADD;
18547: x_return_status := fnd_api.g_ret_sts_error;
18548: END IF;
18541: p_credit_rating_rec.credit_score_natl_percentile > 100
18542: THEN
18543: FND_MESSAGE.SET_NAME('AR', 'HZ_API_INVALID_PERCENTAGE');
18544: FND_MESSAGE.SET_TOKEN('INVALIDVAL', p_credit_rating_rec.credit_score_natl_percentile);
18545: FND_MESSAGE.SET_TOKEN('ATTRIBUTE', 'credit_score_natl_percentile');
18546: FND_MSG_PUB.ADD;
18547: x_return_status := fnd_api.g_ret_sts_error;
18548: END IF;
18549: END IF;
18565: THEN
18566: IF p_credit_rating_rec.failure_score_natnl_percentile < 0 OR
18567: p_credit_rating_rec.failure_score_natnl_percentile > 100
18568: THEN
18569: FND_MESSAGE.SET_NAME('AR', 'HZ_API_INVALID_PERCENTAGE');
18570: FND_MESSAGE.SET_TOKEN('INVALIDVAL', p_credit_rating_rec.failure_score_natnl_percentile);
18571: FND_MESSAGE.SET_TOKEN('ATTRIBUTE', 'failure_score_natnl_percentile');
18572: FND_MSG_PUB.ADD;
18573: x_return_status := fnd_api.g_ret_sts_error;
18566: IF p_credit_rating_rec.failure_score_natnl_percentile < 0 OR
18567: p_credit_rating_rec.failure_score_natnl_percentile > 100
18568: THEN
18569: FND_MESSAGE.SET_NAME('AR', 'HZ_API_INVALID_PERCENTAGE');
18570: FND_MESSAGE.SET_TOKEN('INVALIDVAL', p_credit_rating_rec.failure_score_natnl_percentile);
18571: FND_MESSAGE.SET_TOKEN('ATTRIBUTE', 'failure_score_natnl_percentile');
18572: FND_MSG_PUB.ADD;
18573: x_return_status := fnd_api.g_ret_sts_error;
18574: END IF;
18567: p_credit_rating_rec.failure_score_natnl_percentile > 100
18568: THEN
18569: FND_MESSAGE.SET_NAME('AR', 'HZ_API_INVALID_PERCENTAGE');
18570: FND_MESSAGE.SET_TOKEN('INVALIDVAL', p_credit_rating_rec.failure_score_natnl_percentile);
18571: FND_MESSAGE.SET_TOKEN('ATTRIBUTE', 'failure_score_natnl_percentile');
18572: FND_MSG_PUB.ADD;
18573: x_return_status := fnd_api.g_ret_sts_error;
18574: END IF;
18575: END IF;