报表开发 进入PL SQL Developer开发工具后 1. 登录服务器 2. 如果要进行SQL 语句测试 1)点击File->New ->SQL Window s 即可进入命令窗口 2)输入标准SQL 语句,点击第二行工具条中的齿轮型图标(运行)即可运行查询语句 3)如果被查询的对象不是一个table,而是一个view ,必须在select 语句前输入以下语句,才能查询出数据。 begin mo_global.set_policy_context('S',86); end; 注意:上述语句中,S 字母必须大写,后面的数字是Oracle 系统中的组织 ID 号,不同的ou,另外要运行查询还必须遵循一定的方法和步骤 比如,下图的语句 步骤一、 如下图,先选中蓝色区域的一段代码,然后点击运行。 步骤二、再选中自己写好的select 语句,点击运行才能看到数据。 3 、如果要进行报表开发 1) 点击 File –> New -> Command Window 即可进入报表开发命令行窗口 然后就可输入各种命令了,修改原来的程序用 edit ,而 oracle 中自主开发的东西都以 cux 开头。 2)输入 edit cux_ap_invoice_detail_pkg ,点击回车即可看到如下界面 4 、报表程序结构分析 create or replace package body CUX_AP_INVOICE_DETAIL_PKG is -- author : shawn.liu -- created : 2010/08/03 16:53:46 -- purpose : 应付款明细账 -- public type declarations gc_sob_id number := fnd_profile.value('GL_SET_OF_BKS_ID'); function get_flex_desc(p_value_set_name in varchar2, p_flex_value in varchar2) return varchar2 is v_description varchar2(240):= null; begin select trim(replace(ffv.description,'&','_')) into v_description from fnd_flex_values_vl ffv,fnd_flex_value_sets ffs where ffs.flex_value_set_name = p_value_set_name and ffs.flex_value_set_id = ffv.flex_value_set_id and ffv.enabled_flag='Y' and ffv.flex_value = p_flex_value; return v_description; exception when others then return null; end; procedure outlog(i_chr_message in varchar2) is begin fnd_file.put_line(fnd_file.log, i_chr_message); end; procedure output(i_chr_message in varchar2) as begin fnd_file.put_line(fnd_file.output, i_chr_message); end; procedure main(errbuf out varchar2, retco...