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;
767: if (C_DOC%NOTFOUND) then
768: -- invalid document id!
769: close C_DOC;
770: FND_MESSAGE.SET_NAME('ONT','OE_INVALID_DOCUMENT_ID');
771: OE_MSG_PUB.ADD;
772: x_return_status := FND_API.G_RET_STS_ERROR;
773: end if;
774: close C_DOC;
775:
785: and data_object_code is not null;
786: EXCEPTION
787: WHEN no_data_found THEN
788: FND_MESSAGE.SET_NAME('ONT','OE_INVALID_DOCUMENT_ENTITY');
789: OE_MSG_PUB.ADD;
790: RAISE FND_API.G_EXC_ERROR;
791: END;
792: */
793:
884: );
885:
886: x_attachment_id := l_attached_document_id;
887:
888: OE_MSG_PUB.Count_And_Get
889: ( p_count => x_msg_count
890: , p_data => x_msg_data
891: );
892:
892:
893: EXCEPTION
894: WHEN FND_API.G_EXC_ERROR THEN
895: x_return_status := FND_API.G_RET_STS_ERROR;
896: OE_MSG_PUB.Count_And_Get
897: ( p_count => x_msg_count
898: , p_data => x_msg_data
899: );
900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
898: , p_data => x_msg_data
899: );
900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
901: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
902: OE_MSG_PUB.Count_And_Get
903: ( p_count => x_msg_count
904: , p_data => x_msg_data
905: );
906: WHEN OTHERS THEN
904: , p_data => x_msg_data
905: );
906: WHEN OTHERS THEN
907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
908: IF OE_MSG_PUB.Check_Msg_Level
909: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
910: THEN
911: OE_MSG_PUB.Add_Exc_Msg
912: ( G_PKG_NAME
905: );
906: WHEN OTHERS THEN
907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
908: IF OE_MSG_PUB.Check_Msg_Level
909: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
910: THEN
911: OE_MSG_PUB.Add_Exc_Msg
912: ( G_PKG_NAME
913: , l_api_name
907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
908: IF OE_MSG_PUB.Check_Msg_Level
909: (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
910: THEN
911: OE_MSG_PUB.Add_Exc_Msg
912: ( G_PKG_NAME
913: , l_api_name
914: );
915: END IF;
912: ( G_PKG_NAME
913: , l_api_name
914: );
915: END IF;
916: OE_MSG_PUB.Count_And_Get
917: ( p_count => x_msg_count
918: , p_data => x_msg_data
919: );
920: END Add_Attachment;
970:
971: EXCEPTION
972: WHEN OTHERS THEN
973: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
974: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
975: THEN
976: OE_MSG_PUB.Add_Exc_Msg
977: ( G_PKG_NAME
978: , 'Delete_Attachments'
972: WHEN OTHERS THEN
973: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
974: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
975: THEN
976: OE_MSG_PUB.Add_Exc_Msg
977: ( G_PKG_NAME
978: , 'Delete_Attachments'
979: );
980: END IF;