66: END IF;
67:
68:
69: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
70: FND_MSG_PUB.initialize ;
71: END IF;
72:
73: x_return_status := FND_API.G_RET_STS_SUCCESS;
74:
115: IF FND_API.To_Boolean ( p_commit ) THEN
116: COMMIT WORK;
117: END iF;
118:
119: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
120: p_data => x_msg_data );
121:
122: EXCEPTION
123:
124: WHEN FND_API.G_EXC_ERROR THEN
125:
126: ROLLBACK TO Insert_Row_Pvt ;
127: x_return_status := FND_API.G_RET_STS_ERROR;
128: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
129: p_data => x_msg_data );
130:
131: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
132:
131: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
132:
133: ROLLBACK TO Insert_Row_Pvt ;
134: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
135: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
136: p_data => x_msg_data );
137:
138: WHEN OTHERS THEN
139:
139:
140: ROLLBACK TO Insert_Row_Pvt ;
141: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
142:
143: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
144: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
145: l_api_name);
146: END if;
147:
140: ROLLBACK TO Insert_Row_Pvt ;
141: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
142:
143: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
144: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
145: l_api_name);
146: END if;
147:
148: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
144: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
145: l_api_name);
146: END if;
147:
148: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
149: p_data => x_msg_data );
150:
151: END Insert_Row;
152:
201: END IF;
202:
203:
204: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
205: FND_MSG_PUB.initialize;
206: END IF;
207:
208: x_return_status := FND_API.G_RET_STS_SUCCESS;
209: p_row_locked := FND_API.G_TRUE;
213: FETCH cur_sys_options INTO Recinfo;
214: IF (cur_sys_options%NOTFOUND) THEN
215: CLOSE cur_sys_options;
216: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
217: FND_MSG_PUB.Add;
218: RAISE FND_API.G_EXC_ERROR;
219: END IF;
220:
221: CLOSE cur_sys_options;
244: ) THEN
245: Null;
246: ELSE
247: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
248: FND_MSG_PUB.Add;
249: RAISE FND_API.G_EXC_ERROR;
250: END IF;
251:
252: IF FND_API.To_Boolean ( p_commit ) THEN
252: IF FND_API.To_Boolean ( p_commit ) THEN
253: COMMIT WORK;
254: END iF;
255:
256: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
257: p_data => x_msg_data );
258:
259: EXCEPTION
260:
262:
263: ROLLBACK TO Lock_Row_Pvt;
264: p_row_locked := FND_API.G_FALSE;
265: x_return_status := FND_API.G_RET_STS_ERROR;
266: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
267: p_data => x_msg_data );
268:
269: WHEN FND_API.G_EXC_ERROR THEN
270:
269: WHEN FND_API.G_EXC_ERROR THEN
270:
271: ROLLBACK TO Lock_Row_Pvt;
272: x_return_status := FND_API.G_RET_STS_ERROR;
273: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
274: p_data => x_msg_data );
275:
276: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
277:
276: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
277:
278: ROLLBACK TO Lock_Row_Pvt;
279: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
280: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
281: p_data => x_msg_data );
282:
283: WHEN OTHERS THEN
284:
284:
285: ROLLBACK TO Lock_Row_Pvt ;
286: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
287:
288: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
289: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
290: l_api_name);
291: END if;
292:
285: ROLLBACK TO Lock_Row_Pvt ;
286: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
287:
288: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
289: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
290: l_api_name);
291: END if;
292:
293: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
289: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
290: l_api_name);
291: END if;
292:
293: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
294: p_data => x_msg_data );
295:
296: END Lock_Row;
297:
338: END IF;
339:
340:
341: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
342: FND_MSG_PUB.initialize;
343: END IF;
344:
345: x_return_status := FND_API.G_RET_STS_SUCCESS;
346:
365: IF FND_API.To_Boolean ( p_commit ) THEN
366: COMMIT WORK;
367: END iF;
368:
369: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
370: p_data => x_msg_data );
371:
372: EXCEPTION
373:
374: WHEN FND_API.G_EXC_ERROR THEN
375:
376: ROLLBACK TO Update_Row_Pvt ;
377: x_return_status := FND_API.G_RET_STS_ERROR;
378: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
379: p_data => x_msg_data );
380:
381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
382:
381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
382:
383: ROLLBACK TO Update_Row_Pvt ;
384: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
385: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
386: p_data => x_msg_data );
387:
388: WHEN OTHERS THEN
389:
389:
390: ROLLBACK TO Update_Row_Pvt ;
391: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
392:
393: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
394: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
395: l_api_name);
396: END if;
397:
390: ROLLBACK TO Update_Row_Pvt ;
391: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
392:
393: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
394: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
395: l_api_name);
396: END if;
397:
398: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
394: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
395: l_api_name);
396: END if;
397:
398: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
399: p_data => x_msg_data );
400:
401: END Update_Row;
402: /* ----------------------------------------------------------------------- */
432: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
433: END IF;
434:
435: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
436: FND_MSG_PUB.initialize;
437: END IF;
438:
439: x_return_status := FND_API.G_RET_STS_SUCCESS;
440:
450: IF FND_API.To_Boolean ( p_commit ) THEN
451: COMMIT WORK;
452: END IF;
453:
454: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
455: p_data => x_msg_data );
456:
457: EXCEPTION
458:
459: WHEN FND_API.G_EXC_ERROR THEN
460:
461: ROLLBACK TO Delete_Row_Pvt;
462: x_return_status := FND_API.G_RET_STS_ERROR;
463: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
464: p_data => x_msg_data );
465:
466: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
467:
466: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
467:
468: ROLLBACK TO Delete_Row_Pvt;
469: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
470: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
471: p_data => x_msg_data );
472:
473: WHEN OTHERS THEN
474:
474:
475: ROLLBACK TO Delete_Row_Pvt;
476: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
477:
478: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
479: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
480: l_api_name);
481: END if;
482:
475: ROLLBACK TO Delete_Row_Pvt;
476: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
477:
478: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
479: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
480: l_api_name);
481: END if;
482:
483: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
479: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
480: l_api_name);
481: END if;
482:
483: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
484: p_data => x_msg_data );
485:
486: END Delete_Row;
487: /* ----------------------------------------------------------------------- */
532: END IF;
533:
534:
535: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
536: FND_MSG_PUB.initialize ;
537: END IF;
538:
539: x_return_status := FND_API.G_RET_STS_SUCCESS ;
540:
554: IF FND_API.To_Boolean ( p_commit ) THEN
555: COMMIT WORK;
556: END iF;
557:
558: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
559: p_data => x_msg_data );
560:
561: EXCEPTION
562:
563: WHEN FND_API.G_EXC_ERROR THEN
564:
565: ROLLBACK TO Check_Unique_Pvt ;
566: x_return_status := FND_API.G_RET_STS_ERROR;
567: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
568: p_data => x_msg_data );
569:
570: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
571:
570: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
571:
572: ROLLBACK TO Check_Unique_Pvt ;
573: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
574: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
575: p_data => x_msg_data );
576:
577: WHEN OTHERS THEN
578:
578:
579: ROLLBACK TO Check_Unique_Pvt ;
580: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
581:
582: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
583: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
584: l_api_name);
585: END if;
586:
579: ROLLBACK TO Check_Unique_Pvt ;
580: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
581:
582: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
583: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
584: l_api_name);
585: END if;
586:
587: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
583: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
584: l_api_name);
585: END if;
586:
587: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
588: p_data => x_msg_data );
589:
590: END Check_Unique;
591:
651: END IF;
652:
653:
654: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
655: FND_MSG_PUB.initialize;
656: END IF;
657:
658: x_return_status := FND_API.G_RET_STS_SUCCESS;
659: -- sb: x_cc_num is not a number, so set to null not 0
684: EXCEPTION -- Added for bug 3329666
685: WHEN e_row_locked
686: THEN
687: fnd_message.set_name('IGC','IGC_CC_NUM_LOCK');
688: fnd_msg_pub.add;
689: IF( FND_LOG.TEST(FND_LOG.LEVEL_ERROR,
690: 'IGC.PLSQL.Igc_Cc_Numbers_Pkg.Create_Auto_CC_Num.Lock1'))
691: THEN
692: if (l_error_level >= l_debug_level) then
695: , FALSE);
696: end if;
697: END IF;
698: ROLLBACK;
699: fnd_msg_pub.count_and_get(p_count => x_msg_count,
700: p_data => x_msg_data);
701: RETURN;
702: END ;
703:
801: -- sb: define the exceptions
802: WHEN e_no_number_setup THEN
803: x_return_status := FND_API.G_RET_STS_ERROR;
804: fnd_message.set_name('IGC','IGC_NO_NUMBERING_SETUP');
805: fnd_msg_pub.add;
806: fnd_msg_pub.count_and_get(p_count => x_msg_count,
807: p_data => x_msg_data);
808: ROLLBACK; -- Added for bug 3329666
809:
802: WHEN e_no_number_setup THEN
803: x_return_status := FND_API.G_RET_STS_ERROR;
804: fnd_message.set_name('IGC','IGC_NO_NUMBERING_SETUP');
805: fnd_msg_pub.add;
806: fnd_msg_pub.count_and_get(p_count => x_msg_count,
807: p_data => x_msg_data);
808: ROLLBACK; -- Added for bug 3329666
809:
810: WHEN e_no_prefix_setup THEN
809:
810: WHEN e_no_prefix_setup THEN
811: x_return_status := FND_API.G_RET_STS_ERROR;
812: fnd_message.set_name('IGC','IGC_CC_PREFIX_REQD');
813: fnd_msg_pub.add;
814: fnd_msg_pub.count_and_get(p_count => x_msg_count,
815: p_data => x_msg_data);
816: -- sb: end
817: ROLLBACK; -- Added for bug 3329666
810: WHEN e_no_prefix_setup THEN
811: x_return_status := FND_API.G_RET_STS_ERROR;
812: fnd_message.set_name('IGC','IGC_CC_PREFIX_REQD');
813: fnd_msg_pub.add;
814: fnd_msg_pub.count_and_get(p_count => x_msg_count,
815: p_data => x_msg_data);
816: -- sb: end
817: ROLLBACK; -- Added for bug 3329666
818:
818:
819: WHEN FND_API.G_EXC_ERROR THEN
820:
821: x_return_status := FND_API.G_RET_STS_ERROR;
822: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
823: p_data => x_msg_data );
824: ROLLBACK; -- Added for bug 3329666
825:
826: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
825:
826: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
827:
828: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
829: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
830: p_data => x_msg_data );
831:
832: ROLLBACK; -- Added for bug 3329666
833:
835:
836: ROLLBACK ;
837: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
838:
839: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
840: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
841: l_api_name);
842: END if;
843:
836: ROLLBACK ;
837: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
838:
839: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
840: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
841: l_api_name);
842: END if;
843:
844: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
840: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
841: l_api_name);
842: END if;
843:
844: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
845: p_data => x_msg_data );
846:
847: END Create_Auto_CC_Num;
848:
879: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
880: END IF;
881:
882: IF FND_API.to_Boolean ( p_init_msg_list ) THEN
883: FND_MSG_PUB.initialize;
884: END IF;
885:
886: x_return_status := FND_API.G_RET_STS_SUCCESS;
887:
907: WHEN OTHERS THEN
908: ROLLBACK TO Validate_Numeric_CC_Num_Pvt;
909: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
910:
911: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
912: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
913: l_api_name);
914: END if;
915:
908: ROLLBACK TO Validate_Numeric_CC_Num_Pvt;
909: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
910:
911: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
912: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
913: l_api_name);
914: END if;
915:
916: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
912: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME,
913: l_api_name);
914: END if;
915:
916: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
917: p_data => x_msg_data );
918:
919: END Validate_Numeric_CC_Num;
920: /* ----------------------------------------------------------------------- */