9: /* description : Validation checks for before inserting */
10: /* new record as well before modification */
11: /* takes place */
12: /*-----------------------------------------------------------*/
13: G_DEBUG VARCHAR2(1):=AHL_DEBUG_PUB.is_log_enabled;
14: PROCEDURE VALIDATE_DOC_TYPE_ASSOC
15: (
16: P_DOCUMENT_SUB_TYPE_ID IN NUMBER ,
17: P_DOC_TYPE_CODE IN VARCHAR2 ,
213: -- Standard Start of API savepoint
214: SAVEPOINT delete_doc_type_assoc;
215: -- Check if API is called in debug mode. If yes, enable debug.
216: IF G_DEBUG='Y' THEN
217: AHL_DEBUG_PUB.enable_debug;
218:
219: END IF;
220: -- Debug info.
221: IF G_DEBUG='Y' THEN
219: END IF;
220: -- Debug info.
221: IF G_DEBUG='Y' THEN
222: IF G_DEBUG='Y' THEN
223: AHL_DEBUG_PUB.debug( 'enter ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
224:
225: END IF;
226: END IF;
227: -- Standard call to check for call compatibility.
310: COMMIT;
311: END IF;
312: -- Debug info
313: IF G_DEBUG='Y' THEN
314: AHL_DEBUG_PUB.debug( 'End of private api Delete Doc Type','+DOCTY+');
315:
316: END IF;
317: -- Check if API is called in debug mode. If yes, disable debug.
318: IF G_DEBUG='Y' THEN
315:
316: END IF;
317: -- Check if API is called in debug mode. If yes, disable debug.
318: IF G_DEBUG='Y' THEN
319: AHL_DEBUG_PUB.disable_debug;
320:
321: END IF;
322:
323: EXCEPTION
327: FND_MSG_PUB.count_and_get( p_encoded => FND_API.G_FALSE,
328: p_count => x_msg_count,
329: p_data => x_msg_data);
330: IF G_DEBUG='Y' THEN
331: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'ERROR' );
332: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
333:
334:
335: -- Check if API is called in debug mode. If yes, disable debug.
328: p_count => x_msg_count,
329: p_data => x_msg_data);
330: IF G_DEBUG='Y' THEN
331: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'ERROR' );
332: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
333:
334:
335: -- Check if API is called in debug mode. If yes, disable debug.
336: AHL_DEBUG_PUB.disable_debug;
332: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
333:
334:
335: -- Check if API is called in debug mode. If yes, disable debug.
336: AHL_DEBUG_PUB.disable_debug;
337:
338: END IF;
339:
340: WHEN FND_API.G_EXC_ERROR THEN
344: p_count => x_msg_count,
345: p_data => X_msg_data);
346: -- Debug info.
347: IF G_DEBUG='Y' THEN
348: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
349: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
350:
351:
352: -- Check if API is called in debug mode. If yes, disable debug.
345: p_data => X_msg_data);
346: -- Debug info.
347: IF G_DEBUG='Y' THEN
348: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
349: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
350:
351:
352: -- Check if API is called in debug mode. If yes, disable debug.
353: AHL_DEBUG_PUB.disable_debug;
349: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
350:
351:
352: -- Check if API is called in debug mode. If yes, disable debug.
353: AHL_DEBUG_PUB.disable_debug;
354:
355: END IF;
356:
357: WHEN OTHERS THEN
368: p_data => X_msg_data);
369:
370: -- Debug info.
371: IF G_DEBUG='Y' THEN
372: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'SQL ERROR' );
373: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
374:
375:
376: -- Check if API is called in debug mode. If yes, disable debug.
369:
370: -- Debug info.
371: IF G_DEBUG='Y' THEN
372: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'SQL ERROR' );
373: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
374:
375:
376: -- Check if API is called in debug mode. If yes, disable debug.
377: AHL_DEBUG_PUB.disable_debug;
373: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Delete Doc Type','+DOCTY+');
374:
375:
376: -- Check if API is called in debug mode. If yes, disable debug.
377: AHL_DEBUG_PUB.disable_debug;
378:
379: END IF;
380:
381: END DELETE_DOC_TYPE_ASSOC;
430: -- Standard Start of API savepoint
431: SAVEPOINT create_doc_type_assoc;
432: -- Check if API is called in debug mode. If yes, enable debug.
433: IF G_DEBUG='Y' THEN
434: AHL_DEBUG_PUB.enable_debug;
435:
436: END IF;
437: -- Debug info.
438: IF G_DEBUG='Y' THEN
436: END IF;
437: -- Debug info.
438: IF G_DEBUG='Y' THEN
439: IF G_DEBUG='Y' THEN
440: AHL_DEBUG_PUB.debug( 'enter ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
441:
442: END IF;
443: END IF;
444: -- Standard call to check for call compatibility.
589: COMMIT;
590: END IF;
591: -- Debug info
592: IF G_DEBUG='Y' THEN
593: AHL_DEBUG_PUB.debug( 'End of private api Create Doc Type','+DOCTY+');
594:
595: END IF;
596: -- Check if API is called in debug mode. If yes, disable debug.
597: IF G_DEBUG='Y' THEN
594:
595: END IF;
596: -- Check if API is called in debug mode. If yes, disable debug.
597: IF G_DEBUG='Y' THEN
598: AHL_DEBUG_PUB.disable_debug;
599:
600: END IF;
601:
602: EXCEPTION
606: FND_MSG_PUB.count_and_get( p_encoded => FND_API.G_FALSE,
607: p_count => x_msg_count,
608: p_data => x_msg_data);
609: IF G_DEBUG='Y' THEN
610: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'ERROR' );
611: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
612:
613:
614: -- Check if API is called in debug mode. If yes, disable debug.
607: p_count => x_msg_count,
608: p_data => x_msg_data);
609: IF G_DEBUG='Y' THEN
610: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'ERROR' );
611: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
612:
613:
614: -- Check if API is called in debug mode. If yes, disable debug.
615: AHL_DEBUG_PUB.disable_debug;
611: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
612:
613:
614: -- Check if API is called in debug mode. If yes, disable debug.
615: AHL_DEBUG_PUB.disable_debug;
616:
617: END IF;
618:
619: WHEN FND_API.G_EXC_ERROR THEN
623: p_count => x_msg_count,
624: p_data => X_msg_data);
625: -- Debug info.
626: IF G_DEBUG='Y' THEN
627: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
628: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
629:
630:
631: -- Check if API is called in debug mode. If yes, disable debug.
624: p_data => X_msg_data);
625: -- Debug info.
626: IF G_DEBUG='Y' THEN
627: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
628: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
629:
630:
631: -- Check if API is called in debug mode. If yes, disable debug.
632: AHL_DEBUG_PUB.disable_debug;
628: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
629:
630:
631: -- Check if API is called in debug mode. If yes, disable debug.
632: AHL_DEBUG_PUB.disable_debug;
633:
634: END IF;
635:
636: WHEN OTHERS THEN
647: p_data => X_msg_data);
648:
649: -- Debug info.
650: IF G_DEBUG='Y' THEN
651: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'SQL ERROR' );
652: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
653:
654:
655: -- Check if API is called in debug mode. If yes, disable debug.
648:
649: -- Debug info.
650: IF G_DEBUG='Y' THEN
651: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'SQL ERROR' );
652: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
653:
654:
655: -- Check if API is called in debug mode. If yes, disable debug.
656: AHL_DEBUG_PUB.disable_debug;
652: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Create Doc Type','+DOCTY+');
653:
654:
655: -- Check if API is called in debug mode. If yes, disable debug.
656: AHL_DEBUG_PUB.disable_debug;
657:
658: END IF;
659:
660: END CREATE_DOC_TYPE_ASSOC;
756: -- Standard Start of API savepoint
757: SAVEPOINT modify_doc_type_assoc;
758: -- Check if API is called in debug mode. If yes, enable debug.
759: IF G_DEBUG='Y' THEN
760: AHL_DEBUG_PUB.enable_debug;
761:
762: END IF;
763: -- Debug info.
764: IF G_DEBUG='Y' THEN
762: END IF;
763: -- Debug info.
764: IF G_DEBUG='Y' THEN
765: IF G_DEBUG='Y' THEN
766: AHL_DEBUG_PUB.debug( 'enter ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
767:
768: END IF;
769: END IF;
770: -- Standard call to check for call compatibility.
903: FND_MSG_PUB.ADD;
904: END;
905:
906: IF G_DEBUG='Y' THEN
907: AHL_DEBUG_PUB.debug( 'The error count inside update'||FND_MSG_PUB.count_msg);
908:
909: END IF;
910:
911: END IF;
915: p_x_doc_type_assoc_tbl(i).delete_flag = 'Y'
916:
917: THEN
918: IF G_DEBUG='Y' THEN
919: AHL_DEBUG_PUB.debug( 'documetn sub type id '||p_x_doc_type_assoc_tbl(i).document_sub_type_id);
920:
921: END IF;
922: --Checks for weather the exists or not
923: OPEN get_doc_sub_rec_info(p_x_doc_type_assoc_tbl(i).document_sub_type_id);
958: END IF;
959: END IF;
960:
961: IF G_DEBUG='Y' THEN
962: AHL_DEBUG_PUB.debug( 'The error count inside delete'||FND_MSG_PUB.count_msg);
963:
964: END IF;
965: IF (NVL(FND_MSG_PUB.count_msg,0) = 0) THEN
966: -- Delete the record from document subtypes table
985: END LOOP;
986: END IF;
987:
988: IF G_DEBUG='Y' THEN
989: AHL_DEBUG_PUB.debug( 'The error count '||FND_MSG_PUB.count_msg);
990:
991: END IF;
992: --Standard check for messages
993: l_msg_count := FND_MSG_PUB.count_msg;
1003: COMMIT;
1004: END IF;
1005: -- Debug info
1006: IF G_DEBUG='Y' THEN
1007: AHL_DEBUG_PUB.debug( 'End of private api Modify Doc Type','+DOCTY+');
1008:
1009: END IF;
1010: -- Check if API is called in debug mode. If yes, disable debug.
1011: IF G_DEBUG='Y' THEN
1008:
1009: END IF;
1010: -- Check if API is called in debug mode. If yes, disable debug.
1011: IF G_DEBUG='Y' THEN
1012: AHL_DEBUG_PUB.disable_debug;
1013:
1014: END IF;
1015:
1016: EXCEPTION
1020: FND_MSG_PUB.count_and_get( p_encoded => FND_API.G_FALSE,
1021: p_count => x_msg_count,
1022: p_data => x_msg_data);
1023: IF G_DEBUG='Y' THEN
1024: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'ERROR' );
1025: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1026:
1027:
1028: -- Check if API is called in debug mode. If yes, disable debug.
1021: p_count => x_msg_count,
1022: p_data => x_msg_data);
1023: IF G_DEBUG='Y' THEN
1024: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'ERROR' );
1025: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1026:
1027:
1028: -- Check if API is called in debug mode. If yes, disable debug.
1029: AHL_DEBUG_PUB.disable_debug;
1025: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1026:
1027:
1028: -- Check if API is called in debug mode. If yes, disable debug.
1029: AHL_DEBUG_PUB.disable_debug;
1030:
1031: END IF;
1032:
1033: WHEN FND_API.G_EXC_ERROR THEN
1037: p_count => x_msg_count,
1038: p_data => X_msg_data);
1039: -- Debug info.
1040: IF G_DEBUG='Y' THEN
1041: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1042: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1043:
1044:
1045: -- Check if API is called in debug mode. If yes, disable debug.
1038: p_data => X_msg_data);
1039: -- Debug info.
1040: IF G_DEBUG='Y' THEN
1041: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1042: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1043:
1044:
1045: -- Check if API is called in debug mode. If yes, disable debug.
1046: AHL_DEBUG_PUB.disable_debug;
1042: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1043:
1044:
1045: -- Check if API is called in debug mode. If yes, disable debug.
1046: AHL_DEBUG_PUB.disable_debug;
1047:
1048: END IF;
1049:
1050: WHEN OTHERS THEN
1060: p_count => x_msg_count,
1061: p_data => X_msg_data);
1062: -- Debug info.
1063: IF G_DEBUG='Y' THEN
1064: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'SQL ERROR' );
1065: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1066:
1067:
1068: -- Check if API is called in debug mode. If yes, disable debug.
1061: p_data => X_msg_data);
1062: -- Debug info.
1063: IF G_DEBUG='Y' THEN
1064: AHL_DEBUG_PUB.log_app_messages (x_msg_count, x_msg_data, 'SQL ERROR' );
1065: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1066:
1067:
1068: -- Check if API is called in debug mode. If yes, disable debug.
1069: AHL_DEBUG_PUB.disable_debug;
1065: AHL_DEBUG_PUB.debug( 'ahl_di_pro_type_aso_pvt.Modify Doc Type','+DOCTY+');
1066:
1067:
1068: -- Check if API is called in debug mode. If yes, disable debug.
1069: AHL_DEBUG_PUB.disable_debug;
1070:
1071: END IF;
1072:
1073: END MODIFY_DOC_TYPE_ASSOC;