636:
637: x_attachment_count := l_documentTbl.COUNT;
638: x_return_status := FND_API.G_RET_STS_SUCCESS;
639:
640: OE_MSG_PUB.Count_And_Get
641: ( p_count => x_msg_count
642: , p_data => x_msg_data
643: );
644:
650:
651: EXCEPTION
652: WHEN FND_API.G_EXC_ERROR THEN
653: x_return_status := FND_API.G_RET_STS_ERROR;
654: OE_MSG_PUB.Count_And_Get
655: ( p_count => x_msg_count
656: , p_data => x_msg_data
657: );
658: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
656: , p_data => x_msg_data
657: );
658: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
659: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
660: OE_MSG_PUB.Count_And_Get
661: ( p_count => x_msg_count
662: , p_data => x_msg_data
663: );
664: WHEN OTHERS THEN
668: IF l_debug_level > 0 THEN
669: oe_debug_pub.add( 'ERROR: '||SUBSTR ( SQLERRM , 1 , 250 ) , 1 ) ;
670: END IF;
671: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
672: IF OE_MSG_PUB.Check_Msg_Level
673: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
674: THEN
675: OE_MSG_PUB.Add_Exc_Msg
676: ( G_PKG_NAME
669: oe_debug_pub.add( 'ERROR: '||SUBSTR ( SQLERRM , 1 , 250 ) , 1 ) ;
670: END IF;
671: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
672: IF OE_MSG_PUB.Check_Msg_Level
673: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
674: THEN
675: OE_MSG_PUB.Add_Exc_Msg
676: ( G_PKG_NAME
677: , l_api_name
671: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
672: IF OE_MSG_PUB.Check_Msg_Level
673: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
674: THEN
675: OE_MSG_PUB.Add_Exc_Msg
676: ( G_PKG_NAME
677: , l_api_name
678: );
679: END IF;
676: ( G_PKG_NAME
677: , l_api_name
678: );
679: END IF;
680: OE_MSG_PUB.Count_And_Get
681: ( p_count => x_msg_count
682: , p_data => x_msg_data
683: );
684: END Add_Attachments_Automatic;
768: if (C_DOC%NOTFOUND) then
769: -- invalid document id!
770: close C_DOC;
771: FND_MESSAGE.SET_NAME('ONT','OE_INVALID_DOCUMENT_ID');
772: OE_MSG_PUB.ADD;
773: x_return_status := FND_API.G_RET_STS_ERROR;
774: end if;
775: close C_DOC;
776:
786: and data_object_code is not null;
787: EXCEPTION
788: WHEN no_data_found THEN
789: FND_MESSAGE.SET_NAME('ONT','OE_INVALID_DOCUMENT_ENTITY');
790: OE_MSG_PUB.ADD;
791: RAISE FND_API.G_EXC_ERROR;
792: END;
793: */
794:
886: );
887:
888: x_attachment_id := l_attached_document_id;
889:
890: OE_MSG_PUB.Count_And_Get
891: ( p_count => x_msg_count
892: , p_data => x_msg_data
893: );
894:
894:
895: EXCEPTION
896: WHEN FND_API.G_EXC_ERROR THEN
897: x_return_status := FND_API.G_RET_STS_ERROR;
898: OE_MSG_PUB.Count_And_Get
899: ( p_count => x_msg_count
900: , p_data => x_msg_data
901: );
902: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
900: , p_data => x_msg_data
901: );
902: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
903: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
904: OE_MSG_PUB.Count_And_Get
905: ( p_count => x_msg_count
906: , p_data => x_msg_data
907: );
908: WHEN OTHERS THEN
906: , p_data => x_msg_data
907: );
908: WHEN OTHERS THEN
909: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
910: IF OE_MSG_PUB.Check_Msg_Level
911: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
912: THEN
913: OE_MSG_PUB.Add_Exc_Msg
914: ( G_PKG_NAME
907: );
908: WHEN OTHERS THEN
909: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
910: IF OE_MSG_PUB.Check_Msg_Level
911: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
912: THEN
913: OE_MSG_PUB.Add_Exc_Msg
914: ( G_PKG_NAME
915: , l_api_name
909: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
910: IF OE_MSG_PUB.Check_Msg_Level
911: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
912: THEN
913: OE_MSG_PUB.Add_Exc_Msg
914: ( G_PKG_NAME
915: , l_api_name
916: );
917: END IF;
914: ( G_PKG_NAME
915: , l_api_name
916: );
917: END IF;
918: OE_MSG_PUB.Count_And_Get
919: ( p_count => x_msg_count
920: , p_data => x_msg_data
921: );
922: END Add_Attachment;
972:
973: EXCEPTION
974: WHEN OTHERS THEN
975: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
976: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
977: THEN
978: OE_MSG_PUB.Add_Exc_Msg
979: ( G_PKG_NAME
980: , 'Delete_Attachments'
974: WHEN OTHERS THEN
975: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
976: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
977: THEN
978: OE_MSG_PUB.Add_Exc_Msg
979: ( G_PKG_NAME
980: , 'Delete_Attachments'
981: );
982: END IF;