5: G_FILE_NAME CONSTANT VARCHAR2(12) := 'csivctub.pls';
6:
7: FUNCTION G_MISS_NUM RETURN NUMBER IS
8: BEGIN
9: RETURN FND_API.G_MISS_NUM ;
10: END G_MISS_NUM ;
11:
12:
13: FUNCTION G_MISS_CHAR RETURN VARCHAR2 IS
11:
12:
13: FUNCTION G_MISS_CHAR RETURN VARCHAR2 IS
14: BEGIN
15: RETURN FND_API.G_MISS_CHAR ;
16: END G_MISS_CHAR ;
17:
18:
19: FUNCTION G_MISS_DATE RETURN DATE IS
17:
18:
19: FUNCTION G_MISS_DATE RETURN DATE IS
20: BEGIN
21: RETURN FND_API.G_MISS_DATE ;
22: END G_MISS_DATE ;
23:
24:
25: PROCEDURE read_debug_profiles IS
95: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_PATH');
96: FND_MSG_PUB.ADD;
97:
98: IF (g_stop_on_debug_error = 'Y') THEN
99: RAISE FND_API.G_EXC_ERROR;
100: END IF;
101:
102: WHEN UTL_FILE.INVALID_MODE THEN
103: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_MODE');
102: WHEN UTL_FILE.INVALID_MODE THEN
103: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_MODE');
104: FND_MSG_PUB.ADD;
105: IF (g_stop_on_debug_error = 'Y') THEN
106: RAISE FND_API.G_EXC_ERROR;
107: END IF;
108:
109: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
110: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_FILEHANDLE');
109: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
110: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_FILEHANDLE');
111: FND_MSG_PUB.ADD;
112: IF (g_stop_on_debug_error = 'Y') THEN
113: RAISE FND_API.G_EXC_ERROR;
114: END IF;
115:
116: WHEN UTL_FILE.INVALID_OPERATION THEN
117: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_OPERATION');
116: WHEN UTL_FILE.INVALID_OPERATION THEN
117: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_INVALID_OPERATION');
118: FND_MSG_PUB.ADD;
119: IF (g_stop_on_debug_error = 'Y') THEN
120: RAISE FND_API.G_EXC_ERROR;
121: END IF;
122:
123: WHEN UTL_FILE.WRITE_ERROR THEN
124: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_WRITE_ERROR');
123: WHEN UTL_FILE.WRITE_ERROR THEN
124: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_WRITE_ERROR');
125: FND_MSG_PUB.ADD;
126: IF (g_stop_on_debug_error = 'Y') THEN
127: RAISE FND_API.G_EXC_ERROR;
128: END IF;
129:
130: WHEN OTHERS THEN
131: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_PUT_LINE_ERROR');
130: WHEN OTHERS THEN
131: FND_MESSAGE.Set_Name('CSI', 'CSI_CTR_API_PUT_LINE_ERROR');
132: FND_MSG_PUB.ADD;
133: IF (g_stop_on_debug_error = 'Y') THEN
134: RAISE FND_API.G_EXC_ERROR;
135: END IF;
136: END put_line;
137:
138: Procedure ExitWithErrMsg
165: END IF;
166: --
167:
168: FND_MSG_PUB.Add;
169: RAISE FND_API.G_EXC_ERROR;
170: END ExitWithErrMsg;
171:
172: PROCEDURE Initialize_Desc_Flex
173: ( p_desc_flex IN OUT NOCOPY csi_ctr_datastructures_pub.dff_rec_type
173: ( p_desc_flex IN OUT NOCOPY csi_ctr_datastructures_pub.dff_rec_type
174: ) IS
175:
176: BEGIN
177: IF p_desc_flex.attribute_category = FND_API.G_MISS_CHAR THEN
178: p_desc_flex.attribute_category := NULL;
179: ELSE
180: p_desc_flex.attribute_category := p_desc_flex.attribute_category;
181: END IF;
179: ELSE
180: p_desc_flex.attribute_category := p_desc_flex.attribute_category;
181: END IF;
182:
183: IF p_desc_flex.attribute1 = FND_API.G_MISS_CHAR THEN
184: p_desc_flex.attribute1 := NULL;
185: ELSE
186: p_desc_flex.attribute1 := p_desc_flex.attribute1;
187: END IF;
185: ELSE
186: p_desc_flex.attribute1 := p_desc_flex.attribute1;
187: END IF;
188:
189: IF p_desc_flex.attribute2 = FND_API.G_MISS_CHAR THEN
190: p_desc_flex.attribute2 := NULL;
191: ELSE
192: p_desc_flex.attribute2 := p_desc_flex.attribute2;
193: END IF;
191: ELSE
192: p_desc_flex.attribute2 := p_desc_flex.attribute2;
193: END IF;
194:
195: IF p_desc_flex.attribute3 = FND_API.G_MISS_CHAR THEN
196: p_desc_flex.attribute3 := NULL;
197: ELSE
198: p_desc_flex.attribute3 := p_desc_flex.attribute3;
199: END IF;
197: ELSE
198: p_desc_flex.attribute3 := p_desc_flex.attribute3;
199: END IF;
200:
201: IF p_desc_flex.attribute4 = FND_API.G_MISS_CHAR THEN
202: p_desc_flex.attribute4 := NULL;
203: ELSE
204: p_desc_flex.attribute4 := p_desc_flex.attribute4;
205: END IF;
203: ELSE
204: p_desc_flex.attribute4 := p_desc_flex.attribute4;
205: END IF;
206:
207: IF p_desc_flex.attribute5 = FND_API.G_MISS_CHAR THEN
208: p_desc_flex.attribute5 := NULL;
209: ELSE
210: p_desc_flex.attribute5 := p_desc_flex.attribute5;
211: END IF;
209: ELSE
210: p_desc_flex.attribute5 := p_desc_flex.attribute5;
211: END IF;
212:
213: IF p_desc_flex.attribute6 = FND_API.G_MISS_CHAR THEN
214: p_desc_flex.attribute6 := NULL;
215: ELSE
216: p_desc_flex.attribute6 := p_desc_flex.attribute6;
217: END IF;
215: ELSE
216: p_desc_flex.attribute6 := p_desc_flex.attribute6;
217: END IF;
218:
219: IF p_desc_flex.attribute7 = FND_API.G_MISS_CHAR THEN
220: p_desc_flex.attribute7 := NULL;
221: ELSE
222: p_desc_flex.attribute7 := p_desc_flex.attribute7;
223: END IF;
221: ELSE
222: p_desc_flex.attribute7 := p_desc_flex.attribute7;
223: END IF;
224:
225: IF p_desc_flex.attribute8 = FND_API.G_MISS_CHAR THEN
226: p_desc_flex.attribute8 := NULL;
227: ELSE
228: p_desc_flex.attribute8 := p_desc_flex.attribute8;
229: END IF;
227: ELSE
228: p_desc_flex.attribute8 := p_desc_flex.attribute8;
229: END IF;
230:
231: IF p_desc_flex.attribute9 = FND_API.G_MISS_CHAR THEN
232: p_desc_flex.attribute9 := NULL;
233: ELSE
234: p_desc_flex.attribute9 := p_desc_flex.attribute9;
235: END IF;
233: ELSE
234: p_desc_flex.attribute9 := p_desc_flex.attribute9;
235: END IF;
236:
237: IF p_desc_flex.attribute10 = FND_API.G_MISS_CHAR THEN
238: p_desc_flex.attribute10 := NULL;
239: ELSE
240: p_desc_flex.attribute10 := p_desc_flex.attribute10;
241: END IF;
239: ELSE
240: p_desc_flex.attribute10 := p_desc_flex.attribute10;
241: END IF;
242:
243: IF p_desc_flex.attribute11 = FND_API.G_MISS_CHAR THEN
244: p_desc_flex.attribute11 := NULL;
245: ELSE
246: p_desc_flex.attribute11 := p_desc_flex.attribute11;
247: END IF;
245: ELSE
246: p_desc_flex.attribute11 := p_desc_flex.attribute11;
247: END IF;
248:
249: IF p_desc_flex.attribute12 = FND_API.G_MISS_CHAR THEN
250: p_desc_flex.attribute12 := NULL;
251: ELSE
252: p_desc_flex.attribute12 := p_desc_flex.attribute12;
253: END IF;
251: ELSE
252: p_desc_flex.attribute12 := p_desc_flex.attribute12;
253: END IF;
254:
255: IF p_desc_flex.attribute13 = FND_API.G_MISS_CHAR THEN
256: p_desc_flex.attribute13 := NULL;
257: ELSE
258: p_desc_flex.attribute13 := p_desc_flex.attribute13;
259: END IF;
257: ELSE
258: p_desc_flex.attribute13 := p_desc_flex.attribute13;
259: END IF;
260:
261: IF p_desc_flex.attribute14 = FND_API.G_MISS_CHAR THEN
262: p_desc_flex.attribute14 := NULL;
263: ELSE
264: p_desc_flex.attribute14 := p_desc_flex.attribute14;
265: END IF;
263: ELSE
264: p_desc_flex.attribute14 := p_desc_flex.attribute14;
265: END IF;
266:
267: IF p_desc_flex.attribute15 = FND_API.G_MISS_CHAR THEN
268: p_desc_flex.attribute15 := NULL;
269: ELSE
270: p_desc_flex.attribute15 := p_desc_flex.attribute15;
271: END IF;
269: ELSE
270: p_desc_flex.attribute15 := p_desc_flex.attribute15;
271: END IF;
272:
273: IF p_desc_flex.attribute16 = FND_API.G_MISS_CHAR THEN
274: p_desc_flex.attribute16 := NULL;
275: ELSE
276: p_desc_flex.attribute16 := p_desc_flex.attribute16;
277: END IF;
275: ELSE
276: p_desc_flex.attribute16 := p_desc_flex.attribute16;
277: END IF;
278:
279: IF p_desc_flex.attribute17 = FND_API.G_MISS_CHAR THEN
280: p_desc_flex.attribute17 := NULL;
281: ELSE
282: p_desc_flex.attribute17 := p_desc_flex.attribute17;
283: END IF;
281: ELSE
282: p_desc_flex.attribute17 := p_desc_flex.attribute17;
283: END IF;
284:
285: IF p_desc_flex.attribute18 = FND_API.G_MISS_CHAR THEN
286: p_desc_flex.attribute18 := NULL;
287: ELSE
288: p_desc_flex.attribute18 := p_desc_flex.attribute18;
289: END IF;
287: ELSE
288: p_desc_flex.attribute18 := p_desc_flex.attribute18;
289: END IF;
290:
291: IF p_desc_flex.attribute19 = FND_API.G_MISS_CHAR THEN
292: p_desc_flex.attribute19 := NULL;
293: ELSE
294: p_desc_flex.attribute19 := p_desc_flex.attribute19;
295: END IF;
293: ELSE
294: p_desc_flex.attribute19 := p_desc_flex.attribute19;
295: END IF;
296:
297: IF p_desc_flex.attribute20 = FND_API.G_MISS_CHAR THEN
298: p_desc_flex.attribute20 := NULL;
299: ELSE
300: p_desc_flex.attribute20 := p_desc_flex.attribute20;
301: END IF;
299: ELSE
300: p_desc_flex.attribute20 := p_desc_flex.attribute20;
301: END IF;
302:
303: IF p_desc_flex.attribute21 = FND_API.G_MISS_CHAR THEN
304: p_desc_flex.attribute21 := NULL;
305: ELSE
306: p_desc_flex.attribute21 := p_desc_flex.attribute21;
307: END IF;
305: ELSE
306: p_desc_flex.attribute21 := p_desc_flex.attribute21;
307: END IF;
308:
309: IF p_desc_flex.attribute22 = FND_API.G_MISS_CHAR THEN
310: p_desc_flex.attribute22 := NULL;
311: ELSE
312: p_desc_flex.attribute22 := p_desc_flex.attribute22;
313: END IF;
311: ELSE
312: p_desc_flex.attribute22 := p_desc_flex.attribute22;
313: END IF;
314:
315: IF p_desc_flex.attribute23 = FND_API.G_MISS_CHAR THEN
316: p_desc_flex.attribute23 := NULL;
317: ELSE
318: p_desc_flex.attribute23 := p_desc_flex.attribute23;
319: END IF;
317: ELSE
318: p_desc_flex.attribute23 := p_desc_flex.attribute23;
319: END IF;
320:
321: IF p_desc_flex.attribute24 = FND_API.G_MISS_CHAR THEN
322: p_desc_flex.attribute24 := NULL;
323: ELSE
324: p_desc_flex.attribute24 := p_desc_flex.attribute24;
325: END IF;
323: ELSE
324: p_desc_flex.attribute24 := p_desc_flex.attribute24;
325: END IF;
326:
327: IF p_desc_flex.attribute25 = FND_API.G_MISS_CHAR THEN
328: p_desc_flex.attribute25 := NULL;
329: ELSE
330: p_desc_flex.attribute25 := p_desc_flex.attribute25;
331: END IF;
329: ELSE
330: p_desc_flex.attribute25 := p_desc_flex.attribute25;
331: END IF;
332:
333: IF p_desc_flex.attribute26 = FND_API.G_MISS_CHAR THEN
334: p_desc_flex.attribute26 := NULL;
335: ELSE
336: p_desc_flex.attribute26 := p_desc_flex.attribute26;
337: END IF;
335: ELSE
336: p_desc_flex.attribute26 := p_desc_flex.attribute26;
337: END IF;
338:
339: IF p_desc_flex.attribute27 = FND_API.G_MISS_CHAR THEN
340: p_desc_flex.attribute27 := NULL;
341: ELSE
342: p_desc_flex.attribute27 := p_desc_flex.attribute27;
343: END IF;
341: ELSE
342: p_desc_flex.attribute27 := p_desc_flex.attribute27;
343: END IF;
344:
345: IF p_desc_flex.attribute28 = FND_API.G_MISS_CHAR THEN
346: p_desc_flex.attribute28 := NULL;
347: ELSE
348: p_desc_flex.attribute28 := p_desc_flex.attribute28;
349: END IF;
347: ELSE
348: p_desc_flex.attribute28 := p_desc_flex.attribute28;
349: END IF;
350:
351: IF p_desc_flex.attribute29 = FND_API.G_MISS_CHAR THEN
352: p_desc_flex.attribute29 := NULL;
353: ELSE
354: p_desc_flex.attribute29 := p_desc_flex.attribute29;
355: END IF;
353: ELSE
354: p_desc_flex.attribute29 := p_desc_flex.attribute29;
355: END IF;
356:
357: IF p_desc_flex.attribute30 = FND_API.G_MISS_CHAR THEN
358: p_desc_flex.attribute30 := NULL;
359: ELSE
360: p_desc_flex.attribute30 := p_desc_flex.attribute30;
361: END IF;
482: l_resp_appl_id,
483: l_resp_id,
484: l_return_status );
485:
486: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
487: RAISE FND_API.G_EXC_ERROR;
488: end if;
489: END Is_DescFlex_Valid;
490:
483: l_resp_id,
484: l_return_status );
485:
486: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
487: RAISE FND_API.G_EXC_ERROR;
488: end if;
489: END Is_DescFlex_Valid;
490:
491: ------------------------------------------------------------------------------
563: x_return_status OUT NOCOPY VARCHAR2 ) IS
564:
565: l_error_message VARCHAR2(2000);
566: BEGIN
567: x_return_status := fnd_api.g_ret_sts_success;
568:
569: fnd_flex_descval.set_column_value(p_column_name1, p_column_value1);
570: fnd_flex_descval.set_column_value(p_column_name2, p_column_value2);
571: fnd_flex_descval.set_column_value(p_column_name3, p_column_value3);
604: resp_appl_id => p_resp_appl_id,
605: resp_id => p_resp_id ) THEN
606: l_error_message := fnd_flex_descval.error_message;
607: -- add_desc_flex_msg(p_api_name, l_error_message);
608: x_return_status := fnd_api.g_ret_sts_error;
609: END IF;
610: END Validate_Desc_Flex;
611:
612: PROCEDURE VALIDATE_FORMULA_CTR
611:
612: PROCEDURE VALIDATE_FORMULA_CTR
613: (
614: p_api_version IN NUMBER,
615: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
616: p_commit IN VARCHAR2 := FND_API.G_FALSE,
617: p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
618: x_return_status OUT NOCOPY VARCHAR2,
619: x_msg_count OUT NOCOPY NUMBER,
612: PROCEDURE VALIDATE_FORMULA_CTR
613: (
614: p_api_version IN NUMBER,
615: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
616: p_commit IN VARCHAR2 := FND_API.G_FALSE,
617: p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
618: x_return_status OUT NOCOPY VARCHAR2,
619: x_msg_count OUT NOCOPY NUMBER,
620: x_msg_data OUT NOCOPY VARCHAR2,
613: (
614: p_api_version IN NUMBER,
615: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
616: p_commit IN VARCHAR2 := FND_API.G_FALSE,
617: p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
618: x_return_status OUT NOCOPY VARCHAR2,
619: x_msg_count OUT NOCOPY NUMBER,
620: x_msg_data OUT NOCOPY VARCHAR2,
621: p_counter_id IN NUMBER,
643: -- Standard Start of API savepoint
644: SAVEPOINT VALIDATE_FORMULA;
645:
646: -- Standard call to check for call compatibility.
647: IF NOT FND_API.Compatible_API_Call (l_api_version,
648: p_api_version,
649: l_api_name,
650: G_PKG_NAME)
651: THEN
648: p_api_version,
649: l_api_name,
650: G_PKG_NAME)
651: THEN
652: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
653: END IF;
654:
655: -- Initialize message list if p_init_msg_list is set to TRUE.
656: IF FND_API.to_Boolean( p_init_msg_list )
652: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
653: END IF;
654:
655: -- Initialize message list if p_init_msg_list is set to TRUE.
656: IF FND_API.to_Boolean( p_init_msg_list )
657: THEN
658: FND_MSG_PUB.initialize;
659: END IF;
660:
658: FND_MSG_PUB.initialize;
659: END IF;
660:
661: -- Initialize API return status to SUCCESS
662: x_return_status := FND_API.G_RET_STS_SUCCESS;
663:
664: -- API body
665:
666: -- ******************************************************************
666: -- ******************************************************************
667: -- Validate Environment
668: -- ******************************************************************
669:
670: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL)
671: THEN
672: -- Debug message
673: -- Invoke validation procedures
674: null;
674: null;
675: END IF;
676:
677: --Validate counter group id only when validation level is not none
678: IF ( p_validation_level > FND_API.G_VALID_LEVEL_NONE)
679: THEN
680: null;
681: END IF;
682:
679: THEN
680: null;
681: END IF;
682:
683: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
684: RAISE FND_API.G_EXC_ERROR;
685: END IF;
686:
687: --Parameter Validations and initialization
680: null;
681: END IF;
682:
683: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
684: RAISE FND_API.G_EXC_ERROR;
685: END IF;
686:
687: --Parameter Validations and initialization
688:
739: else
740: x_valid_flag := 'N';
741: end if;
742: END;
743: x_return_status := FND_API.G_RET_STS_SUCCESS;
744: --
745: -- End of API body
746: --
747: -- Standard check for p_commit
744: --
745: -- End of API body
746: --
747: -- Standard check for p_commit
748: IF FND_API.to_Boolean( p_commit )
749: THEN
750: COMMIT WORK;
751: END IF;
752: -- Standard call to get message count and if count is 1, get message info.
754: ( p_count => x_msg_count,
755: p_data => x_msg_data
756: );
757: EXCEPTION
758: WHEN FND_API.G_EXC_ERROR THEN
759: ROLLBACK TO VALIDATE_FORMULA;
760: x_return_status := FND_API.G_RET_STS_ERROR ;
761: FND_MSG_PUB.Count_And_Get
762: (p_count => x_msg_count,
756: );
757: EXCEPTION
758: WHEN FND_API.G_EXC_ERROR THEN
759: ROLLBACK TO VALIDATE_FORMULA;
760: x_return_status := FND_API.G_RET_STS_ERROR ;
761: FND_MSG_PUB.Count_And_Get
762: (p_count => x_msg_count,
763: p_data => x_msg_data
764: );
761: FND_MSG_PUB.Count_And_Get
762: (p_count => x_msg_count,
763: p_data => x_msg_data
764: );
765: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
766: ROLLBACK TO VALIDATE_FORMULA;
767: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
768: FND_MSG_PUB.Count_And_Get
769: (
763: p_data => x_msg_data
764: );
765: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
766: ROLLBACK TO VALIDATE_FORMULA;
767: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
768: FND_MSG_PUB.Count_And_Get
769: (
770: p_count => x_msg_count,
771: p_data => x_msg_data
771: p_data => x_msg_data
772: );
773: WHEN OTHERS THEN
774: ROLLBACK TO VALIDATE_FORMULA;
775: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
776:
777: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
778: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME ,l_api_name);
779: END IF;
785:
786: PROCEDURE VALIDATE_GRPOP_CTR
787: (
788: p_api_version IN NUMBER,
789: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
790: p_commit IN VARCHAR2 := FND_API.G_FALSE,
791: p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
792: x_return_status OUT NOCOPY VARCHAR2,
793: x_msg_count OUT NOCOPY NUMBER,
786: PROCEDURE VALIDATE_GRPOP_CTR
787: (
788: p_api_version IN NUMBER,
789: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
790: p_commit IN VARCHAR2 := FND_API.G_FALSE,
791: p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
792: x_return_status OUT NOCOPY VARCHAR2,
793: x_msg_count OUT NOCOPY NUMBER,
794: x_msg_data OUT NOCOPY VARCHAR2,
787: (
788: p_api_version IN NUMBER,
789: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
790: p_commit IN VARCHAR2 := FND_API.G_FALSE,
791: p_validation_level IN VARCHAR2 := FND_API.G_VALID_LEVEL_FULL,
792: x_return_status OUT NOCOPY VARCHAR2,
793: x_msg_count OUT NOCOPY NUMBER,
794: x_msg_data OUT NOCOPY VARCHAR2,
795: p_counter_id IN NUMBER,
847: -- Standard Start of API savepoint
848: SAVEPOINT VALIDATE_GRPOP;
849:
850: -- Standard call to check for call compatibility.
851: IF NOT FND_API.Compatible_API_Call ( l_api_version,
852: p_api_version,
853: l_api_name,
854: G_PKG_NAME)
855: THEN
852: p_api_version,
853: l_api_name,
854: G_PKG_NAME)
855: THEN
856: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
857: END IF;
858:
859: -- Read the debug profiles values in to global variable 7197402
860: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
860: CSI_CTR_GEN_UTILITY_PVT.read_debug_profiles;
861:
862: -- Initialize message list if p_init_msg_list is set to TRUE.
863:
864: IF FND_API.to_Boolean( p_init_msg_list )
865: THEN
866: FND_MSG_PUB.initialize;
867: END IF;
868:
866: FND_MSG_PUB.initialize;
867: END IF;
868:
869: -- Initialize API return status to SUCCESS
870: x_return_status := FND_API.G_RET_STS_SUCCESS;
871:
872: --
873: -- API body
874: --
875: -- ******************************************************************
876: -- Validate Environment
877: -- ******************************************************************
878:
879: IF ( P_validation_level >= FND_API.G_VALID_LEVEL_FULL)
880: THEN
881: -- Debug message
882: -- Invoke validation procedures
883: null;
883: null;
884: END IF;
885:
886: --Validate counter group id only when validation level is not none
887: IF ( P_validation_level > FND_API.G_VALID_LEVEL_NONE)
888: THEN
889: null;
890: END IF;
891:
888: THEN
889: null;
890: END IF;
891:
892: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
893: RAISE FND_API.G_EXC_ERROR;
894: END IF;
895:
896: --Parameter Validations and initialization
889: null;
890: END IF;
891:
892: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
893: RAISE FND_API.G_EXC_ERROR;
894: END IF;
895:
896: --Parameter Validations and initialization
897: x_valid_flag := 'N';
1016: END IF;
1017: RAISE;
1018: END;
1019:
1020: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1021: RAISE FND_API.G_EXC_ERROR;
1022: END IF;
1023: --
1024: -- End of API body
1017: RAISE;
1018: END;
1019:
1020: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1021: RAISE FND_API.G_EXC_ERROR;
1022: END IF;
1023: --
1024: -- End of API body
1025: --
1023: --
1024: -- End of API body
1025: --
1026: -- Standard check for p_commit
1027: IF FND_API.to_Boolean( p_commit )
1028: THEN
1029: COMMIT WORK;
1030: END IF;
1031: -- Standard call to get message count and if count is 1, get message info.
1033: ( p_count => x_msg_count,
1034: p_data => x_msg_data
1035: );
1036: EXCEPTION
1037: WHEN FND_API.G_EXC_ERROR THEN
1038: ROLLBACK TO VALIDATE_GRPOP;
1039: x_return_status := FND_API.G_RET_STS_ERROR ;
1040: FND_MSG_PUB.Count_And_Get
1041: (p_count => x_msg_count,
1035: );
1036: EXCEPTION
1037: WHEN FND_API.G_EXC_ERROR THEN
1038: ROLLBACK TO VALIDATE_GRPOP;
1039: x_return_status := FND_API.G_RET_STS_ERROR ;
1040: FND_MSG_PUB.Count_And_Get
1041: (p_count => x_msg_count,
1042: p_data => x_msg_data
1043: );
1040: FND_MSG_PUB.Count_And_Get
1041: (p_count => x_msg_count,
1042: p_data => x_msg_data
1043: );
1044: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1045: ROLLBACK TO VALIDATE_GRPOP;
1046: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1047: FND_MSG_PUB.Count_And_Get
1048: (
1042: p_data => x_msg_data
1043: );
1044: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1045: ROLLBACK TO VALIDATE_GRPOP;
1046: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1047: FND_MSG_PUB.Count_And_Get
1048: (
1049: p_count => x_msg_count,
1050: p_data => x_msg_data
1050: p_data => x_msg_data
1051: );
1052: WHEN OTHERS THEN
1053: ROLLBACK TO VALIDATE_GRPOP;
1054: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1055: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
1056: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME ,l_api_name);
1057: END IF;
1058: FND_MSG_PUB.Count_And_Get
1085: l_ctr_derived_filters_rec IN OUT NOCOPY CSI_CTR_DATASTRUCTURES_PUB.ctr_derived_filters_rec,
1086: l_old_ctr_derived_filters_rec IN CSI_CTR_DATASTRUCTURES_PUB.ctr_derived_filters_rec
1087: ) IS
1088: BEGIN
1089: IF l_ctr_derived_filters_rec.attribute1 = FND_API.G_MISS_CHAR THEN
1090: l_ctr_derived_filters_rec.attribute1 := l_old_ctr_derived_filters_rec.attribute1;
1091: END IF;
1092:
1093: IF l_ctr_derived_filters_rec.attribute2 = FND_API.G_MISS_CHAR THEN
1089: IF l_ctr_derived_filters_rec.attribute1 = FND_API.G_MISS_CHAR THEN
1090: l_ctr_derived_filters_rec.attribute1 := l_old_ctr_derived_filters_rec.attribute1;
1091: END IF;
1092:
1093: IF l_ctr_derived_filters_rec.attribute2 = FND_API.G_MISS_CHAR THEN
1094: l_ctr_derived_filters_rec.attribute2 := l_old_ctr_derived_filters_rec.attribute2;
1095: END IF;
1096:
1097: IF l_ctr_derived_filters_rec.attribute3 = FND_API.G_MISS_CHAR THEN
1093: IF l_ctr_derived_filters_rec.attribute2 = FND_API.G_MISS_CHAR THEN
1094: l_ctr_derived_filters_rec.attribute2 := l_old_ctr_derived_filters_rec.attribute2;
1095: END IF;
1096:
1097: IF l_ctr_derived_filters_rec.attribute3 = FND_API.G_MISS_CHAR THEN
1098: l_ctr_derived_filters_rec.attribute3 := l_old_ctr_derived_filters_rec.attribute3;
1099: END IF;
1100:
1101: IF l_ctr_derived_filters_rec.attribute4 = FND_API.G_MISS_CHAR THEN
1097: IF l_ctr_derived_filters_rec.attribute3 = FND_API.G_MISS_CHAR THEN
1098: l_ctr_derived_filters_rec.attribute3 := l_old_ctr_derived_filters_rec.attribute3;
1099: END IF;
1100:
1101: IF l_ctr_derived_filters_rec.attribute4 = FND_API.G_MISS_CHAR THEN
1102: l_ctr_derived_filters_rec.attribute4 := l_old_ctr_derived_filters_rec.attribute4;
1103: END IF;
1104:
1105: IF l_ctr_derived_filters_rec.attribute5 = FND_API.G_MISS_CHAR THEN
1101: IF l_ctr_derived_filters_rec.attribute4 = FND_API.G_MISS_CHAR THEN
1102: l_ctr_derived_filters_rec.attribute4 := l_old_ctr_derived_filters_rec.attribute4;
1103: END IF;
1104:
1105: IF l_ctr_derived_filters_rec.attribute5 = FND_API.G_MISS_CHAR THEN
1106: l_ctr_derived_filters_rec.attribute5 := l_old_ctr_derived_filters_rec.attribute5;
1107: END IF;
1108:
1109: IF l_ctr_derived_filters_rec.attribute6 = FND_API.G_MISS_CHAR THEN
1105: IF l_ctr_derived_filters_rec.attribute5 = FND_API.G_MISS_CHAR THEN
1106: l_ctr_derived_filters_rec.attribute5 := l_old_ctr_derived_filters_rec.attribute5;
1107: END IF;
1108:
1109: IF l_ctr_derived_filters_rec.attribute6 = FND_API.G_MISS_CHAR THEN
1110: l_ctr_derived_filters_rec.attribute6 := l_old_ctr_derived_filters_rec.attribute6;
1111: END IF;
1112:
1113: IF l_ctr_derived_filters_rec.attribute7 = FND_API.G_MISS_CHAR THEN
1109: IF l_ctr_derived_filters_rec.attribute6 = FND_API.G_MISS_CHAR THEN
1110: l_ctr_derived_filters_rec.attribute6 := l_old_ctr_derived_filters_rec.attribute6;
1111: END IF;
1112:
1113: IF l_ctr_derived_filters_rec.attribute7 = FND_API.G_MISS_CHAR THEN
1114: l_ctr_derived_filters_rec.attribute7 := l_old_ctr_derived_filters_rec.attribute7;
1115: END IF;
1116:
1117: IF l_ctr_derived_filters_rec.attribute8 = FND_API.G_MISS_CHAR THEN
1113: IF l_ctr_derived_filters_rec.attribute7 = FND_API.G_MISS_CHAR THEN
1114: l_ctr_derived_filters_rec.attribute7 := l_old_ctr_derived_filters_rec.attribute7;
1115: END IF;
1116:
1117: IF l_ctr_derived_filters_rec.attribute8 = FND_API.G_MISS_CHAR THEN
1118: l_ctr_derived_filters_rec.attribute8 := l_old_ctr_derived_filters_rec.attribute8;
1119: END IF;
1120:
1121: IF l_ctr_derived_filters_rec.attribute9 = FND_API.G_MISS_CHAR THEN
1117: IF l_ctr_derived_filters_rec.attribute8 = FND_API.G_MISS_CHAR THEN
1118: l_ctr_derived_filters_rec.attribute8 := l_old_ctr_derived_filters_rec.attribute8;
1119: END IF;
1120:
1121: IF l_ctr_derived_filters_rec.attribute9 = FND_API.G_MISS_CHAR THEN
1122: l_ctr_derived_filters_rec.attribute9 := l_old_ctr_derived_filters_rec.attribute9;
1123: END IF;
1124:
1125: IF l_ctr_derived_filters_rec.attribute10 = FND_API.G_MISS_CHAR THEN
1121: IF l_ctr_derived_filters_rec.attribute9 = FND_API.G_MISS_CHAR THEN
1122: l_ctr_derived_filters_rec.attribute9 := l_old_ctr_derived_filters_rec.attribute9;
1123: END IF;
1124:
1125: IF l_ctr_derived_filters_rec.attribute10 = FND_API.G_MISS_CHAR THEN
1126: l_ctr_derived_filters_rec.attribute10 := l_old_ctr_derived_filters_rec.attribute10;
1127: END IF;
1128:
1129: IF l_ctr_derived_filters_rec.attribute11 = FND_API.G_MISS_CHAR THEN
1125: IF l_ctr_derived_filters_rec.attribute10 = FND_API.G_MISS_CHAR THEN
1126: l_ctr_derived_filters_rec.attribute10 := l_old_ctr_derived_filters_rec.attribute10;
1127: END IF;
1128:
1129: IF l_ctr_derived_filters_rec.attribute11 = FND_API.G_MISS_CHAR THEN
1130: l_ctr_derived_filters_rec.attribute11 := l_old_ctr_derived_filters_rec.attribute11;
1131: END IF;
1132:
1133: IF l_ctr_derived_filters_rec.attribute12 = FND_API.G_MISS_CHAR THEN
1129: IF l_ctr_derived_filters_rec.attribute11 = FND_API.G_MISS_CHAR THEN
1130: l_ctr_derived_filters_rec.attribute11 := l_old_ctr_derived_filters_rec.attribute11;
1131: END IF;
1132:
1133: IF l_ctr_derived_filters_rec.attribute12 = FND_API.G_MISS_CHAR THEN
1134: l_ctr_derived_filters_rec.attribute12 := l_old_ctr_derived_filters_rec.attribute12;
1135: END IF;
1136:
1137: IF l_ctr_derived_filters_rec.attribute13 = FND_API.G_MISS_CHAR THEN
1133: IF l_ctr_derived_filters_rec.attribute12 = FND_API.G_MISS_CHAR THEN
1134: l_ctr_derived_filters_rec.attribute12 := l_old_ctr_derived_filters_rec.attribute12;
1135: END IF;
1136:
1137: IF l_ctr_derived_filters_rec.attribute13 = FND_API.G_MISS_CHAR THEN
1138: l_ctr_derived_filters_rec.attribute13 := l_old_ctr_derived_filters_rec.attribute13;
1139: END IF;
1140:
1141: IF l_ctr_derived_filters_rec.attribute14 = FND_API.G_MISS_CHAR THEN
1137: IF l_ctr_derived_filters_rec.attribute13 = FND_API.G_MISS_CHAR THEN
1138: l_ctr_derived_filters_rec.attribute13 := l_old_ctr_derived_filters_rec.attribute13;
1139: END IF;
1140:
1141: IF l_ctr_derived_filters_rec.attribute14 = FND_API.G_MISS_CHAR THEN
1142: l_ctr_derived_filters_rec.attribute14 := l_old_ctr_derived_filters_rec.attribute14;
1143: END IF;
1144:
1145: IF l_ctr_derived_filters_rec.attribute15 = FND_API.G_MISS_CHAR THEN
1141: IF l_ctr_derived_filters_rec.attribute14 = FND_API.G_MISS_CHAR THEN
1142: l_ctr_derived_filters_rec.attribute14 := l_old_ctr_derived_filters_rec.attribute14;
1143: END IF;
1144:
1145: IF l_ctr_derived_filters_rec.attribute15 = FND_API.G_MISS_CHAR THEN
1146: l_ctr_derived_filters_rec.attribute15 := l_old_ctr_derived_filters_rec.attribute15;
1147: END IF;
1148:
1149: IF l_ctr_derived_filters_rec.attribute_category = FND_API.G_MISS_CHAR THEN
1145: IF l_ctr_derived_filters_rec.attribute15 = FND_API.G_MISS_CHAR THEN
1146: l_ctr_derived_filters_rec.attribute15 := l_old_ctr_derived_filters_rec.attribute15;
1147: END IF;
1148:
1149: IF l_ctr_derived_filters_rec.attribute_category = FND_API.G_MISS_CHAR THEN
1150: l_ctr_derived_filters_rec.attribute_category := l_old_ctr_derived_filters_rec.attribute_category;
1151: END IF;
1152: END Initialize_Desc_Flex_For_Upd;
1153:
1156: BEGIN
1157: /* IF NOT csi_gen_utility_pvt.IB_ACTIVE THEN
1158: FND_MESSAGE.Set_Name('CSI', 'CSI_IB_NOT_ACTIVE');
1159: FND_MSG_PUB.Add;
1160: RAISE FND_API.G_Exc_Error;
1161: END IF
1162: */
1163: null;
1164: EXCEPTION
1161: END IF
1162: */
1163: null;
1164: EXCEPTION
1165: WHEN fnd_api.g_exc_error THEN
1166: RAISE fnd_api.g_exc_error;
1167: WHEN others THEN
1168: FND_MESSAGE.Set_Name('CSI', 'CSI_UNEXP_SQL_ERROR');
1169: FND_MESSAGE.Set_Token('API_NAME', 'Check_IB_Active');
1162: */
1163: null;
1164: EXCEPTION
1165: WHEN fnd_api.g_exc_error THEN
1166: RAISE fnd_api.g_exc_error;
1167: WHEN others THEN
1168: FND_MESSAGE.Set_Name('CSI', 'CSI_UNEXP_SQL_ERROR');
1169: FND_MESSAGE.Set_Token('API_NAME', 'Check_IB_Active');
1170: FND_MESSAGE.Set_Token('SQL_ERROR', sqlerrm);
1168: FND_MESSAGE.Set_Name('CSI', 'CSI_UNEXP_SQL_ERROR');
1169: FND_MESSAGE.Set_Token('API_NAME', 'Check_IB_Active');
1170: FND_MESSAGE.Set_Token('SQL_ERROR', sqlerrm);
1171: FND_MSG_PUB.Add;
1172: RAISE fnd_api.g_exc_error;
1173: END check_ib_active;
1174:
1175: PROCEDURE dump_ctr_grp_rec
1176: (p_counter_groups_rec IN csi_ctr_datastructures_pub.counter_groups_rec) IS