809: BEGIN
810:
811: l_progress := '002';
812: SELECT DISTINCT fl.file_id INTO p_media_id
813: FROM fnd_lobs fl,fnd_attached_documents fad
814: WHERE
815: fad.pk1_value = TO_CHAR(p_document_id) and
816: fad.pk2_value = TO_CHAR(p_revision_number) and
817: fad.entity_name = l_entity_name AND
893: null,
894: 'binary');
895:
896: l_progress := '007';
897: INSERT INTO fnd_attached_documents (
898: attached_document_id,
899: document_id,
900: creation_date,
901: created_by,
931: attribute14,
932: attribute15,
933: column1)
934: VALUES
935: (fnd_attached_documents_s.nextval,
936: l_document_id_tmp,
937: sysdate,
938: 1,--NVL(X_created_by,0),
939: sysdate,