109:
110: -- Debug Message
111: IF (PV_DEBUG_HIGH_ON) THEN
112:
113: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - start');
114: END IF;
115:
116:
117: -- Initialize API return status to SUCCESS
122: IF (PV_DEBUG_HIGH_ON) THEN
123:
124:
125:
126: PVX_Utility_PVT.debug_message(l_full_name ||': validate');
127:
128: END IF;
129:
130: IF FND_GLOBAL.User_Id IS NULL THEN
153:
154: -- Debug message
155: IF (PV_DEBUG_HIGH_ON) THEN
156:
157: PVX_UTILITY_PVT.debug_message('Private API: ' || l_full_name || ' - program_contracts_id = '|| l_prgm_contracts_rec.program_contracts_id);
158: END IF;
159:
160: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
161: -- Debug message
160: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
161: -- Debug message
162: IF (PV_DEBUG_HIGH_ON) THEN
163:
164: PVX_UTILITY_PVT.debug_message('Private API: ' || l_full_name || ' - Validate_Prgm_Contracts');
165: END IF;
166:
167: -- Populate the default required items
168: l_prgm_contracts_rec.last_update_date := SYSDATE;
185: );
186: -- Debug message
187: IF (PV_DEBUG_HIGH_ON) THEN
188:
189: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - Validate_Prgm_Contracts return_status = ' || x_return_status );
190: END IF;
191:
192: END IF;
193:
203:
204: -- Debug Message
205: IF (PV_DEBUG_HIGH_ON) THEN
206:
207: PVX_UTILITY_PVT.debug_message( 'Private API:' || l_full_name || ' - Calling create table handler');
208: END IF;
209:
210: -- Invoke table handler(PV_PRGM_CONTRACTS_PKG.Insert_Row)
211: PV_PRGM_CONTRACTS_PKG.Insert_Row(
239:
240: -- Debug Message
241: IF (PV_DEBUG_HIGH_ON) THEN
242:
243: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - end');
244: END IF;
245:
246: -- Standard check for p_commit
247: IF FND_API.to_Boolean( p_commit ) THEN
355:
356: -- Debug Message
357: IF (PV_DEBUG_HIGH_ON) THEN
358:
359: PVX_UTILITY_PVT.debug_message('Private API: '||l_full_name||' - Close Cursor');
360: END IF;
361: CLOSE c_get_Prgm_Contracts;
362:
363: IF (l_tar_prgm_contracts_rec.object_version_number IS NULL OR
380: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
381: -- Debug message
382: IF (PV_DEBUG_HIGH_ON) THEN
383:
384: PVX_UTILITY_PVT.debug_message('Private API: '||l_full_name||' - Validate_Prgm_Contracts');
385: END IF;
386:
387: -- Invoke validation procedures
388: Validate_Prgm_Contracts(
411:
412: -- Debug Message
413: IF (PV_DEBUG_HIGH_ON) THEN
414:
415: Pvx_Utility_Pvt.debug_message('Private API: '||l_full_name||' - Calling update table handler');
416: END IF;
417:
418: -- Invoke table handler(PV_PRGM_CONTRACTS_PKG.Update_Row)
419: PV_PRGM_CONTRACTS_PKG.Update_Row(
430:
431: -- Debug Message
432: IF (PV_DEBUG_HIGH_ON) THEN
433:
434: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - end');
435: END IF;
436:
437: -- Check for commit
438: IF FND_API.to_boolean(p_commit) THEN
511:
512: -- Debug Message
513: IF (PV_DEBUG_HIGH_ON) THEN
514:
515: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - start');
516: END IF;
517:
518: -- Standard call to check for call compatibility.
519: IF NOT FND_API.Compatible_API_Call (l_api_version_number
536:
537: -- Debug Message
538: IF (PV_DEBUG_HIGH_ON) THEN
539:
540: PVX_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
541: END IF;
542:
543: -- Invoke table handler(PV_PRGM_CONTRACTS_PKG.Delete_Row)
544: PV_PRGM_CONTRACTS_PKG.Delete_Row(
559:
560: -- Debug Message
561: IF (PV_DEBUG_HIGH_ON) THEN
562:
563: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - end');
564: END IF;
565:
566: EXCEPTION
567: WHEN Fnd_Api.G_EXC_ERROR THEN
630:
631: -- Debug Message
632: IF (PV_DEBUG_HIGH_ON) THEN
633:
634: Pvx_Utility_Pvt.debug_message('Private API: ' || l_full_name || ' - start');
635: END IF;
636:
637: -- Initialize message list if p_init_msg_list is set to TRUE.
638: IF Fnd_Api.to_Boolean( p_init_msg_list )
661: IF (PV_DEBUG_HIGH_ON) THEN
662:
663:
664:
665: Pvx_Utility_Pvt.debug_message(l_full_name||': start');
666:
667: END IF;
668: OPEN c_Prgm_Contracts;
669:
689:
690: -- Debug Message
691: IF (PV_DEBUG_HIGH_ON) THEN
692:
693: PVX_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' - end');
694: END IF;
695:
696: EXCEPTION
697: /*
694: END IF;
695:
696: EXCEPTION
697: /*
698: WHEN PVX_Utility_PVT.resource_locked THEN
699: x_return_status := FND_API.g_ret_sts_error;
700: PVX_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
701: */
702: WHEN Fnd_Api.G_EXC_ERROR THEN
696: EXCEPTION
697: /*
698: WHEN PVX_Utility_PVT.resource_locked THEN
699: x_return_status := FND_API.g_ret_sts_error;
700: PVX_Utility_PVT.Error_Message(p_message_name => 'AMS_API_RESOURCE_LOCKED');
701: */
702: WHEN Fnd_Api.G_EXC_ERROR THEN
703: ROLLBACK TO LOCK_Prgm_Contracts_PVT;
704: x_return_status := Fnd_Api.G_RET_STS_ERROR;
768:
769: x_return_status := FND_API.g_ret_sts_success;
770: IF p_validation_mode = JTF_PLSQL_API.g_create THEN
771:
772: l_valid_flag := PVX_UTILITY_PVT.check_uniqueness(
773: 'PV_PROGRAM_CONTRACTS'
774: ,'PROGRAM_CONTRACTS_ID = ''' || p_prgm_contracts_rec.program_contracts_id ||''''
775: );
776:
786:
787: -- Debug message
788: IF (PV_DEBUG_HIGH_ON) THEN
789:
790: PVX_UTILITY_PVT.debug_message('- In Check_UK_Items API Before PROGRAM_ID/GEO_HIERARCHY_ID combo check' );
791: END IF;
792:
793: l_valid_flag := PVX_UTILITY_PVT.check_uniqueness(
794: 'PV_PROGRAM_CONTRACTS'
789:
790: PVX_UTILITY_PVT.debug_message('- In Check_UK_Items API Before PROGRAM_ID/GEO_HIERARCHY_ID combo check' );
791: END IF;
792:
793: l_valid_flag := PVX_UTILITY_PVT.check_uniqueness(
794: 'PV_PROGRAM_CONTRACTS'
795: ,'PROGRAM_ID = ''' || p_prgm_contracts_rec.PROGRAM_ID ||''' AND GEO_HIERARCHY_ID = ''' || p_prgm_contracts_rec.GEO_HIERARCHY_ID || ''' AND MEMBER_TYPE_CODE = ''' || p_prgm_contracts_rec.member_type_code || ''''
796: );
797:
1000:
1001: -- Debug message
1002: IF (PV_DEBUG_HIGH_ON) THEN
1003:
1004: PVX_UTILITY_PVT.debug_message('- In Check_FK_Items : Before PROGRAM_ID fk check : PROGRAM_ID ' || p_prgm_contracts_rec.PROGRAM_ID);
1005: END IF;
1006:
1007: IF PVX_Utility_PVT.check_fk_exists(
1008: 'PV_PARTNER_PROGRAM_B', -- Parent schema object having the primary key
1003:
1004: PVX_UTILITY_PVT.debug_message('- In Check_FK_Items : Before PROGRAM_ID fk check : PROGRAM_ID ' || p_prgm_contracts_rec.PROGRAM_ID);
1005: END IF;
1006:
1007: IF PVX_Utility_PVT.check_fk_exists(
1008: 'PV_PARTNER_PROGRAM_B', -- Parent schema object having the primary key
1009: 'PROGRAM_ID', -- Column name in the parent object that maps to the fk value
1010: p_prgm_contracts_rec.PROGRAM_ID, -- Value of fk to be validated against the parent object's pk column
1011: PVX_UTILITY_PVT.g_number, -- datatype of fk
1007: IF PVX_Utility_PVT.check_fk_exists(
1008: 'PV_PARTNER_PROGRAM_B', -- Parent schema object having the primary key
1009: 'PROGRAM_ID', -- Column name in the parent object that maps to the fk value
1010: p_prgm_contracts_rec.PROGRAM_ID, -- Value of fk to be validated against the parent object's pk column
1011: PVX_UTILITY_PVT.g_number, -- datatype of fk
1012: NULL
1013: ) = FND_API.g_false
1014: THEN
1015: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1026: IF (PV_DEBUG_HIGH_ON) THEN
1027:
1028:
1029:
1030: PVX_UTILITY_PVT.debug_message('In Check_FK_Items : After program_id fk check ');
1031:
1032: END IF;
1033:
1034: ----------------------- GEO_HIERARCHY_ID ------------------------
1037:
1038: -- Debug message
1039: IF (PV_DEBUG_HIGH_ON) THEN
1040:
1041: PVX_UTILITY_PVT.debug_message('- In Check_FK_Items : Before GEO_HIERARCHY_ID fk check : GEO_HIERARCHY_ID ' || p_prgm_contracts_rec.GEO_HIERARCHY_ID);
1042: END IF;
1043:
1044: IF PVX_Utility_PVT.check_fk_exists(
1045: 'JTF_LOC_HIERARCHIES_VL', -- Parent schema object having the primary key
1040:
1041: PVX_UTILITY_PVT.debug_message('- In Check_FK_Items : Before GEO_HIERARCHY_ID fk check : GEO_HIERARCHY_ID ' || p_prgm_contracts_rec.GEO_HIERARCHY_ID);
1042: END IF;
1043:
1044: IF PVX_Utility_PVT.check_fk_exists(
1045: 'JTF_LOC_HIERARCHIES_VL', -- Parent schema object having the primary key
1046: 'LOCATION_HIERARCHY_ID', -- Column name in the parent object that maps to the fk value
1047: p_prgm_contracts_rec.GEO_HIERARCHY_ID, -- Value of fk to be validated against the parent object's pk column
1048: PVX_UTILITY_PVT.g_number, -- datatype of fk
1044: IF PVX_Utility_PVT.check_fk_exists(
1045: 'JTF_LOC_HIERARCHIES_VL', -- Parent schema object having the primary key
1046: 'LOCATION_HIERARCHY_ID', -- Column name in the parent object that maps to the fk value
1047: p_prgm_contracts_rec.GEO_HIERARCHY_ID, -- Value of fk to be validated against the parent object's pk column
1048: PVX_UTILITY_PVT.g_number, -- datatype of fk
1049: NULL
1050: ) = FND_API.g_false
1051: THEN
1052: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1066:
1067: -- Debug message
1068: IF (PV_DEBUG_HIGH_ON) THEN
1069:
1070: PVX_UTILITY_PVT.debug_message('- In Check_FK_Items : Before CONTRACT_ID fk check : CONTRACT_ID ' || p_prgm_contracts_rec.CONTRACT_ID);
1071: END IF;
1072:
1073: IF PVX_Utility_PVT.check_fk_exists(
1074: 'OKC_TERMS_TEMPLATES_ALL', -- Parent schema object having the primary key
1069:
1070: PVX_UTILITY_PVT.debug_message('- In Check_FK_Items : Before CONTRACT_ID fk check : CONTRACT_ID ' || p_prgm_contracts_rec.CONTRACT_ID);
1071: END IF;
1072:
1073: IF PVX_Utility_PVT.check_fk_exists(
1074: 'OKC_TERMS_TEMPLATES_ALL', -- Parent schema object having the primary key
1075: 'TEMPLATE_ID', -- Column name in the parent object that maps to the fk value
1076: p_prgm_contracts_rec.CONTRACT_ID, -- Value of fk to be validated against the parent object's pk column
1077: PVX_UTILITY_PVT.g_number, -- datatype of fk
1073: IF PVX_Utility_PVT.check_fk_exists(
1074: 'OKC_TERMS_TEMPLATES_ALL', -- Parent schema object having the primary key
1075: 'TEMPLATE_ID', -- Column name in the parent object that maps to the fk value
1076: p_prgm_contracts_rec.CONTRACT_ID, -- Value of fk to be validated against the parent object's pk column
1077: PVX_UTILITY_PVT.g_number, -- datatype of fk
1078: NULL
1079: ) = FND_API.g_false
1080: THEN
1081: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1124:
1125: -- Debug message
1126: IF (PV_DEBUG_HIGH_ON) THEN
1127:
1128: PVX_UTILITY_PVT.debug_message('- Check_Items API prior to Check_Req_Items call');
1129: END IF;
1130:
1131: -- Check Items Required/NOT NULL API calls
1132: Check_Req_Items(
1137:
1138: -- Debug message
1139: IF (PV_DEBUG_HIGH_ON) THEN
1140:
1141: PVX_UTILITY_PVT.debug_message('- After Check_Req_Items. return status = ' || x_return_status);
1142: END IF;
1143:
1144: IF x_return_status <> FND_API.g_ret_sts_success THEN
1145: RETURN;
1147:
1148: -- Debug message
1149: IF (PV_DEBUG_HIGH_ON) THEN
1150:
1151: PVX_UTILITY_PVT.debug_message('- Check_Items API prior to Check_UK_Items call');
1152: END IF;
1153:
1154: -- Check Items Uniqueness API calls
1155: Check_UK_Items(
1160:
1161: -- Debug message
1162: IF (PV_DEBUG_HIGH_ON) THEN
1163:
1164: PVX_UTILITY_PVT.debug_message('- After Check_UK_Items. return status = ' || x_return_status);
1165: END IF;
1166:
1167: IF x_return_status <> FND_API.g_ret_sts_success THEN
1168: RETURN;
1170:
1171: -- Debug message
1172: IF (PV_DEBUG_HIGH_ON) THEN
1173:
1174: PVX_UTILITY_PVT.debug_message('- Check_Items API prior to Check_FK_Items call');
1175: END IF;
1176:
1177: -- Check Items Foreign Keys API calls
1178: Check_FK_Items(
1182:
1183: -- Debug message
1184: IF (PV_DEBUG_HIGH_ON) THEN
1185:
1186: PVX_UTILITY_PVT.debug_message('- After Check_FK_Items. return status = ' || x_return_status);
1187: END IF;
1188:
1189: IF x_return_status <> FND_API.g_ret_sts_success THEN
1190: RETURN;
1192:
1193: -- Debug message
1194: IF (PV_DEBUG_HIGH_ON) THEN
1195:
1196: PVX_UTILITY_PVT.debug_message('- Check_Items API prior to Check_Lookup_Items call');
1197: END IF;
1198:
1199: -- Check Items Lookups
1200: Check_Lookup_Items(
1232:
1233: -- Debug message
1234: IF (PV_DEBUG_HIGH_ON) THEN
1235:
1236: PVX_UTILITY_PVT.debug_message('- In Complete_Rec API prior to assigning program_id');
1237: END IF;
1238:
1239: -- program_contracts_id
1240: --IF p_prgm_contracts_rec.program_contracts_id = Fnd_Api.g_miss_num THEN
1349:
1350: -- Debug Message
1351: IF (PV_DEBUG_HIGH_ON) THEN
1352:
1353: PVX_UTILITY_PVT.debug_message(' Private API: ' || l_full_name || ' - start');
1354: END IF;
1355:
1356: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1357: -- Debug message
1356: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1357: -- Debug message
1358: IF (PV_DEBUG_HIGH_ON) THEN
1359:
1360: PVX_UTILITY_PVT.debug_message(' Private API: ' || l_full_name || ' - prior to Check_Items call');
1361: END IF;
1362:
1363: Check_Items(
1364: p_prgm_contracts_rec => p_prgm_contracts_rec
1368:
1369: -- Debug message
1370: IF (PV_DEBUG_HIGH_ON) THEN
1371:
1372: PVX_UTILITY_PVT.debug_message(' Private API: ' || l_full_name || ' - return status after Check_Items call ' || x_return_status);
1373: END IF;
1374:
1375: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1376: RAISE FND_API.G_EXC_ERROR;
1399:
1400: -- Debug Message
1401: IF (PV_DEBUG_HIGH_ON) THEN
1402:
1403: PVX_UTILITY_PVT.debug_message('Private API: ' || l_full_name || ' - end');
1404: END IF;
1405:
1406: -- Standard call to get message count and if count is 1, get message info.
1407: FND_MSG_PUB.Count_And_Get
1479:
1480: -- Debug Message
1481: IF (PV_DEBUG_HIGH_ON) THEN
1482:
1483: Pvx_Utility_Pvt.debug_message('Private API: Validate_dm_model_rec');
1484: END IF;
1485:
1486: -- Standard call to get message count and if count is 1, get message info.
1487: Fnd_Msg_Pub.Count_And_Get(