In this Document

Goal
  Solution
  References

APPLIES TO:

Oracle Advanced Pricing - Version 11.5.10 and later

Information in this document applies to any platform.

GOAL

This note describes how the QP_PREQ_PUB.PRICE_REQUEST API can be called to obtain the Price of an item.

SOLUTION

The following is an example of how the QP_PREQ_PUB.PRICE_REQUEST API can be called to obtain the Price of an item

Examples described in this note will use the following attributes - this has been tested using data set up in a Vision instance. You will need to change data as appropriate to your environment.

NB - is important to ensure that the pricing phase on the modifier line matches the pricing event used when calling the API.

For example if the pricing phase on the modifier is -- All Line Adjustments then to apply the modifier -- p_control_rec.pricing_event :='BATCH'; or alternatively change the pricing phase to -- List Line adjustments (note that setting the phase to the value
will cause the pricing engine to update the price whenever the order line is changed and may have an impact on performance).

Pricing Attributes

1. Item priced is Inventory Item ID - 307627

Qualifier Attributes

1. Price List is Price List ID - 54824

2. Customer is Customer ID - 16071

A Modifier has been created where:

1. The Modifier is qualified at Header Level by the Customer ID - 16071

2. The Line on the modifier is qualified by pricing attribute - Inventory Item is 307627

Price List

1. For Testing purposes I have not included the Inventory Item ID -- 307627 on the price list - 54824

2. The Price List does however include an ALL_ITEMS value which sets the price to 1.23

When Calling the PRICE_REQUEST API, I have passed the following values.

1. ALL_ITEMS pricing attribute which will be used to return a price from the price list if the item has not been included on the price list. This will only return a price if the Price List has a value for ALL_ITEMS.

line_attr_rec.LINE_INDEX    := 1;

line_attr_rec.PRICING_CONTEXT    :='ITEM'; 

line_attr_rec.PRICING_ATTRIBUTE   :='PRICING_ATTRIBUTE3';

line_attr_rec.PRICING_ATTR_VALUE_FROM   :='ALL';

line_attr_rec.VALIDATED_FLAG    :='N';

p_line_attr_tbl(1)    := line_attr_rec;

2. The Inventory Item to be priced

line_attr_rec.LINE_INDEX    := 1;

line_attr_rec.PRICING_CONTEXT    :='ITEM'; 

line_attr_rec.PRICING_ATTRIBUTE   :='PRICING_ATTRIBUTE1';

line_attr_rec.PRICING_ATTR_VALUE_FROM   :='307627';                  -- INVENTORY ITEM ID

line_attr_rec.VALIDATED_FLAG    :='N';

p_line_attr_tbl(2)    := line_attr_rec;

---- Qualifier Attribute Record

3. The Price List used to price the item

qual_rec.LINE_INDEX     := 1; 

qual_rec.QUALIFIER_CONTEXT    :='MODLIST';

qual_rec.QUALIFIER_ATTRIBUTE    :='QUALIFIER_ATTRIBUTE4';

qual_rec.QUALIFIER_ATTR_VALUE_FROM   :='54824';                     -- PRICE LIST ID

qual_rec.COMPARISON_OPERATOR_CODE   := '=';

qual_rec.VALIDATED_FLAG    :='Y';

p_qual_tbl(1)     := qual_rec;

4. Customer Qualifier will be used to determine (in this test) which modifier is to be used.

qual_rec.LINE_INDEX     := 1;

qual_rec.QUALIFIER_CONTEXT    :='CUSTOMER';

qual_rec.QUALIFIER_ATTRIBUTE    :='QUALIFIER_ATTRIBUTE2';

qual_rec.QUALIFIER_ATTR_VALUE_FROM   := 16071 ;   -- CUSTOMER ID;

qual_rec.COMPARISON_OPERATOR_CODE   := '=';

qual_rec.VALIDATED_FLAG    :='Y';

p_qual_tbl(2)     := qual_rec;

The following Script will create a procedure called XX_TEST_PRICE_REQUEST ---  PRICE_REQUEST_API_EXAMPLE.sql

Do the following to run the script from a SQL*Plus session

SQL> Set Serveroutput on size 100000

SQL> Exec XX_TEST_PRICE_REQUEST

This should then return output similar to:

File : /usr/tmp/l5027518.dbg

