ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 更新保留

更新保留

原创 Linux操作系统 作者:qgw521 时间:2013-07-17 15:37:28 0 删除 编辑

-- Created on 2013-7-8 by ADMINISTRATOR
declare
  -- Local variables here
  l_old_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
  l_new_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
  l_dummy_sn inv_reservation_global.serial_number_tbl_type;
  x_dummy_sn inv_reservation_global.serial_number_tbl_type;
  l_org_id number := 4555;
  l_item_id number := 212959;
  l_header_id number := 3556857; /*mtl_sales_orders.sales_order_id,注意不是oe_order_headers_all.header_id*/
  l_line_id number := 389037;
  l_source_header_id number := 110529;
  l_source_line_id number := 264608; /*po_line_locations.line_location_id*/
  x_qty_reserved number;
  x_reserved_id number;
  x_msg_count number;
  x_return_status varchar2(1);
  x_msg_data varchar2(2000);
begin
  -- Test statements here
     mo_global.init('AR');
    mo_global.set_policy_context('S', 4555);
    fnd_global.apps_initialize(1013475,
                               59166,
                               660);
 
    mo_global.init('ONT');
    oe_msg_pub.initialize;
    l_old_rsv_rec.reservation_id := 4398704;
    l_new_rsv_rec.primary_reservation_quantity := 2;
    l_new_rsv_rec.requirement_date := sysdate;
    inv_reservation_pub.update_reservation(p_api_version_number => 1.0
                                          ,p_init_msg_lst => fnd_api.G_TRUE
                                          ,x_return_status => x_return_status
                                          ,x_msg_count => x_msg_count
                                          ,x_msg_data => x_msg_data
                                          ,p_original_rsv_rec => l_old_rsv_rec
                                          ,p_to_rsv_rec => l_new_rsv_rec
                                          ,p_original_serial_number => l_dummy_sn
                                          ,p_to_serial_number => l_dummy_sn);
      dbms_output.put_line('return status:'||x_return_status);
      dbms_output.put_line('msg count:'||x_msg_count);
      dbms_output.put_line('msg data:'||x_msg_data);                                                             
      
      if x_msg_count > 0 then
        for i in 1 .. x_msg_count loop
          dbms_output.put_line(i||':'||substr(fnd_msg_pub.Get(p_msg_index => i,p_encoded => fnd_api.G_FALSE),1,255));
        end loop;
      end if;                                                                                 
end;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13387766/viewspace-766499/,如需转载,请注明出处,否则将追究法律责任。

上一篇: SO保留PO
下一篇: 创建AR收款
请登录后发表评论 登录
全部评论

注册时间:2008-06-06

  • 博文量
    128
  • 访问量
    278307