Oracle EBS Attachment download feature

Source: Internet
Author: User


Attachment Download Function
Using the Fnd_lobs table in conjunction with the FND_GFM package to download files, you can download files that already exist in the Fnd_lobs table, or you can manually write some content into the Fnd_lobs table, and then display in the browser:
--1. Download the existing files in the fnd_lobs table:
DECLARE
V_file_id NUMBER;
Url VARCHAR2 (500);
The BEGIN
--Get the file_id of the file which you want to download in fnd_lobs
V_file_id: = XXXXXX;
- Get The Download URL
Url: = fnd_gfm. Construct_download_url (fnd_web_config gfm_agent,
V_file_id,
TRUE);
Fnd_utilities. Open_url (url);
The END;
--2. Manually write contents into the fnd_lobs table and display in the browser: DECLARE db_file NUMBER;
Mime_type VARCHAR2(255) := 'text/plain';
Out_string VARCHAR2(32767) := 'Just some plain text that is stored';
Web_server_prefix VARCHAR2 (500);
Url VARCHAR2 (500);
The BEGIN
Db_file := fnd_gmm.file_create (content_type => mime_type,
Program_name = > "export");
Fnd_gfm. File_write_line (db_file out_string);
Db_file: = fnd_gfm file_close (db_file);
Url: = fnd_gfm. Construct_download_url (fnd_web_config gfm_agent,
Db_file,
TRUE);
Fnd_utilities. Open_url (url);
The END;


Oracle EBS Attachment download feature


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.