Você está na página 1de 15

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1148770.

1#Heading_1_12

Pricing Engine: How to simulate the Price Order Function using an API [ID 412545.1] Modified 26-JUL-2010 Type BULLETIN Status PUBLISHED

In this Document Purpose Scope and Application Pricing Engine: How to simulate the Price Order Function using an API References

Applies to:
Oracle Advanced Pricing - Version: 11.5.9 to 12.0.3 - Release: 11.5 to 12.0 Information in this document applies to any platform. FORM:OEXOEMOE.FMB - Enter Orders FORM:OEXOEORD.FMB - Sales Orders EXECUTABLE:OEOBOE - OrderImport FORM:WSHFSCDL.FMB - Ship Confirm Deliveries FORM:WSHFSCDP.FMB - Ship Confirm Departures Checked for relevance 26-JUL-2010

Purpose
This note is intended to show how the Price Order or Price Line action may be simulated using an API call. Currently Oracle does not have a public API that simulates the Actions > Price Order/Line functionality currently available within the Sales Order form. Although Oracle does provide a seeded Workflow Reprice activity that can be inserted anywhere in the line Workflow, the limitation of this approach is that it only contains a line level activity for repricing. If used, repricing each line is necessary and there is no possibility for a header level reprice. One option for repricing is to use the Process Order API (OE_Order_Pub.Process_order). Please Reference page 2-71 of the Oracle Order Management APIs and Open Interfaces Manual (Part No. B14446-01). This is the method Oracle Development currently recommends and will support if there is a problem with the API. Pricing an Order/Line using Process Order API: --------------------------------------------Repricing of an order line or the entire order will be triggered if any of the following fields are updated by the Process Order API:
Database Columns price_list_id pricing_date

umns

agreement_id cust_po_number

inventory_item_id invoice_to_org_id ordered_item_id ordered_item line_category_code line_type_id ordered_quantity ordered_quantity_uom preferred_grade payment_term_id

request_date ship_to_org_id sold_to_org_id service_start_date service_end_date service_duration service_period blanket_number blanket_line_number

Note that a drawback of this approach is that changing some of these fields may also trigger defaulting rules and add some performance overhead. Another approach to repricing is to use the private API OE_ORDER_ADJ_PVT.Price_Action. It should be noted the use of this API is considered a customization and is unsupported.

Scope and Application


The intended audience is for those with technical knowledge of Oracle Applications Code, the usage of public APIs, and those familiar with creating custom solutions for unique business requirements. A more elegant (but unsupported) way to accomplish your objective it is to call the internal API that the Sales Order form uses. That is the one that calls the private internal function oe_order_adj_pvt.price_line. Oracle does not recommend, nor will they support any custom code. If you were to use the scripts below, this is in the realm of custom coding and Oracle will not assume any responsibility for their use. Oracle support cannot assist with these scripts, if you are implementing a custom solution that may require use of these and need assistance, please contact Oracle Consulting. Also note that changes to XXX_PVT API's may not be backward compatible.

Pricing Engine: How to simulate the Price Order Function using an API
To simulate the price order, the below sample code will need to be changed to loop this proc over a cursor and get the cursor to fetch the lines from the order. Use the pricing events BATCH, ORDER. Use the cursor to populate the line_tbl OE_Order_Adj_Pvt.Price_Line ( X_Return_Status => l_return_status, p_Request_Type_code => 'ONT', p_Control_Rec => l_control_Rec, p_write_to_db => TRUE, x_line_tbl => lx_line_tbl, p_honor_price_flag => 'N', p_multiple_events => 'N' ); lx_line_tbl(1) := l_line_rec; Keep feeding in the data to this line_tbl using the cursor loop then do a single call to that price_line procedure with the line_tbl. Then do a single call to that price_line procedure with the line_tbl

