FORM Export

liangxichen發表於2009-12-28

BEGIN
web_server_prefix := fnd_web_config.gfm_agent;
mime_type := nvl(fnd_profile.VALUE('FND_EXPORT_MIME_TYPE'),
'text/tab-separated-values');
db_file := fnd_gfm.file_create(content_type => mime_type,
program_name => 'export');
v_record_num := :system.cursor_record;
go_block('PO_RULE');
first_record;
LOOP
EXIT WHEN system.last_query = TRUE;
outstring := 輸入你要的資料;
fnd_gfm.file_write_line(db_file,
output_string);
next_record;
END LOOP;
go_record(v_record_num);
db_file := fnd_gfm.file_close(db_file);
url := fnd_gfm.construct_download_url(web_server_prefix,
db_file,
TRUE);
fnd_utilities.open_url(url);
END;


app_export.event('EXPORT');
自己寫最多再在前面加個:go_block('xxx');

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/59792/viewspace-1030072/,如需轉載,請註明出處,否則將追究法律責任。

相關文章