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. JAVA 垃圾笔记一溜堆

    精度只能从低精度 转到高精度.例如:float = 3.4;错误 默认小数在JAVA中是double. 即:从double高精度转到floag低精度错误!!将字符char加减乘除,默认对ASCII码运 ...

  2. Nginx配置访问权限

    基于IP配置Nginx的访问权限 Nginx配置通过两种途径支持基本访问权限的控制,其中一种是由HTTP标准模块ngx_http_access_module支持的,通过IP来判断客户端是否拥有对Ngi ...

  3. 使用epublib解析epub文件(章节内容、书籍菜单)

    链接地址https://blog.csdn.net/sonnyching/article/details/47407549

  4. R语言运算符

    运算符是一个符号,它告诉编译器执行特定的数学或逻辑操作. R语言丰富的内置运算符,并提供以下类型的运算符. 运算符类型 在R编程中有以下类型的运算符 - 算术运算符 关系运算符 逻辑运算符 赋值运算符 ...

  5. redis 安装 与错误解决办法

    redis 安装与安装中遇到的错误 redis 安装 wget http://download.redis.io/releases/redis-4.0.11.tar.gz .tar.gz cd red ...

  6. C和C++结构体的区别

    C的结构体内不允许有函数存在,C++允许有内部成员函数,且允许该函数是虚函数.所以C的结构体是没有构造函数.析构函数.和this指针的. C的结构体对内部成员变量的访问权限只能是public,而C++ ...

  7. LeetCode【第1题】Two Sum

    准备刷一刷LeetCode了. 题目: ''' Given an array of integers, return indices of the two numbers such that they ...

  8. 用imageMagick合成图片添加图片水印

    用imageMagick合成图片的方式大致有三种, 使用convert命令加 +append或-append参数 使用convert命令加 -composite参数 直接使用composite命令来完 ...

  9. ios10系统以下原生传来的base64图片无法转化为二进制

    最近在做和原生ios交互上传图片的时候,遇到原生传来的以base64图片位无法转化为二进制.因为前端上传图片的方式是以二进制的方式上传,在ios10 和安卓上,上传图片是可以的:在ios10以下,可以 ...

  10. 问题集录--Java高级软件工程师面试考纲(转)

    如果要应聘高级开发工程师职务,仅仅懂得Java的基础知识是远远不够的,还必须懂得常用数据结构.算法.网络.操作系统等知识.因此本文不会讲解具体的技术,笔者综合自己应聘各大公司的经历,整理了一份大公司对 ...