Return Status text Routine: QP_PREQ_PUB.PRICE_REQUEST SUCCESS

Return Status  S

+---------Information Returned to Caller---------------------+

-------------Request Line Information-------------------

Line Index: 1

Unit_price: 1.23

Percent price:

Adjusted Unit Price: .615

Pricing status code: UPDATED

Pricing status text:

-----------Pricing Attributes Information-------------

Line detail Index 3

Context ITEM

Attribute PRICING_ATTRIBUTE1

Value 307627

Status Code

---------------------------------------------------

Line detail Index 2

Context ITEM

Attribute PRICING_ATTRIBUTE3

Value ALL

Status Code

---------------------------------------------------

-----------Qualifier Attributes Information-------------

Line Detail Index 3

Context CUSTOMER

Attribute QUALIFIER_ATTRIBUTE2

Value 16071

Status Code N

---------------------------------------------------

------------Price List/Discount Information------------

Line Index: 1

Line Detail Index: 2

Line Detail Type:NULL

List Header Id: 54824

List Line Id: 189859

List Line Type Code: PLL

Adjustment Amount : 1.23

Line Quantity :

Operand Calculation Code: UNIT_PRICE

Operand value: 1.23

Automatic Flag: Y

Override Flag:

status_code: N

status text: INSERTED IN L_LIST_CUR

-------------------------------------------

Line Index: 1

Line Detail Index: 3

Line Detail Type:NULL

List Header Id: 191260

List Line Id: 221749

List Line Type Code: DIS

Adjustment Amount : -.615

Line Quantity :

Operand Calculation Code: %

Operand value: 50

Automatic Flag: Y

Override Flag: N

status_code: N

status text: PRODUCT_QUALIFIER_ONLY

-------------------------------------------

--------------Related Lines Information for Price Breaks/Service

Items---------------

PL/SQL procedure successfully completed.

The Important Elements shown here are:

1. /usr/tmp/l5027518.dbg     --  additional debug information is located
in this file

The following information is shown in the debug file:

2. Request Line Information     --  Shows the price returned by the API

3. Pricing Attributes Information --  Shows Pricing Attributes used to determine the price -- Note only the attributes used will be shown

4. Qualifier Attributes Information --  Shows Qualifier Attributes used to determine the price -- Note only the attributes used will be shown

5. Price List/Discount Information --  Shows the price list chosen as well as the modifiers which have been used to price the item.

The following file is a LIST_LINE_DETAIL diagnostics report for the modifier (list line id - 221749). This shows the modifier details including pricing and qualifier attributes.

Modifier_definition

Note: 163913.1 - Debugging Advanced Pricing Modifier and Price List Lines (qp_list_line_detail.sql)

An alternative method of obtaining this report is to run -- Diagnostics: List Line Details -- concurrent process from a Pricing Manager Responsibility.

Additional reference: Note 412545.1 - Pricing Engine: How to simulate the Price Order Function using an API

Still Have Questions? 

To discuss this information further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the My
Oracle Advanced Pricing Community
.


REFERENCES

NOTE:412545.1 - How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes Example Scripts



NOTE:1448751.1 - Qp_preq_pub.Price_request Is Not Showing a Discount Defined at Group of Lines Level

NOTE:163913.1 - Diagnostic Report for Advanced Pricing Modifier and Price List Lines (qp_list_line_detail.sql)

文档详细信息

 

 
  类型:
  状态:
  上次主更新:
  上次更新:
 
  HOWTO
  PUBLISHED
  2014-11-4
  2014-11-4

     
 

相关产品

 
Oracle Advanced Pricing
     

 
 

附件

   
 