create or replace procedure cmqp_price_line ( p_line_id in number, x_return_status out varchar2 ) is l_return_Status varchar2(240); lx_line_tbl oe_Order_Pub.Line_Tbl_Type; l_price_request_rec OE_Order_PUB.request_rec_type; l_control_rec QP_PREQ_GRP.control_record_type; l_header_id number; l_line_rec OE_Order_PUB.Line_Rec_Type; begin fnd_global.apps_initialize(1005173,21623,660); -- pass in correct values for user_id, responsibility_id, and application_id oe_debug_pub.initialize; oe_debug_pub.setdebuglevel(5); Oe_Msg_Pub.initialize; DBMS_OUTPUT.PUT_LINE('Debug File = ' || OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE); OE_Line_Util.Query_Row( p_line_id => p_line_id, x_line_rec => l_line_rec ); lx_line_tbl(1) := l_line_rec; l_control_Rec.pricing_event := 'BATCH'; l_control_rec.calculate_flag := 'Y'; l_control_rec.debug_flag := 'Y'; l_control_Rec.simulation_flag := 'Y'; /* To SAVE changes, set l_control_Rec.simulation_flag := 'N'; */ l_control_rec.GET_FREIGHT_FLAG := 'Y'; OE_Order_Adj_Pvt.Price_Line ( X_Return_Status => l_return_status, p_Request_Type_code => 'ONT', p_Control_Rec => l_control_Rec, p_write_to_db => TRUE, x_line_tbl => lx_line_tbl, p_honor_price_flag => 'N', p_multiple_events => 'N' ); x_Return_status := l_return_status; end ; /

Bug 4282565 <> is the crux and good example of why this note was created. It is an example of what the problem is, and the only current solutions are published in this note.

