使用fnd_gfm包可以下载EBS系统中的标准附件,下载fnd_lobs表中文件,也可写入文件。

1.下载文件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.写入文件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;

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