701: delete_ref_Flag VARCHAR2 DEFAULT 'N') IS
702: BEGIN
703: -- need to delete in this order for R10-10SC compatibility
704: -- triggers to operate properly
705: -- 1. fnd_attached_documents
706: -- 2. fnd_documents_short_text/long_text/long_raw
707: -- 3. fnd_documents_tl
708: -- 4. fnd_documents
709: -- Delete the Reference if flag set to Y
707: -- 3. fnd_documents_tl
708: -- 4. fnd_documents
709: -- Delete the Reference if flag set to Y
710: IF (delete_ref_flag = 'Y') THEN
711: DELETE FROM fnd_attached_documents
712: WHERE document_id = X_document_id;
713: END IF;
714:
715: -- now go about the business of deleting the document from