PURPOSE:

This post is to provide a sample script to Release a hold on sales order using an API OE_ORDER_PUB.PROCESS_ORDER.

TEST INSTANCE:  R12.1.1

SCRIPT:

DECLARE

v_api_version_number           NUMBER  := 1;

v_return_status                VARCHAR2 (2000);

v_msg_count                    NUMBER;

v_msg_data                     VARCHAR2 (2000);

-- IN Variables --

v_header_rec                   oe_order_pub.header_rec_type;

v_line_tbl                     oe_order_pub.line_tbl_type;

v_action_request_tbl           oe_order_pub.request_tbl_type;

v_line_adj_tbl                 oe_order_pub.line_adj_tbl_type;

-- OUT Variables --

v_header_rec_out               oe_order_pub.header_rec_type;

v_header_val_rec_out           oe_order_pub.header_val_rec_type;

v_header_adj_tbl_out           oe_order_pub.header_adj_tbl_type;

v_header_adj_val_tbl_out       oe_order_pub.header_adj_val_tbl_type;

v_header_price_att_tbl_out     oe_order_pub.header_price_att_tbl_type;

v_header_adj_att_tbl_out       oe_order_pub.header_adj_att_tbl_type;

v_header_adj_assoc_tbl_out     oe_order_pub.header_adj_assoc_tbl_type;

v_header_scredit_tbl_out       oe_order_pub.header_scredit_tbl_type;

v_header_scredit_val_tbl_out   oe_order_pub.header_scredit_val_tbl_type;

v_line_tbl_out                 oe_order_pub.line_tbl_type;

v_line_val_tbl_out             oe_order_pub.line_val_tbl_type;

v_line_adj_tbl_out             oe_order_pub.line_adj_tbl_type;

v_line_adj_val_tbl_out         oe_order_pub.line_adj_val_tbl_type;

v_line_price_att_tbl_out       oe_order_pub.line_price_att_tbl_type;

v_line_adj_att_tbl_out         oe_order_pub.line_adj_att_tbl_type;

v_line_adj_assoc_tbl_out       oe_order_pub.line_adj_assoc_tbl_type;

v_line_scredit_tbl_out         oe_order_pub.line_scredit_tbl_type;

v_line_scredit_val_tbl_out     oe_order_pub.line_scredit_val_tbl_type;

v_lot_serial_tbl_out           oe_order_pub.lot_serial_tbl_type;

v_lot_serial_val_tbl_out       oe_order_pub.lot_serial_val_tbl_type;

v_action_request_tbl_out       oe_order_pub.request_tbl_type;

BEGIN

DBMS_OUTPUT.PUT_LINE('Starting of script');

-- Setting the Enviroment --

fnd_global.apps_initialize (user_id        => 1450,

resp_id        => 50675,

resp_appl_id   => 700);

oe_msg_pub.initialize;

mo_global.set_org_context (p_org_id_char       => 81,

p_sp_id_char        => null,

p_appl_short_name   => 'ONT');

--This is to Release hold an order header

v_action_request_tbl (1)              := oe_order_pub.g_miss_request_rec;

v_action_request_tbl (1).entity_id    := 333351; -- Header ID of the order

v_action_request_tbl (1).entity_code  := OE_GLOBALS.G_ENTITY_HEADER;

v_action_request_tbl (1).request_type := OE_GLOBALS.G_RELEASE_HOLD;

v_action_request_tbl (1).param1       := 1041;    -- hold_id

v_action_request_tbl (1).param2       := 'O';   -- indicator that it is an order hold

v_action_request_tbl (1).param3       := 333351; -- Header ID of the order

v_action_request_tbl (1).param4       := 'AR_AUTOMATIC'; -- Release Reason Code