[SET SERVEROUTPUT ON SIZE 1000000; DECLARE v_header_count Number; v_header_list varchar2(32000); v_line_count number; v_line_List varchar2(32000); v_price_level varchar2(32000); v_return_status varchar2(32000); v_msg_count number; v_msg_data varchar2(32000); begin oe_debug_pub.debug_on; oe_debug_pub.setdebuglevel(5); mo_global.set_policy_context('S',204); dbms_output.put_line('Debug Mode :'||OE_DEBUG_PUB.G_DEBUG_MODE); dbms_output.put_line('Debug file :'||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE); v_header_count := 1; v_header_list := '164600'; --v_line_count := 1; --v_line_List := '311535'; v_price_level :='ORDER'; OE_ORDER_ADJ_PVT.price_action( p_header_count => v_header_count, p_header_list => v_header_list, p_line_count => v_line_count, p_line_list => v_line_list, p_price_level => v_price_level, x_return_status => v_return_status, x_msg_count => v_msg_count, x_msg_data => v_msg_data ); exception when others then dbms_output.put_line('wrong'); Null; end; /

[SET SERVEROUTPUT ON SIZE 1000000; DECLARE v_header_count Number; v_header_list varchar2(32000); v_line_count number;

v_line_List varchar2(32000); v_price_level varchar2(32000); v_return_status varchar2(32000); v_msg_count number; v_msg_data varchar2(32000); begin oe_debug_pub.debug_on; oe_debug_pub.setdebuglevel(5); mo_global.set_policy_context('S',204); dbms_output.put_line('Debug Mode :'||OE_DEBUG_PUB.G_DEBUG_MODE); dbms_output.put_line('Debug file :'||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE); --v_header_count := 1; --v_header_list := '164600'; v_line_count := 1; v_line_List := '311535'; v_price_level :='LINE'; OE_ORDER_ADJ_PVT.price_action( p_header_count => v_header_count, p_header_list => v_header_list, p_line_count => v_line_count, p_line_list => v_line_list, p_price_level => v_price_level, x_return_status => v_return_status, x_msg_count => v_msg_count, x_msg_data => v_msg_data ); exception when others then dbms_output.put_line('wrong'); Null; end; /

Please note that using the QP_PREQ_PUB.Price_request API does simulate a call to Pricing and can be used to test the application of various qualifiers and modifiers. But this API does not result in any updates to the sales order line. Instead, it is analogous to the pricing component of the Pricing/Availability form.

Additional resources: Note 759804.1 - HOW to use QP_PREQ_PUB.PRICE_REQUEST API to price an item.

References
BUG:4282565 - QP_PREQ_PUB.PRICE_REQUEST CAN NOT WORK WHEN I ADJUST UNIT SELLING PRICE NOTE:1094603.1 - How to Invoke Pricing Attribute in a Dynamic Formula When Using QP_PREQ_PUB.PRICE_REQUEST NOTE:759804.1 - HOW to use QP_PREQ_PUB.PRICE_REQUEST API to price an item

Related Products

Oracle E-Business Suite > Order Management > Price Management > Oracle Advanced Pricing

Keywords QP_PREQ_PUB.PRICE_REQUEST; API; MODIFIERS; ADVANCED PRICING; ENTER ORDER; FREIGHT CHARGES; PRICING ENGINE
Back to top
Rate this document

OEXULADB.pls

Quaifiers:

Tables Associated with Attribute Mapping [ID 209471.1]

Modified 16-AUG-2010

Type HOWTO

Status PUBLISHED

Applies to:
Oracle Advanced Pricing - Version: 11.5.9 to 12.1.3 - Release: 11.5 to 12.1 Information in this document applies to any platform.

Goal

Information for Tables associated with Attribute Mapping


Solution

1. QP_PTE_SOURCE_SYSTEMS stores details of source systems defined for a Pricing Transaction Entity.
Source system is the application where data originates and the field source_system_code is the application short name. APPLICATION_SHORT_NAME and PTE_CODE uniquely identifies the origin of data.

2. QP_PTE_REQUEST_TYPES_B stores details of request types defined in the Pricing Transaction Entity form.

Each request type must have a sourcing rule defined in QP_ATTRIBUTE_SOURCING when SOURCING_METHOD is 'attribute mapping'. Usually there is a global record structure or a view defined that maps the attributes. The field LINE_LEVEL_GLOBAL_STRUCT contains the global record, such as OE_ORDER_PUB.G_LINE. If a view was to be mapped, the field LINE_LEVEL_VIEW would be populated.

3. QP_PRC_CONTEXTS_B stores context definitions. Contexts can be either qualifier or pricing.

When a context is seeded, the seeded_flag will

be 'Y'. When the context is seeded, SEEDED_PRC_CONTEXT_NAME and SEEDED_DESCRIPTION fields are populated. If a seeded context is modified then USER_PRC_CONTEXT_NAME and USER_DESCRIPTION will be populated. Because Advance Pricing allows the user to modify seeded data, this design structure prevents the overwriting of user's changes to seeded data and allows the user to roll back to seeded values.

4. QP_SEGMENTS_B stores the attribute details.


The SEGMENT_LEVEL fieldstores the level of the attribute. The valid values are Order, Line,or Both. This segment level selects which attributes display in pricing attributes and qualifiers LOVs.

5. QP_PTE_SEGMENTS is a cross reference between QP_SEGMENTS and QP_PTES.


There is a field called SOURCING_STATUS and this field indicates whether the Build_Context concurrent program has been run. If the flag is unchecked indicates the need to run the build context concurrent program in order to generate the sourcing code.

6. QP_ATTRIBUTE_SOURCING stores sourcing rules defined for an attribute.


Sourcing rules are defined if the USER_SOURCING_METHOD is Attribute Mapping. If the SEGMENT_LEVEL column of QP_SEGMENTS_B is populated with 'both', then there should be two rows in this table. One row would have and ATTRIBUTE_SOURCING_LEVEL of 'Order' and the second row would have 'Line'.

7. The profile option called QP: Pricing Transaction Entity controls the Modifier/Price List assignment to the PTE.
This profile can be set at the System Administrator as well as Application level. The default value is 'Order Fulfillment'.

Related

Products

Oracle E-Business Suite > Order Management > Price Management > Oracle Advanced Pricing

Keywords

QP_ATTRIBUTE_SOURCING; QP_PTE_REQUEST_TYPES_B; QP_PTE_SEGMENTS; QP_SEGMENTS_B; QP_PTE_SOURCE_SYSTEMS; QP_PRC_CONTEXTS_B; ATTRIBUTE MAPPING; PRICING ATTRIBUTES

Back to top
Rate this document

Master: Common Reasons To Receive "Item and UOM Not on Price List" Error [ID 605330.1]

Modified 09-NOV-2010

Type BULLETIN

Status PUBLISHED

In this Document Purpose Scope and Application Master: Common Reasons To Receive "Item and UOM Not on Price List" Error Step Recommended After Pricing Patch Application No Message or Form Hangs Related Issues Common Reasons and Solutions For Error "not on price list" The price list header is inactive. The price list header is ineffective as of the pricing date. The source system code on price list is not correct. The price list line is ineffective as of the pricing date. The qualifiers for the price list are not met or not passed to the pricing engine (attributes mapping). The pricing attributes for price list are not met. The price break conditions are not met based on item quantity and item amount. The UOM on the Sales Order line does not match the UOM on the Price List and UOM conversion is not defined in the price list. Pricing engine call is made before the pricing attribute in the database is saved. Price list header currency is different from the order currency. An unusual error causes pricing performance related columns to be out of sync. Fresh Install and this error is shown. QP: custom Sourced is set to 'Yes' when it was not supposed to be. Price List is not defaulted to sales order header and/or no price list is present on the header or lines. Not Getting Price From Secondary Price List

Check value set for profile QP: Pricing Transaction Entity Build attribute program failed due null values fetched in the record More than one custom pricing attribute is used and this message is rendered on 11.5.10. Price List is NOT found on Pricing & Availability option of Quick Sales Order Form when Price List has Order type as qualifier. Upgrade errors were root cause Create intercompany AR invoices (INCIAR)completes with a warning if the Pricing Date is on the same dayas the End Date of the price list line Interface trip stop ends with this error for processing intercompany transactions. Unit Selling Price Disappears/NULL for configured items. Quote Issue Has not recently run the 'Build Attribute Mapping Rules' concurrent process Intercompany Invoicing errors with Warning: Cannot create invoice line and Item <item> and uom EA not on pricelist References

Applies to:
Oracle Advanced Pricing - Version: 11.5.10 to 12.0.6 - Release: 11.5 to 12.0 Information in this document applies to any platform. FORM:OEXOEORD.FMB - Sales Orders FORM:OEXOETEL.FMB - Quick Sales Orders EXECUTABLE:WSHINTERFACE - Interface Trip Stop ConcurrentProgram:WSHINTERFACES - Interface Trip Stop - SRS EXECUTABLE:INCIAR - Create Intercompany AR Invoices

Purpose
To provide common reasons on why error "Item and UOM Not on Price List" is shown and their solutions.

Scope and Application


This document is informational and intended for any user. Checked for relevance on 29-JUL-2010

Master: Common Reasons To Receive "Item and UOM Not on Price List" Error Step Recommended After Pricing Patch Application

After application of a pricing patch, one should take the following actions as Oracle Pricing Manager, Navigating to: Reports. y y Run Build Attribute Mapping Rules Run during non-peak times Run QP: Maintains Denormalized Data in QP Qualifiers

No Message or Form Hangs


For Oracle Applications Release 11.5.10 only: Refer to Note 435426.1 Oracle Applications 11.5.10 "poor performance" with Pricing Recommended Patch Strategy

Note that if the Pricing Error Message Item and UOM Not On Price List Does Not Appear on Oracle Applications 11.5.10; For details, refer to Note 412498.1

Related Issues

Note 1204025.1 Rel 11.5.10 With Profile QP: Pattern Search Enabled Sales Order Lines Have Errors: Item And UOM Not On Pricelist Note 1077365.1 OEXOEORD: No Refernce of Parent Item or Parent Price is Null for Percent-Based Pricing For Service Line Using This note explain the solution needed for the following situation. Customer Relationships (Service) = All Customers When attempting to add a service item to a sales order the following error occurs. <> and <> not on Error message in the pricing viewer shows No reference of parent item or parent price is null for percent-based pricing. Note 263324.1 For Internal Order the Interface Trip Stop completes with Warning. Item not on price list Note 7821277.1 Troubleshooting pricing issues (IPL error) in Intercompany Invoicing when Advanced Pricing is used Note 444761.1 User Was Able to Create Duplicate Price List Lines Note 362711.1 Effective Precedence and Incompatability Resolution in Pricing Note 368390.1 Service and <??> and <??> not on <??> Item not on price list message Note 311679.1 Order line information is not defaulted from Blanket Sales Agreement Note 882417.1 Issue With Calling The Secondary Price List With A Qualifier; error not on price list.

Common Reasons and Solutions For Error "not on price list"

Problem / Symptom

Recommendation Check active flag on price list header.

The price list header is inactive. The price list header is ineffective as of the pricing date. The source system code on price list is not correct. Check active dates on the price list header. Blank dates mean no restriction.

Verify request type, source system code mapping to make sure that appropri request type code.

Check active dates on the Price List Lines. The price list line is ineffective as of the pricing date. Blank dates mean no restriction.

The qualifiers for the price list are not met or not passed to the pricing engine (attributes mapping).

Occasionally a qualifier is unintentionally created for a price list which preven the price list has a qualifier, verify that the qualifier is passed to the engine by Pricing Engine Request Viewer window for that.

Get an OM debug file (reference Note 121054.1) while replicating issue. Mak Search the debug file for context passed and ensure it shows correct values shown.

The pricing attributes for price list are not met.

Using the Pricing Engine Request Viewer window to verify that the pricing att with pricing attributes, then these pricing attributes also need entered on the

Get an OM debug file (reference Note 121054.1) while replicating issue. Sea ensure it shows correct values. Else evaluate why the correct values are not

The price break conditions are not met based on item quantity and item amount.

Make sure that context volume and attribute Line quantity is sourced properly verify this Or Get an OM debug file (reference Note 121054.1 and also set QP the debug file) while replicating issue. Search the debug file for context pass evaluate why the correct values are not shown.

Check the Pricing Engine Request Viewer window to make sure that the corr The UOM on the Sales Order line does not match the on the order line needs to exist on the price list in the item and UOM combina UOM on the Price List and UOM conversion is not Inventory module for the item and UOM to be converted to that which exists o defined in the price list. line for the item needs to exist.

Pricing engine call is made before the pricing attribute in the database is saved. Price list header currency is different from the order currency.

Verify that the line is saved before making a call to the pricing engine. You m engine is not able to find the price list due to unavailability of pricing attribute.

Check currency. Choose a price list with same base currency as the Sales O used, one that has a conversion defined. Check appscheck report for value o Installed and 2) QP: Multi Currency Usage

An unusual error causes pricing performance related columns to be out of sync.

Qp_list_line_detail.sql shows that the columns are not properly updated. Run concurrent program to correct this situation.

If fresh install, make sure at list one modifier (and modifier line) is defined and Fresh Install and this error is shown. QP: custom Sourced is set to 'Yes' when it was not supposed to be. 1. Set profile QP: Customer Sourced to No if custom package is not used. 2. Run Build Attribute Mapping Rules concurrent program.

Price List is not defaulted to sales order header and/or no price list is present on the header or lines. Not Getting Price From Secondary Price List Check value set for profile QP: Pricing Transaction Entity Build attribute program failed due null values fetched in the record

Verify that the big search is enabled which instructs the pricing engine to look ReferenceNote 464624.1 - How To Verify if the Big Search for Price Lists is E Reference Note 372462.1

This profile option indicates the current Pricing Transaction Entity (PTE) in us working in Order Management, this profile should be "Order Fulfillment". Applicable to Release 11.5.10 only: fixed files: QPXPSAPS.pls 115.25.11510.1 QPXPSAPB.pls 115.52.11510.5 " Apply patch 9215721 OEXOEORD - ITEM AND EA NOT ON PRICELIST

More than one custom pricing attribute is used and this message is rendered on 11.5.10.

Applicable to Release 11.5.10 only: fixed file: QPXGPREB.pls version 115.643.11510.47 Apply Patch 7007869 ITEM AND UOM NOT ON PRICE LIST WITH CUSTOM SOURCING ATTRIBUTES . Applicable to Release 11.5.10 only: Reference Note 550151.1 Fixed files: OEXFAVAB.pls 115.22.11510.2 OEXFAVAS.pls 115.11.11510.1 Reference Note 403001.1

Price List is NOT found on Pricing & Availability option of Quick Sales Order Form when Price List has Order type as qualifier.

Upgrade errors were root cause Applicable to Release 11.5.10 only: Create intercompany AR invoices Reference Note 553857.1 (INCIAR)completes with a warning if the Pricing Date Fixed file:INVVICAB.pls 115.20.115100.6 is on the same dayas the End Date of the price list line Interface trip stop ends with this error for processing intercompany transactions. Remove the commit from the custom code and/or custom database triggers. Unit Selling Price Disappears/NULL for configured items. Applicable to Release 11.5.10 only: Quote Issue

If Profile INV:Advanced Pricing for Intercompany Invoice=No, Reference Note

The issue can be reproduced at will with the following Reference Note 358322.1 steps: Fixed file: asovpflb.pls 115.31.115100.1 1. Put a Price List on the Quote Header 2. Add Items to the quote that are not on the Price list on the Header. 3. Error "Item xx and UOM yy not on this Price List" shows up. Run the 'Build Attribute Mapping Rules' concurrent process Has not recently run the 'Build Attribute Mapping Rules' concurrent process Intercompany Invoicing errors with Warning: Cannot create invoice line and Item <item> and uom EA not on pricelist

The price list being used has source_system_code of QP. Since the mapping code of QP is not enabled, the price is not found and causing the error. To verify, please create a new price list for this item using a user with profile Q run the testcase. The pricing engine should now be able to find the transfer p Oracle Pricing Manager responsibility, go to the form Setup>Attribute Manag and query Name=INTCOM. In the Source Systems tab, check the Enabled fla

Regarding the PTE, it should be set to INTCOM in order to use the qualifier c Intercompany transactions in Setup>Attribute Mapping>Attribute Linking and pricing action that happens when running the Create Intercompany AR Invoic Make the changes and retest your issue.

References
BUG:7007869 - ITEM AND UOM NOT ON PRICE LIST WITH CUSTOM SOURCING ATTRIBUTES NOTE:1077365.1 - OEXOEORD: No Refernce of Parent Item or Parent Price is Null for Percent-Based Pricing For Service Line Using Customer Relationships (Service) = All Customers NOTE:121054.1 - How to generate a debug file in OM NOTE:311679.1 - Sales order line information is not defaulted from BSA NOTE:358322.1 - Item and UOM Not on the Price List error when a Price List is entered on the Quote Header. NOTE:362711.1 - Effective Precedence and Incompatibility Resolution in Pricing Results in Error Duplicate Price List Lines NOTE:368390.1 - OEXOEORD.fmb: Service and and not on NOTE:372462.1 - Not Getting Price From Secondary Price List NOTE:376132.1 - Item and UOM EA Not on Pricelist for Fresh Installs Only NOTE:403001.1 - Item and UOM Not in the Price List error on Sales Order line. NOTE:412498.1 - Pricing Error Message Item and UOM Not On Price List Does Not Appear NOTE:444761.1 - QPXPRDPL User Was Able to Create Duplicate Price List Lines NOTE:471722.1 - WSHINTERFACE: INCIAR: Price Was Not Found on This Price List for This Item and UOM (Unit of Measure) NOTE:553857.1 - INCIAR: ITEM and UOM not on price list NOTE:782177.1 - Troubleshooting pricing issues in Intercompany Invoicing when Advanced Pricing is

used NOTE:882417.1 - OEXOEORD: Issue With Calling The Secondary Price List With A Qualifier NOTE:1204025.1 - With Profile QP: Pattern Search Enabled Sales Order Lines Have Errors: Item And UOM Not On Pricelist

Related

Products

Oracle E-Business Suite > Order Management > Price Management > Oracle Advanced Pricing

Keywords

OEXOETEL.FMB; OEXOEORD.FMB; WSHINTERFACE; INCIAR; UOM; INTERCOMPANY; PRICE LIST; NOT ON PRICE LIST

Back to top
Rate this document

ou can email him directly at:

Steven.chan@oracle.com

Steven.chan@oracle.com http://prasannachandorkar.blogspot.com/

Você também pode gostar