DECLARE
l_result NUMBER;
l_progress NUMBER;
l_errors PO_API_ERRORS_REC_TYPE;
l_chg PO_CHANGES_REC_TYPE;
l_shipment_changes PO_SHIPMENTS_REC_TYPE;
l_return_status VARCHAR2(30); BEGIN fnd_global.apps_initialize(user_id => &user_id,-- This function execution is required before launching the approval work flow.
resp_id => &responsibility_id,
resp_appl_id => &resp_application_id); --to set org context in a R12 env
mo_global.set_policy_context ('S', &org_id); -- Create an Object for Changes
-- po_changes_rec_type constructor takes either po_header_id OR po_release_id to construct the object.
-- In case of purchase order pass po_release_id as NULL. l_chg := po_changes_rec_type.Create_object(p_po_header_id => <header id>, p_po_release_id => <release id>); -- Add a Line Changes to the Change Object
l_chg.line_changes.add_change(p_po_line_id => <po line id>, p_quantity => <value>); -- Add Shipment Changes to the Change Object
l_chg.shipment_changes.add_change(p_po_line_location_id => <line location id>, p_quantity => <value>); -- Add Distribution Level Changes
l_chg.distribution_changes.add_change(p_po_distribution_id => <po distribution id>, p_quantity_ordered => <value>); -- Now call the change api to execute the above changes
PO_DOCUMENT_UPDATE_GRP.UPDATE_DOCUMENT(p_api_version => 1.0,-- pass this as 1.0
p_init_msg_list => fnd_api.G_TRUE,-- pass this as TRUE
x_return_status => l_return_status,-- returns the result of execution
p_changes => l_chg,-- changes obj. contains all changes intended to be made on document
p_run_submission_checks => fnd_api.G_FALSE,-- set to TRUE if want to perform submission check
p_launch_approvals_flag => fnd_api.G_TRUE,-- set to TRUE if want to launch approval work flow after making the changes
p_buyer_id => NULL,-- buyer id
p_update_source => NULL, -- name of a source who is calling this API. In case of manual call can be passed as NULL
p_override_date => NULL,
x_api_errors => l_errors,-- list of errors if any occurred in execution
p_mass_update_releases => NULL); IF l_errors IS NOT NULL THEN FOR i IN 1.. l_errors.message_text.COUNT LOOP
dbms_output.Put_line(' Error is ' || l_errors.Message_text(i) || ' - name' || l_errors.Message_name(i));
END LOOP;
END IF; COMMIT; EXCEPTION WHEN OTHERS THEN
dbms_output.Put_line('error :' || sqlerrm); END;

Oracle EBS PO采购订单更新的更多相关文章

  1. 转:oracle ebs po模块一揽子采购协议小结

    转自:http://yedward.net/?id=193 oracle ebs po模块一揽子采购协议小结 本文总结oracle ebs采购订单(po)模块一揽子采购协议的相关知识,总结如下: 1. ...

  2. Oracle EBS-SQL (PO-5):采购订单控制信息查询.sql

    select distinct pla.po_header_id, --pha.type_lookup_code, pha.segment1       采购订单号, appf.full_name   ...

  3. Oracle EBS PO 接收事务处理查不到对应的数据

    1. 有一种情况是采购订单的借记账户不对 不匹配OU 2. 有可能是因为接口表卡住了 PENDING状态的把对应的数据删除掉即可  3. 接收时发生异常那个,丢失了接收头,rcv_shipment_h ...

  4. Oracle EBS - PO Approval

    PO Approval Except Standard Flow: 1. Personal setting

  5. Oracle EBS PO 收接事处理状态待定或错误

    PO接收后,发现在没有接收成功.在"事务处理状态汇总"查找到不是"待定"就是"错误",如下图:   对于事务处理状态"待定&quo ...

  6. Oracle EBS PO退货失败

    无法读取例程 &ROUTINE 中配置文件选项 INV_DEBUG_TRACE 的值. 系统-配置文件-地点层 INC%调试%踪 是 select *  from po_interface_e ...

  7. Oracle EBS发放销售订单

     模拟发放销售订单界面进行发放操作 PROCEDURE insert_row(x_batch_id OUT NUMBER) IS l_autopack_flag VARCHAR2(1 ); l_a ...

  8. Oracle EBS PO rcv_shipment_headers 数据缺失

    Datafix : How to Recreate Missing Receipt or Shipment Header Records (RCV_SHIPMENT_HEADERS table) (D ...

  9. Oracle EBS OM 发放订单

    DECLARE l_header_rec OE_ORDER_PUB.Header_Rec_Type; l_line_tbl OE_ORDER_PUB.Line_Tbl_Type; l_action_r ...

随机推荐

  1. Android Studio打开项目提示找不到sdk路径的问题。

    问题如图: 这是由于所打开的项目不是本机创建的,所使用的sdk路径不一致所导致. 解决方案: 打开项目所在目录,找到local.properties文件并打开,发现sdk.dir=D\:\\Andro ...

  2. 【转】JVM(Java虚拟机)优化大全和案例实战

    原文地址:http://blog.csdn.net/kthq/article/details/8618052 堆内存设置 原理 JVM堆内存分为2块:Permanent Space 和 Heap Sp ...

  3. jquery获取input的checked属性

    1.经常需要判断某个按钮是否被选中. 2.基于jquery. <!DOCTYPE html> <html lang="en"> <head> & ...

  4. 2-nginx 安装

    1, nginx简介: •Nginx("engine x") 是一个高性能的HTTP 和反向代理服务器,也是一个IMAP/POP3/SMTP 代理服务器.•第一个公开版本0.1.0 ...

  5. 3-nginx.conf参数配置

    –#定义Nginx运行的用户和用户组 –user www www; –#nginx进程数,建议设置为等于CPU总核心数. –worker_processes8; –#全局错误日志定义类型,[ debu ...

  6. Beta阶段——Scrum 冲刺博客第四天

    一.当天站立式会议照片一张 二.每个人的工作 (有work item 的ID),并将其记录在码云项目管理中 昨天已完成的工作 完成对question界面的制作,完善随机出题界面,能够流畅的切换下一题与 ...

  7. 百度前端技术学院-task1.8源代码

    主要是不采用bootstrap实现网格. 遇到的困难及注意点如下: 1.[class*='col-'],这个是选择col-开头的类,第一次用,以前也只是看到过: 2.媒体查询,总觉得容易理解错误.@m ...

  8. Node.js之Express一

    前面也了解了HTTP模块,但它并不支持session.cookie等.Express是对HTTP模块的封装,同时也支持session这些,使用起来也更好用.Express更有点像IIS服务器.它也是属 ...

  9. Head First Python学习笔记1

    # 递归 def recursion(movies): for item in movies: # isinstance是一个判断类型的函数 if isinstance(item,list): rec ...

  10. winform:对dataGridView绑定的泛型List<T> 的简单CRUD

      创建对象类,为所有成员封装字段,然后重载该类: 根据已有的对象类(类型参数)创建一个长度可以变化的List数组,并绑定数据源: 设置dataGridView的column属性:对应四个对象类创建相 ...