/*

--This is to Release hold an order line

v_action_request_tbl (1)              := oe_order_pub.g_miss_request_rec;

v_action_request_tbl (1).entity_id    := 286897; -- LINE ID of the order

v_action_request_tbl (1).entity_code  := OE_GLOBALS.G_ENTITY_LINE;

v_action_request_tbl (1).request_type := OE_GLOBALS.G_RELEASE_HOLD;

v_action_request_tbl (1).param1       := 1041;    -- hold_id

v_action_request_tbl (1).param2       := 'O';   -- indicator that it is an order hold

v_action_request_tbl (1).param3       := 286897; -- LINE ID of the order

v_action_request_tbl (1).param4       := 'AR_AUTOMATIC'; -- Release Reason Code

*/

DBMS_OUTPUT.PUT_LINE('Starting of API');

-- Calling the API to Release hold on Existing Order --

oe_order_pub.process_order (

p_api_version_number            => v_api_version_number

, p_header_rec                  => v_header_rec

, p_line_tbl                    => v_line_tbl

, p_action_request_tbl          => v_action_request_tbl

, p_line_adj_tbl                => v_line_adj_tbl

-- OUT variables

, x_header_rec                  => v_header_rec_out

, x_header_val_rec              => v_header_val_rec_out

, x_header_adj_tbl              => v_header_adj_tbl_out

, x_header_adj_val_tbl          => v_header_adj_val_tbl_out

, x_header_price_att_tbl        => v_header_price_att_tbl_out

, x_header_adj_att_tbl          => v_header_adj_att_tbl_out

, x_header_adj_assoc_tbl        => v_header_adj_assoc_tbl_out

, x_header_scredit_tbl          => v_header_scredit_tbl_out

, x_header_scredit_val_tbl      => v_header_scredit_val_tbl_out

, x_line_tbl                    => v_line_tbl_out

, x_line_val_tbl                => v_line_val_tbl_out

, x_line_adj_tbl                => v_line_adj_tbl_out

, x_line_adj_val_tbl            => v_line_adj_val_tbl_out

, x_line_price_att_tbl          => v_line_price_att_tbl_out

, x_line_adj_att_tbl            => v_line_adj_att_tbl_out

, x_line_adj_assoc_tbl          => v_line_adj_assoc_tbl_out

, x_line_scredit_tbl            => v_line_scredit_tbl_out

, x_line_scredit_val_tbl        => v_line_scredit_val_tbl_out

, x_lot_serial_tbl              => v_lot_serial_tbl_out

, x_lot_serial_val_tbl          => v_lot_serial_val_tbl_out

, x_action_request_tbl          => v_action_request_tbl_out

, x_return_status               => v_return_status

, x_msg_count                   => v_msg_count

, x_msg_data                    => v_msg_data

);

DBMS_OUTPUT.PUT_LINE('Completion of API');

IF v_return_status = fnd_api.g_ret_sts_success THEN

COMMIT;

DBMS_OUTPUT.put_line ('Releasing Hold on Sales Order is Success ');

ELSE

DBMS_OUTPUT.put_line ('Releasing Hold on Sales Order failed:'||v_msg_data);

ROLLBACK;

FOR i IN 1 .. v_msg_count

LOOP

v_msg_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');

dbms_output.put_line( i|| ') '|| v_msg_data);

END LOOP;

END IF;

FOR i IN 1 .. v_msg_count

LOOP

v_msg_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');

dbms_output.put_line( i|| ') '|| v_msg_data);

END LOOP;

END;

来自 <http://www.shareoracleapps.com/2010/06/oe-order-pub-process-order-to-release.html>

