Professional Documents
Culture Documents
Introduction ........................................................................................................ 3
Defining Pricing Transaction Entity ............................................................... 5
Define a New Pricing Transaction Entity ................................................. 5
Pricing Transaction Entity Associations Setup Form .............................. 5
Profile Options ................................................................................................... 8
Concurrent Programs ........................................................................................ 9
Build Attribute Mapping Rules.................................................................... 9
Checklist for Building Attributes Mapping Rules .......................................10
Creating Contexts and Attributes to be Used in Pricing Setup Forms ....10
Creating Contexts ........................................................................................10
Creating Attributes ......................................................................................11
Pricing Attributes and Flex fields tables ..................................................13
Linking Attributes to a Pricing Transaction Entity.....................................13
To link attributes to a Pricing Transaction Entity ..................................14
Link Attributes Window.............................................................................15
Attribute Sourcing Rules .................................................................................17
Overview of Tasks Involved in Attribute Management ............................21
Create a Price List and add item to the Price list ....................................21
Create a Modifier for this item ..................................................................22
Create new attribute in qualifier context ..................................................22
Create attribute mapping for newly created attribute ............................23
Attach Qualifier using the new attribute to the Modifier ......................24
Test by creating a new order......................................................................25
Using Custom Sourced Attributes .................................................................26
Troubleshooting Custom sourced attributes ...........................................29
Pricing Engine Request Viewer .....................................................................29
Interpreting Attributes in PERV for attribute sourcing issues .............30
Pricing Engine Request Viewer Tables ....................................................32
Attribute Management Troubelshooting Notes ..........................................32
Recommended Patches .............................. Error! Bookmark not defined.
Metalink Notes .................................................................................................41
Oracle Diagnostic Scripts for Attribute Mapping Issues ...........................41
Attribute Mapping Rules - Note:363052.1 ..............................................41
Conclusion ........................................................................................................41
INTRODUCTION
Oracle Advanced Pricing offers flexibility and extensibility in terms of handling various pricing
scenarios. Attribute management is one of the key components of Advanced Pricing and it
provides the users of Advanced Pricing with the flexibility to take care of varied business scenarios
by defining attributes of product, qualifier or pricing context type.
This paper describes in detail the various functional aspects of Attribute management, profile
options needed and the set up require for creating and mapping attributes and troubleshooting
details as of 11.5.10 release. Please refer to Oracle Advanced Pricing implementation guide and user
guide for Attribute Management details in latest release.
FUNCTIONAL ASPECTS
When a new request type is created (i.e. a new ordering structure is developed), the business must
decide if the request type will use the same set of source systems in the existing PTE. A new PTE
needs to be created only if the new request type uses a different ordering structure and a different
set of source systems. Request types have to be unique across PTEs.
Context
Contexts are a group of related pricing elements that can have attributes linked to them. In
Attribute Management, users can set up 3 types of contexts. Product context, Qualifier context,
and Pricing context. Qualifier Contexts and its attributes allow for the creation of qualifiers, which
determine eligibility. The attributes in the product context help to define the product hierarchy.
Attributes within a pricing context enable users to further define eligibility for a line.
We can add new contexts of Pricing and Qualifier Context type. However you cannot add new
contexts of Product Context type. You can add attributes to the existing Product context ITEM.
The Context-Attribute grouping is linked to a specific Pricing Transaction Entity. For a given
PTE, this combination becomes available to use in a formula, qualifier, price list, or modifier. Each
PTE will have its own unique combination of attributes.
Note:
You cannot delete a context, if it has one or more attributes. Attributes that are already used in
Pricing Setup cannot be deleted.
Please make sure to set QP: Pricing Transaction Entity profile option value appropriately before
creating contexts/attributes. So, these contexts and attributes will be available in pricing setup
forms in that PTE. If this profile is not set correctly, the contexts/attributes linked to the PTE will
not be shown in LOVs in Pricing Setup Forms, and using contexts/attributes from incorrect PTE
in pricing setup (Qualifier, Pricing attributes, etc) will give incorrect results during pricing call as the
attribute(s) will not be sourced correctly.
Attributes
Attributes can be used as product, qualifier or pricing attributes. Attributes are linked to a Pricing
Transaction Entity depending on the defined Request Types. Different request types may use the
same attribute to source different data. The same attribute used in 2 different PTEs may be
completely different in terms of the attribute mapping method, mapping level, and other controls.
One attribute for 2 PTEs may be different.
As mentioned before, these attributes are sources of data that can be used by the pricing engine in
a pricing request. There are 4 methods to source data. They are,
User entered attributes: The attribute value is entered by the user at run time. Attribute
mapping is not needed.
Attribute Mapping: User defines an attribute mapping rule
Custom sourcing: User provides a code to map an attribute. In this case attribute mapping
is not needed.
Runtime Sourced: Sourced in the pricing engine by a Custom API.
Attributes can be sourced at the header level, line level, or for both header and line levels.
Description: Figure 1, displays the Pricing Lookups window where you can add a PTE.
Description: Figure 2, displays the Pricing Transaction Entity Associations Setup window
with source systems associated with Order Fulfillment PTE.
Note: This form is changed in R12 release. Please refer to latest Advanced Pricing
Implementation Guide for more details.
Source Systems
It is the application generating setup data. For example IStore, Oracle Pricing and AMS generate
modifiers. Hence these applications could be source system.
If these applications are sharing their setup data then they form one Pricing Transaction Entity.
Request types
The Request Type identifies the type of transaction that is being priced.
Different applications make requests to the pricing engine. Request structures of these applications
may be different. Some applications may share their request structures.
For example IStore and Order capture. They share same request structures. On the other hand,
Order Management and IStore have different request structures. If request type codes are not
unique then each request structure will have to provide PTE code to uniquely identify the request
type. As a result of this, each integrating application will have to change its request structure. Hence
to avoid this, Request type codes will be unique across PTEs.
Description: Figure 3, displays the Pricing Transaction Entity window with request
types associated with Order Fulfillment PTE.
Code
It is a short name of a request type.
Description
It is a description of a request type.
PROFILE OPTIONS
CONCURRENT PROGRAMS
Creating Contexts
In Attribute Management, you can set up the following contexts:
Qualifier Contexts and its attributes: Used to create qualifiers that determine eligibility for a
modifier (who is eligible to receive the modifier). Qualifiers can be attached to price lists (only in
Advanced Pricing) and modifiers.
Product Contexts and its attributes: Defines the product hierarchy related to product
information. For example, the product context Item may consist of attributes such as Item
Number and Item Category.
Pricing Contexts (associated with pricing attributes): Define eligibility for a price list line or
modifier. They can be used for a price list line, as a formula component, or in modifiers.
Description
It is a description of a context.
Seeded
Seeded check box is selected for the seeded context.
Enabled
Enable the context to make it available in Pricing Setup windows. If disabled, context will not be
displayed in pricing setup windows, and all the attributes defined under this context will also be
unavailable for setup.
Creating Attributes
Once the context is defined, you can create its attributes. Attributes determine the specific values in
which you define pricing rules. The pricing engine evaluates attributes during engine run time to
determine which price lists and modifiers are eligible for the transaction. Attribute values can be
derived at the order level, line level, or for both order and line levels.
To create new attributes
Description: Figure 5, displays the Context Setup window with Customer Group context and
the attributes created in this context.
Code
It is a short name of the attribute. This is an internal name that is unique for a given attribute. Once
created, it cannot be updated.
Name
It is a name of the Attribute.
Description
It is a description for the attribute.
Precedence
It is a numeric precedence value, which decides the processing sequence of qualifier/ pricing
attributes. The precedence is restricted to a maximum of 3 digits (any number between 1 and 999).
For example, if two incompatible discounts qualify for the same item, then the discount with the
higher precedence is given. Precedence numbers in the series of 5's and 10's are reserved for seeded
qualifiers/pricing attributes and should not be used.
Application Name
It is an Application name that created this attribute. If an Application name is not entered, Oracle
Pricing will be defaulted to the Application Name.
The following tables display the seeded Request Types and Source Systems for each PTE:
Pricing Transaction Entity Source Systems Request Types
Complex MRO AHL AHL
Demand Planning QP MSD
Intercompany Transaction INV, QP IC
Logistics FTE FTE
Order Fulfillment AMS, ASO, OKC, ASO, OKC, OKS,
OKS, QP ONT
Procurement PO PO
Description: Figure 7, displays the Attribute Mapping window and the various fields.
Following fields are specific to define attribute mapping.
Level
This field indicates whether the attribute is at „Order‟ level or „Line‟ level or at „Both‟. For example,
the level is „Order‟ for an attribute „agreement_id‟. It means that only the header level
„agreement_id‟ will be attribute mapped whereas agreement_id on order lines will not be attribute
mapped.
This „level‟ is also used to selectively display pricing attributes/qualifiers in the LOVs while setting
up modifiers/formulas/price list/qualifier.
Attribute Mapping Method
There are four different ways to define how an attribute is mapped:
Request Type
It is a Request type associated to PTE.
Description
It is a description of Request type.
Application Profile: Select the profile option from where you want to get the default value for this
attribute. A LOV will provide a list of valid profile options such as OE: Item Validation
Organization.
PL/SQL API: Attribute can be sourced directly from a global structure defined for the given
source system or can be sourced from seeded or custom PL/SQL API. The parameters passed to
the PL/SQL API should be valid columns and we cannot pass the entire structure. For example,
sourcing rule like CUSTOM_PKG.CUSTOM_API (OE_ORDER_PUB) is invalid.
For Order Management all the record structures are defined in the package OE_ORDER_PUB.
For example, if you want to use payment term id as the source value for the new segment that you
have defined, enter OE_ORDER_PUB.G_LINE.payment_term_id in the function name. You
have two record structures available. OE_ORDER_PUB.G_LINE contains all the possible values
of a sales order line. OE_ORDER_PUB.G_HDR contains fields from Order header. Structure of
the Line_rec_type and header_rec_type can be obtained from the Manufacturing Open Interface
Manual. (For I*Store/OC the equivalent global structures are defined in the package
ASO_PRICING_INT.
PL/SQL API Multi-Record: We can write a custom API (must be a function) that returns
multiple values. The output of our function can only be a table of VARCHAR2‟s.
Constant Value: Constant value. Enter a constant value that will always be mapped to this
attribute for the given condition. Ex.100
System Variable: System Variable. Enter the system variable that will be mapped to the attribute
for the given condition. Ex. SYSDATE
Navigation: Oracle Pricing Manager responsibility -> Setup -> Attribute Management -> Attribute
Linking and Mapping.
Description: Figure 10, displays the item AS54999 being added to the Price List
Corporate Customer - Site Use Level
Navigation: Oracle Pricing Manager responsibility -> Setup -> Attribute Management-> Contexts
and Attributes
Navigation: Oracle Pricing Manager responsibility -> Setup -> Attribute Management ->
Attribute Linking and Mapping -> Link Attributes
Description: Figure 16, displays window for attribute linking and mapping.
Description: Figure 19, qualifier has qualifier the modifier application and the unit
price has changed. The modifier details can be seen.
Attributes can also be passed to the pricing engine directly, without the need for an attribute
mapping rule. In such cases, the Attribute Manager API calls a custom API,
QP_CUSTOM_SOURCE, where the user has manually defined the attributes being passed and
coded the sourcing of their values.
The Pricing Type can be H (Header) or L (Line), which defines the level of the attribute mapping
rule. These attributes and their values are passed to the pricing engine in the same manner as the
attributes sourced through attribute mapping rules.
Profile option:
QP: Custom Sourced – YES
PROCEDURE Get_Custom_Attribute_Values
(p_req_type_code IN VARCHAR2
, p_pricing_type_code IN VARCHAR2
, x_qual_ctxts_result_tbl OUT
QP_ATTR_MAPPING_PUB.CONTEXTS_RESULT_TBL_TYPE
, x_price_ctxts_result_tbl OUT
QP_ATTR_MAPPING_PUB.CONTEXTS_RESULT_TBL_TYPE
);
Parameters:
p_req_type_code
Request Type Code. Ex. ONT.
p_pricing_type_code
- 'L' for Line and 'H' for Header Level attribute mapping rule.
x_qual_ctxts_result_tbl
- Qualifier attributes result table.
x_price_ctxts_result_tbl
- Pricing attributes result table.
If profile option QP: Custom Sourced is set to Yes, Attribute Manager API Build_Contexts will call
QP_CUSTOM_SOURCE.Get_Custom_Attribute_Values procedure to source custom mapped
attributes. i.e., attributes with attribute Attribute Mapping Method=CUSTOM SOURCED.
Example code:
The following example explains how a customer may code the body of QP_CUSTOM_SOURCE
for a particular case.
In this case, two segment mapping columns, 'QUALIFIER_ATTRIBUTE31' and
'PRICING_ATTRIBUTE31' that belong to contexts CUST_SOURCE_QUAL_CON and
CUST_SOURCE_PRIC_CON respectively and linked to PTE 'Order Fulfillment', will have
Custom Sourced values as 10 for ORDER as well as LINE Attribute Mapping levels. The user
must ensure that the Attribute Mapping method for both these PTE-Attribute links is CUSTOM
SOURCED in the 'Attribute Linking and Mapping' setup window.
PROCEDURE Get_Custom_Attribute_Values
(p_req_type_code IN VARCHAR2
, p_pricing_type_code IN VARCHAR2
, x_qual_ctxts_result_tbl OUT
QP_ATTR_MAPPING_PUB.CONTEXTS_RESULT_TBL_TYPE
, x_price_ctxts_result_tbl OUT
QP_ATTR_MAPPING_PUB.CONTEXTS_RESULT_TBL_TYPE
) is
Begin
/* Note:
a) Assign Context Code to context_name parameter and not the name of the context.
b) Assign Column Mapped for the attribute to attribute_name parameter and not the attribute
name.
c) Ensure that attribute_value is assigned to NOT NULL value, otherwise the attribute will not
get sourced and not used by pricing engine for calculation.
*/
End Get_Custom_Attribute_Values;
END QP_CUSTOM_SOURCE;
/
Please note that, context_name is actually the context code and not the name of the context. Also,
attribute_name is the column mapped for the attribute and not the attribute name.
Please check QP: Custom Sourced profile is set to Yes for the Attribute Manager API
Build_Contexts to call QP_CUSTOM_SOURCE.Get_Custom_Attribute_Values
procedure to source custom mapped attributes.
Please set QP: Debug profile to „Request Viewer On‟ and reproduce the issue. Look at the
Pricing Engine Request Viewer and see the custom sourced attribute is sourced correctly
and the value assigned to the attribute is matched with the setup value in the
pricelist/modifier/formula setup. Please see 'Pricing Engine Request Viewer – Attributes
section‟ in Advanced Pricing implementation guide on how to use Pricing Engine Request
Viewer for attribute sourcing issues.
Please check the string 'Before Calling Custom Sourcing Package' in the debug log and
make sure that there is no exception/error message thrown in custom API call and check
the number of custom attributes sourced. Also, check the output of the following SQL to
determine the error message thrown in the custom package:
View the controls passed by the calling application to the pricing engine such as Events,
Rounding Flag, Search and Calculate Flag, GSA Flag.
View price request line passed in by the calling application.
QP: Debug: To start the Pricing Engine Request viewer, set the profile QP: Debug to "Request
Viewer On." Alternately, select Request Viewer Off to turn the Request Viewer off. This profile
option can be updated at the user level.‟
The pricing engine request viewer is only active for the transactions of the user who set this profile
option; other users' transactions are not affected. The default value is set to Request Viewer Off.
If the profile is set to "Request Viewer On, but the Debug Log is not visible in the Request
Viewer," then the Request Viewer captures pricing request details into the pricing debug tables, but
the debug log information is not written into the debug log table. The debug log text file will be
created.
QP: Set Request Name: Set the value of the profile option QP: Set Request Name to append the
value of the profile with Order ID to be stored in the Request Name field. The default value is
Null.
Navigation Path
The Pricing Engine Request Viewer window is available from within Oracle Order Management.
The navigation path is: Sales Order window > Tools > Pricing Engine Request Viewer. It is also
available on the menu for Pricing Manager Responsibility.
Please see Pricing Engine Request Viewer window section In Oracle Advanced Pricing
implementation guide for more information.
Interpreting Attributes in PERV for attribute sourcing issues
1 QP_Attr_Mapping_PUB package is invalid due Check dba_errors for this package to determine which attribute
to incorrect attributes mapping setup. mapping API is causing the error. If this is a custom API then
correct the API. If this is the seeded API then determine
whether a correction patch is available.
2 The concurrent program Build Attribute Execute the following statement and examine the output:
Mapping Rules failed with error.
Select line || „/‟ position POS, text from dba_errors where
name=‟QP_BUILD_SOURCING_PVT_TMP‟.
Check which attribute mapping API is causing this error.
If this is a custom API then correct the API. If this is the seeded
API then determine whether a correction patch is available.
Please refer to Point 14 for Patches available for upgrade issues
in seeded attribute sourcing rules.
Also, please execute the following SQL to get
QP_BUILD_SOURCING_PVT_TMP package body and check
the attribute mapping rule that might be causing syntax failure:
> set head off
NOTES
This test provides details of attribute mapping rules. It can be run for a single request type such as
ONT or for all request types. Use this test to find the attribute mapping rules that are invalid. All
details and link to download can be found on the Note 363052.1
CONCLUSION
As detailed above, Attribute Management provides flexibility for Pricing setup for various business
needs. Usage of attribute management for product, qualifier and pricing attributes provides
powerful and flexible capabilities within Advanced Pricing. In fact this feature is also called as an
extension of Advanced pricing because of the flexibility it provides. Using these features
successfully requires an understanding of the business process, the features and the required setup
in the application.
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
www.oracle.com