加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

OracleEBSFA重分类API调用示例

(2020-03-04 15:27:14)
标签:

fa重分类

fa_reclass_pub.do_re

分类: OracleEBS财务模块

Oracle EBS FA重分类API 调用示例

 

fa_reclass_pub.do_reclass

 

 

 

declare
   l_trans_rec                FA_API_TYPES.trans_rec_type;
   l_asset_hdr_rec            FA_API_TYPES.asset_hdr_rec_type;
   l_asset_cat_rec_new        FA_API_TYPES.asset_cat_rec_type;
   l_recl_opt_rec             FA_API_TYPES.reclass_options_rec_type;
   l_return_status            VARCHAR2(1);
   l_mesg_count               number;
   l_mesg                     varchar2(512);
begin
   dbms_output.enable(1000000);
   FA_SRVR_MSG.Init_Server_Message;
   l_asset_hdr_rec.asset_id   := &asset_id;
   l_asset_cat_rec_new.category_id  := &new_category_id;
   l_recl_opt_rec.copy_cat_desc_flag   := UPPER(substr('&copy_category_desc_YES_NO',1,3));   -- Y
   l_recl_opt_rec.redefault_flag       := UPPER(substr('&redefault_deprn_rules_YES_NO',1,3));    -- N
fa_reclass_pub.do_reclass (
                          -- std parameter
                          p_api_version => 1.0,
                          p_init_msg_list => FND_API.G_FALSE,
                          p_commit        => FND_API.G_FALSE,
                          p_validation_level => FND_API.G_VALID_LEVEL_FULL,
                          p_calling_fn       => NULL,
                          x_return_status    => l_return_status,
                          x_msg_count    =>l_mesg_count,
                          x_msg_data     =>l_mesg,
           -- api parameters
                          px_trans_rec   => l_trans_rec,
                          px_asset_hdr_rec  => l_asset_hdr_rec,
                          px_asset_cat_rec_new => l_asset_cat_rec_new,
                          p_recl_opt_rec       =>l_recl_opt_rec );
   --dump messages
   l_mesg_count := fnd_msg_pub.count_msg;
   if l_mesg_count > 0 then
      l_mesg := chr(10) || substr(fnd_msg_pub.get(fnd_msg_pub.G_FIRST, fnd_api.G_FALSE),1, 250);
       dbms_output.put_line(l_mesg);
       for i in 1..(l_mesg_count - 1) loop
           l_mesg := substr(fnd_msg_pub.get(fnd_msg_pub.G_NEXT,fnd_api.G_FALSE), 1, 250);
           dbms_output.put_line(l_mesg);
        end loop;
        fnd_msg_pub.delete_msg();
    end if;
    if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
      dbms_output.put_line('FAILURE');
    else
      dbms_output.put_line('SUCCESS');
      dbms_output.put_line('THID' || to_char(l_trans_rec.transaction_header_id));
    end if;
end;

 

在PLSQL SQL窗口中执行即可看到结果

记得COMMIT;

 

-- 刘轶鹤

 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有