Recently I have been working on a workflow project, the end-user requirements to send a message when the attachment can be attached, this is a problem for me.
On the Internet to check the Oracle upload data, found Mr. Huang predecessors wrote "Oracle EBS Forms Development Guide (Intermediate)" Information about the contents of the development of accessories, really have to admire the Mr. Huang predecessors of the bad AH.
At the end of the day, as described in the Oracle EBS Forms Development Guide (intermediate), you can easily implement the functionality of adding attachments to a customized form, so now that you have uploaded the functionality, how do I implement the uploaded file and now come down when the final user wants to see the attachment? This is a problem for me, this problem also stuck me for a few days, but at the time I comes I uploaded the file in the Fnd_lobs table as BLOB data stored in the form, now to the BLOB data in the format of the original file read out, and to provide the end user with the ability to download the file, On the Internet really find this method, really thank the predecessors to share their results.
Here's how:
DECLARE
v_file_id NUMBER;
url VARCHAR2(500);
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);
END;
The above method can be easily implemented to download files stored in the Fnd_lobs, as long as the fnd_gfm.construct_download_url in the Fnd_lobs table file file_id, you can easily get the URL, using Fnd_ Utilities.open_url can download the file. But now there is a problem is to send messages in the workflow to find a thing (such as a button, hyperlink) to execute the method of downloading files, consult the consultant did not get a better method, but had to hard head enough to try, After several attempts to find a attribute in the document type can be set a hyperlink, and then let the hyperlink address to the URL of the downloaded file I have obtained, the problem is finally resolved.
Resources:
Oracle EBS upload and download files (RPM)
Oracle EBS upload and download files (RPM)