OE_ORDER_PUB.PROCESS_ORDER to Release a hold on sales order in R12的更多相关文章

  1. OE_ORDER_PUB.PROCESS_ORDER to Apply hold on a sales order

    PURPOSE: This post is to provide a sample script to Apply hold on a sales order using an API OE_ORDE ...

  2. RMA Sales Order – Stuck with “Awaiting Return Disposition”

    RMA Sales Order – Stuck with "Awaiting Return Disposition"                     Action : (P ...

  3. RMA Sales Order – Stuck with “Awaiting Return Disposition”

    RMA Sales Order – Stuck with “Awaiting Return Disposition” Action : (Prod) ð  Login to Unix ð  su – ...

  4. magento app/design/adminhtml/default/default/template/sales/order/view/info.phtml XSS Vul

    catalogue . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 Relevant Link: http://www.freebuf. ...

  5. 转:Internal Sales Order (ISO) Process Flow

    本文介绍下内部销售订单Internal Sales Order(ISO)在Oracle EBS中的流程,内部销售订单和组织间转移(Inter-Organization Transfer,IOT)的作用 ...

  6. SAP Cloud for Customer里Sales Order和Sales Quote的建模方式

    SAP Cloud for Customer的Sales工作中心里有Sales Quote和Sales Order两个视图,一个用于销售报价单,另一个用于销售订单. 流程上是先有报价单 ,报价单是一份 ...

  7. SAP Cloud for Customer Sales Order Requested Date的业务含义和实现

    我们在创建Sales order销售订单时,需要指定一个RequestedDate: 这个字段绑定到了BO字段:CustomerQuote.RequestedFulfillmentPeriod.Tim ...

  8. ABAP术语-Sales Order

    Sales Order 原文:http://www.cnblogs.com/qiangsheng/archive/2008/03/14/1104979.html A customer request ...

  9. 使用ABAP代码创建S/4HANA里的Sales Order

    下图是使用ABAP代码创建的S/4HANA的Sales Order的截图: 其中红色区域的值是我代码里硬编码的,而蓝色是函数SD_SALESDOCUMENT_CREATE自己创建的. 来看下代码: D ...

随机推荐

  1. HDU 6186 CS Course 前缀和,后缀和

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6186 题意:给了n个数,然后有q个查询,每个查询要求我们删掉一个数,问删掉这个数后整个序列的与值,或值 ...

  2. [ Python ] 基本数据类型及属性(下篇)

    1. 基本数据类型 (1) list 列表     (2) tuple 元组     (3) dict 字典     (4) set 集合 2. list 列表方法 Python 内置的一种数据类型, ...

  3. jdbc简单小登陆demo

    package com.test; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultS ...

  4. python在windows下连接mysql数据库

    一,安装MySQL-python python 连接mysql数据库需要 Python interface to Mysql包,包名为 MySQL-python ,PyPI上现在到了1.2.5版本.M ...

  5. 从零开始,学习web前端之HTML5开发

    什么是HTML5 HTML5是HTML最新的修订版本,2014年10月由万维网联盟(W3C)完成标准制定.是下一代 HTML 标准. 为什么要学习HTML5 HTML5定义了一系列新元素,如新语义标签 ...

  6. swiper使用心得

    引入: <link rel="stylesheet" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.m ...

  7. 【Numpy】python机器学习包Numpy基础知识学习

    一.安装:在之前的博客中已经写过:http://www.cnblogs.com/puyangsky/p/4763234.html 二.python数组切片知识: python中序列类有list.str ...

  8. C++中template的.h文件和.cpp文件的问题

    在C++中,用到类模板时,如果类似一般的类声明定义一样,把类声明放在.h文件中,而具体的函数定义放在.cpp文件中的话,会发现编译器会报错.如类似下面代码: //test.h文件 #ifndef TE ...

  9. Visual Studio Xamarin提示Bonjour backend初始化失败

    Visual Studio Xamarin提示Bonjour backend初始化失败 错误信息:The Bonjour backend failed to initialize, automatic ...

  10. 【ZJOI2017】线段树

    题目描述 线段树是九条可怜很喜欢的一个数据结构,它拥有着简单的结构.优秀的复杂度与强大的 功能,因此可怜曾经花了很长时间研究线段树的一些性质. 最近可怜又开始研究起线段树来了,有所不同的是,她把目光放 ...