使用fnd_gfm包能夠下載EBS系統中的標準附件,下載fnd_lobs表中文件,也可寫入文件。web
1.下載文件sql
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); fnd_utilities.open_url(url); end;
2.寫入文件ide
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); begin db_file :=fnd_gfm.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); end;