HOW to Use QP_PREQ_PUB.PRICE_REQUEST API to Price an Item的更多相关文章

  1. Sample Code for Qp_preq_pub.Price_request Api to Simulate an Ask for Promotion Modifier

    DECLARE p_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE; p_qual_tbl QP_PREQ_GRP.QUAL_TBL_TYPE; p_line_attr_tbl ...

  2. How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes

    How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes ...

  3. How to Create Modifiers Using the API QP_MODIFIERS_PUB.PROCESS_MODIFIERS

    In this Document Goal   Solution   Example Scripts   Steps to verify the creation of modifier(s).   ...

  4. 集成架构:对比 Web API 与面向服务的架构和企业应用程序集成(转)

    http://kb.cnblogs.com/page/521644/ 摘要:总体上讲,SOA 和 Web API 似乎解决的是同一个问题:以实时的.可重用的方式公开业务功能.本教程将分析这些举措有何不 ...

  5. (转)集成架构:对比 Web API 与面向服务的架构和企业应用程序集成

    摘要:总体上讲,SOA 和 Web API 似乎解决的是同一个问题:以实时的.可重用的方式公开业务功能.本教程将分析这些举措有何不同,以及如何将它们融入到一个不断演变的集成架构中.文中还将讨论 API ...

  6. 购物车Demo,前端使用AngularJS,后端使用ASP.NET Web API(2)--前端,以及前后端Session

    原文:购物车Demo,前端使用AngularJS,后端使用ASP.NET Web API(2)--前端,以及前后端Session chsakell分享了前端使用AngularJS,后端使用ASP.NE ...

  7. 【netcore基础】.NET Core使用EPPlus实现MVC API里的Excel导出功能 配置中文表头

    EPPlus 用来操作excel非常方便,不用依赖微软的office包,所以推荐使用. 下面是具体步骤和代码 首先用nuget安装 EPPlus.Core 我装的版本是 1.5.4 然后就可以用 Ex ...

  8. 使用 ASP.NET Core MVC 创建 Web API(六)

    使用 ASP.NET Core MVC 创建 Web API 使用 ASP.NET Core MVC 创建 Web API(一) 使用 ASP.NET Core MVC 创建 Web API(二) 使 ...

  9. ebay API属性

    Ebay Trading API整理 纠纷相关 AddDispute:创建一个未支付纠纷 或 取消 a single line item order AddDisputeResponse:回复/关闭d ...

随机推荐

  1. Dynamics CRM2016 Web API之创建记录

    前篇介绍了通过primary key来查询记录,那query的知识点里面还有很多需要学习的,这个有待后面挖掘,本篇来简单介绍下用web api的创建记录. 直接上代码,这里的entity的属性我列了几 ...

  2. Linux & Windows 计时函数

    直接上代码: #if defined(_WIN32) && defined(_MSC_VER) #include <windows.h> double abtic() { ...

  3. python学习资料整理

    [1] The Python Tutorial [2] Numpy Quick Start Tutorial [3] Python-OpenCV [4] http://www.learnpython. ...

  4. 自定义圆角透明的Dialog

    自定义圆角透明的Dialog 说明 系统默认的Dialog默认是背景不透明的,有时候项目需要Dialog为圆角透明,这个时候的解决方案就是---重写Dialog - 系统样式 - 自定义以后的样式 自 ...

  5. mysql 字符集查看 设定

    (1) 最简单的修改方法,就是修改mysql的my.ini文件中的字符集键值, 如 default-character-set = utf8 character_set_server = utf8 修 ...

  6. iOS关于图片点到像素转换之杂谈

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 不管是以什么方法生成的图片,是从磁盘上读取的,还是从其他对象中 ...

  7. [django]添加自定义template filter标签

    看文档templatetag 直接放在app下的templatetag 文件夹下就好,这里想放到一个公共的目录下,然后写下简单的自定义tag的模板. django1.6 创建 在项目目录下建立如下的文 ...

  8. C++对象模型的那些事儿之二:对象模型(下)

    前言 上一篇博客C++对象模型的那些事儿之一为大家讲解了C++对象模型的一些基本知识,可是C++的继承,多态这些特性如何体现在对象模型上呢?单继承.多重继承和虚继承后内存布局上又有哪些变化呢?多态真正 ...

  9. Swift基础之显示波纹样式

    最近项目用到了蓝牙连接,搜索设备的内容,其中需要搜索过程中出现波纹的动画效果,在这里将项目中OC语言编写的这种动画效果,转换成Swift编写,下面简单介绍说明一下代码. 这里用到了两种方法实现波纹效果 ...

  10. MyBatis主键生成器Jdbc3KeyGenerator(二)

    上一篇博客MyBatis主键生成器KeyGenerator(一)中我们大体介绍了主键生成器的接口及配置等,接下来我们介绍一下KeyGenerator的实现类Jdbc3KeyGenerator Jdbc ...