800: );
801:
802: If ( (l_usage_type = 'O') AND (l_attached_count <= 1) ) Then
803: -- Call the procedure to delete the attachment and document.
804: fnd_attached_documents3_pkg.delete_row (
805: l_attached_document_id,
806: p_datatype_id,
807: 'Y'
808: );
807: 'Y'
808: );
809: Else
810: -- Call the procedure to delete just the attachment.
811: fnd_attached_documents3_pkg.delete_row (
812: l_attached_document_id,
813: p_datatype_id,
814: 'N'
815: );