687: ) as
688:
689: cursor filename_cursor (l_attached_document_id varchar2) is
690: select dt.file_name, dt.media_id
691: from fnd_attached_documents ad, fnd_documents_tl dt
692: where ad.document_id = dt.document_id
693: and ad.attached_document_id = to_number(l_attached_document_id);
694:
695: l_url varchar2(255);
927:
928: -- Commit the transaction
929: commit;
930:
931: -- After the data is inserted into fnd_attached_documents, fnd_documents and
932: -- fnd_documents_tl table using the above procedure we get the media_id
933: -- which will be used to insert the text into fnd_document_short_text table.
934: if (to_number(datatype_id) = 2 ) then -- Text Datatype
935: INSERT INTO fnd_documents_long_text(
928: -- Commit the transaction
929: commit;
930:
931: -- After the data is inserted into fnd_attached_documents, fnd_documents and
932: -- fnd_documents_tl table using the above procedure we get the media_id
933: -- which will be used to insert the text into fnd_document_short_text table.
934: if (to_number(datatype_id) = 2 ) then -- Text Datatype
935: INSERT INTO fnd_documents_long_text(
936: media_id,
931: -- After the data is inserted into fnd_attached_documents, fnd_documents and
932: -- fnd_documents_tl table using the above procedure we get the media_id
933: -- which will be used to insert the text into fnd_document_short_text table.
934: if (to_number(datatype_id) = 2 ) then -- Text Datatype
935: INSERT INTO fnd_documents_long_text(
936: media_id,
937: long_text) VALUES (
938: l_media_id,
939: text);
940:
941: -- Commit the transaction
942: commit;
943: elsif (to_number(datatype_id) = 1 ) then -- Short text Type Documents.
944: INSERT INTO fnd_documents_short_text(
945: media_id,
946: short_text) VALUES (
947: l_media_id,
948: text);
1183:
1184: -- Commit the transaction.
1185: commit;
1186:
1187: -- When the text is altered the the fnd_documents_short_text
1188: -- needs to be updated. When the file type is altered we have to
1189: -- upload the file.
1190: if (datatype_id = 1 ) then -- Short Text Datatype
1191: UPDATE fnd_documents_short_text
1187: -- When the text is altered the the fnd_documents_short_text
1188: -- needs to be updated. When the file type is altered we have to
1189: -- upload the file.
1190: if (datatype_id = 1 ) then -- Short Text Datatype
1191: UPDATE fnd_documents_short_text
1192: set short_text = text
1193: where media_id = l_media_id;
1194:
1195: -- Commit the transaction.
1195: -- Commit the transaction.
1196: commit;
1197:
1198: elsif (datatype_id = 2 ) then -- Long Text Document
1199: UPDATE fnd_documents_long_text
1200: set long_text = text
1201: where media_id = l_media_id;
1202:
1203: -- Commit the transaction.
1752:
1753: -- Find out the datatype of text being displayed.
1754: select fd.datatype_id
1755: into l_datatype_id
1756: from fnd_documents fd, fnd_attached_documents fad
1757: where fd.document_id = fad.document_id
1758: and fad.attached_document_id = to_number(l_attached_document_id);
1759:
1760: -- Get the document text for the attachment.
1761: if (l_datatype_id = 2) then
1762: select fdfv.seq_num, fdfv.category_description,
1763: fdfv.document_description, fdlt.long_text
1764: into l_seq_num,l_category_description,l_document_description,l_text
1765: from fnd_attached_docs_form_vl fdfv, fnd_documents_long_text fdlt
1766: where fdfv.media_id = fdlt.media_id
1767: and fdfv.attached_document_id = to_number(l_attached_document_id)
1768: and fdfv.function_name = l_function_name
1769: and fdfv.function_type = 'F';
1770: else
1771: select fdfv.seq_num, fdfv.category_description,
1772: fdfv.document_description, fdst.short_text
1773: into l_seq_num,l_category_description,l_document_description,l_text
1774: from fnd_attached_docs_form_vl fdfv, fnd_documents_short_text fdst
1775: where fdfv.media_id = fdst.media_id
1776: and fdfv.attached_document_id = to_number(l_attached_document_id)
1777: and fdfv.function_name = l_function_name
1778: and fdfv.function_type = 'F';
2058: -- Query the text from the database.
2059: if (x_datatype_id = 1 ) then
2060: select short_text
2061: into document_short_text
2062: from fnd_documents_short_text
2063: where media_id = x_media_id;
2064:
2065: -- Display the blank text information for Update.
2066: DocumentInformation (x_datatype_id => x_datatype_id,
2068:
2069: elsif (x_datatype_id = 2) then
2070: select long_text
2071: into document_long_text
2072: from fnd_documents_long_text
2073: where media_id = x_media_id;
2074:
2075: -- Display the blank text information for Update.
2076: DocumentInformation (x_datatype_id => x_datatype_id,