Report :使用 fnd_request 函数提交 XML Publisher 报表方法



原文地址:http://blog.sina.com.cn/s/blog_555bad1d0100rgxu.html

1. 首先调用函数 fnd_request.add_layout 来确定输出文件
调用方法: result := fnd_request.add_layout(template_appl_name => :template_appl_name,
                       template_code => :template_code,
                       template_language => :template_language,
                       template_territory => :template_territory,
                       output_format => :output_format,
                       nls_language => :nls_language);
其中 result 为 boolean 类型的变量
template_appl_name 指请求模板对应的应用简称
template_code 指请滶模板的简称,一般与请求的简称相同
template_language 指运行请求时模板的语言,中文为 zh,英文为 us,此参数必需在挂模板时所选的语言范围内
template_territory 指语言对应的区域,中国为 CN
output_format 指报表输出时的格式类型,如 PDF,EXCEL等
nls_language 留空即可
2. 在 result 返回值为 true 时再调用函数 FND_REQUEST.SUBMIT_REQUEST 来正式提交请求
调用方法: ln_request_id := fnd_request.submit_request(application => :application,
                                        program => :program,
                                        description => :description,
                                        start_time => :start_time,
                                        sub_request => sub_request,
                                        argument1..100 => :argument1..100);
其中 ln_request_id 为数值类型的变量
application 指请求对应的应用简称,必须
program 指请求的简称,必须
description 描述,在调用时留空即可
start_time 指请求开始运行的时间,在调用时留空即可,表求即时执行
sub_request 指当前请求是否是子请求,一般在调用时赋值 false,必须
argument1..100 指调用请求时的参数,最多100个,在form中调用时可在最后一个参数后用 chr(0)来表示为最后一个参数,不用写满100个参数,如果在pl/sql中调用则需要写满100个参数---注:参数顺序,必须与EBS中程序定义的参数顺序一致!!
3. 2步执行后如果 ln_request_id > 0 表示提交成功,则需要显性执行 commit 才可最终提交成功
例: procedure CUX_SUBMIT_REQUEST(p_sob_id in number,
                                                       p_com_code in varchar2,
                                                       p_date_f in varchar2,
                                                       p_date_t in varchar2,
                                                         p_je_batch_id in number,
                                                         p_je_header_id in number
                                                                  ) is
  ln_request_id NUMBER;
  exce_occ EXCEPTION;
  b_wait BOOLEAN;
  v_phase VARCHAR2(80);
  v_status VARCHAR2(80);
  v_dev_phase VARCHAR2(80);
  v_dev_status VARCHAR2(80);
  v_message VARCHAR2(80);
BEGIN
  b_wait := fnd_request.add_layout('CUX','CUX0GLJEPTA4','zh','CN','PDF','');
  if b_wait then
    ln_request_id:= FND_REQUEST.SUBMIT_REQUEST(
                      'CUX', 'CUX0GLJEPTA4', '', '', FALSE,
                      p_sob_id,p_com_code ,p_date_f,p_date_t,'','','','','','','',
                      p_je_batch_id,
                      p_je_header_Id,'','Y','N','','',chr(0),'',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','');
     IF ln_request_id = 0 then
      fnd_message.debug('您的请求提交失败');
    else
       fnd_message.debug('您的请求已经提交成功,请求编号为: '||ln_request_id);
    end if;
    COMMIT;
  end if;
end CUX_SUBMIT_REQUEST;

原文地址: http://blog.sina.com.cn/s/blog_555bad1d0100rgxu.html

1. 首先调用函数 fnd_request.add_layout 来确定输出文件
调用方法: result := fnd_request.add_layout(template_appl_name => :template_appl_name,
                       template_code => :template_code,
                       template_language => :template_language,
                       template_territory => :template_territory,
                       output_format => :output_format,
                       nls_language => :nls_language);
其中 result 为 boolean 类型的变量
template_appl_name 指请求模板对应的应用简称
template_code 指请滶模板的简称,一般与请求的简称相同
template_language 指运行请求时模板的语言,中文为 zh,英文为 us,此参数必需在挂模板时所选的语言范围内
template_territory 指语言对应的区域,中国为 CN
output_format 指报表输出时的格式类型,如 PDF,EXCEL等
nls_language 留空即可
2. 在 result 返回值为 true 时再调用函数 FND_REQUEST.SUBMIT_REQUEST 来正式提交请求
调用方法: ln_request_id := fnd_request.submit_request(application => :application,
                                        program => :program,
                                        description => :description,
                                        start_time => :start_time,
                                        sub_request => sub_request,
                                        argument1..100 => :argument1..100);
其中 ln_request_id 为数值类型的变量
application 指请求对应的应用简称,必须
program 指请求的简称,必须
description 描述,在调用时留空即可
start_time 指请求开始运行的时间,在调用时留空即可,表求即时执行
sub_request 指当前请求是否是子请求,一般在调用时赋值 false,必须
argument1..100 指调用请求时的参数,最多100个,在form中调用时可在最后一个参数后用 chr(0)来表示为最后一个参数,不用写满100个参数,如果在pl/sql中调用则需要写满100个参数---注:参数顺序,必须与EBS中程序定义的参数顺序一致!!
3. 2步执行后如果 ln_request_id > 0 表示提交成功,则需要显性执行 commit 才可最终提交成功
例: procedure CUX_SUBMIT_REQUEST(p_sob_id in number,
                                                       p_com_code in varchar2,
                                                       p_date_f in varchar2,
                                                       p_date_t in varchar2,
                                                         p_je_batch_id in number,
                                                         p_je_header_id in number
                                                                  ) is
  ln_request_id NUMBER;
  exce_occ EXCEPTION;
  b_wait BOOLEAN;
  v_phase VARCHAR2(80);
  v_status VARCHAR2(80);
  v_dev_phase VARCHAR2(80);
  v_dev_status VARCHAR2(80);
  v_message VARCHAR2(80);
BEGIN
  b_wait := fnd_request.add_layout('CUX','CUX0GLJEPTA4','zh','CN','PDF','');
  if b_wait then
    ln_request_id:= FND_REQUEST.SUBMIT_REQUEST(
                      'CUX', 'CUX0GLJEPTA4', '', '', FALSE,
                      p_sob_id,p_com_code ,p_date_f,p_date_t,'','','','','','','',
                      p_je_batch_id,
                      p_je_header_Id,'','Y','N','','',chr(0),'',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','',
                       '','','','','','','','','','');
     IF ln_request_id = 0 then
      fnd_message.debug('您的请求提交失败');
    else
       fnd_message.debug('您的请求已经提交成功,请求编号为: '||ln_request_id);
    end if;
    COMMIT;
  end if;
end CUX_SUBMIT_REQUEST;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值