0% found this document useful (0 votes)
339 views19 pages

Creating Custom Context Attributes

1) A custom qualifier context and attribute are created to define an additional attribute (EDP Number) for items in Oracle Advanced Pricing. 2) A PL/SQL package is used to fetch the EDP Number value for an item in a sales order. This package is linked to the custom attribute. 3) A modifier is created to apply a 10% discount on sales order lines where the item's EDP Number matches a specified value.

Uploaded by

ahosainy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
339 views19 pages

Creating Custom Context Attributes

1) A custom qualifier context and attribute are created to define an additional attribute (EDP Number) for items in Oracle Advanced Pricing. 2) A PL/SQL package is used to fetch the EDP Number value for an item in a sales order. This package is linked to the custom attribute. 3) A modifier is created to apply a 10% discount on sales order lines where the item's EDP Number matches a specified value.

Uploaded by

ahosainy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Creating Custom Qualifier Contexts and Attributes

Vamsi Krishna Mantripragada

1|Page
Contents
Applies to : .................................................................................................................................................................................2
Goal:.............................................................................................................................................................................................3
Solution:......................................................................................................................................................................................3
Pricing Components:.................................................................................................................................................................4
Implementation Steps:..............................................................................................................................................................5
Queries:.....................................................................................................................................................................................18

2|Page
Applies to :
Oracle Advanced Pricing - Version: 11.5.8 and later [Release: 11.5 and later ]

Goal:
This note explains the details of creating custom qualifier context, its attributes and attribute linking &
mapping using a custom source. Explains how to accomplish following business scenario.

Business Scenario: We have an additional attribute (EDP Number) defined for Items and based on which
we need to apply some discounts for the items while placing sales orders on those Items.

Solution:
1. Create items and assign a value for the attribute EDP Number (For ex 64514)

2. Assign the Item to a price list

3. Create a Qualifier context

4. Create an Attribute for the qualifier context

5. Create a pl/sql package which determines/fetches the value of EDP Number for the item being used in
the Sales Order

6. Link the package created in above step to the attribute created.

7. Create a Modifier which decides the percentage of discount to be applied in the Sales order for the items

8. Create a line level qualifier for which sales order lines, above created modifier should be applied

9. Create a Sales order and check whether the discount is applied or not.

3|Page
Pricing Components:

Modifiers: Pricing modifiers control how the pricing engine can modify the pricing requests and pricing
request lines

Attribute Mapping: Attribute mapping is the process used to pass in data (from other applications or sys-
tems) that is not seeded in the delivered product into Oracle Advanced Pricing for use in price lists, modifi-
ers, agreements, qualifiers, and formulas.

Context : Contexts are a group of related pricing elements that can have attributes linked to them. In At-
tribute 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 at-
tributes in the product context help to define the product hierarchy. Attributes within a pricing context en-
able users to further define eligibility for a line.

Attribute: Attributes can be used as product, qualifier or pricing attributes. Attributes are linked to a Pri-
cing Transaction Entity depending on the defined Request Types

4|Page
Implementation Steps:

1. Create an Item and assign EDP Number as ‘64514’

2. Create a Price list and assign this Item to the Price List:
Navigation: Oracle Pricing Manager(resp) -> Price Lists -> Price List Setup

5|Page
6|Page
3. Create Qualifier Context:
Navigation: Oracle Pricing Manager(resp) -> Setup -> Attribute Management -> Context and Attributes

Enter Details as below:

Type: Qualifier Context

Code : LSS_EDP

Name: LSS_EDP

Description: Context for EDP Number Calculation

Enabled : Should be checked.

Save the details entered.

7|Page
4. Create Qualifier Attribute:

Code: LSS_EDP

Name: LSS_EDP

Description: Context Attribute for EDP Context

Precedence: 600

Application Name: Advanced Pricing

Qualifier Attribute: Qualifier_Attribute40 (Select the one of the available attributes)

5. Create a PL/SQL package which calculates EDP number for the item given in the Sales Order:
Package Specification:
8|Page
Package Body:

9|Page
6. Map the attribute created in step 5 with the package created in above step.
Navigation: Advanced Pricing Manager(resp) -> Setup -> Attribute Linking and Mapping

Select the Pricing Transaction Entry: Order Fulfillment

Context Type : Qualifier Context

Now select the Context created in Step5. i.e. LSS_EDP . Click on Link Attributes

Level: Line (At which level the discounts will be applied)

Attribute Mapping Method: ATTRIBUTE MAPPING

Lov Enabled : Should be checked

10 | P a g e
Select the Request Type, ASO and enter the details as below:

User Source Type: PL/SQL API

User Value String:


xxlss_edp_pricing_pkg.xxlss_get_edp_number(OE_ORDER_PUB.G_HDR.HEADER_ID)

Pl/sql package created in step7.

Now, select the Request Type as ONT and enter the details as below:

User Source Type: PL/SQL API

User Value String:


xxlss_edp_pricing_pkg.xxlss_get_edp_number(OE_ORDER_PUB.G_HDR.HEADER_ID)

Pl/sql package created in step7.

11 | P a g e
Save the details entered and close the window. A dialog box will be displayed which means that this
context attribute is not used in any of the setups(Price Lists/Dynamic Formula/Modifiers) yet.

If you observe the qualifier context, Assigned to PTE check box will be checked automatically.

12 | P a g e
7. Create a Modifier:
Navigation: Oracle Pricing Manager (resp) -> Modifiers -> Modifier Setup

Enter details as below:

Save the page.

Enter Modifier Line :

13 | P a g e
Here Application Method is percent and Value is 10 i.e. 10% of the discount is applied on the sales order
line.

Click on Line Qualifiers:

Qualifier Context: LSS_EDP (created in Step3)

Qualifier Attribute: LSS_EDP(Created in step4)

Precedence: 600 (Automatically be populated)

Value From: 64514 (For which category of EDP Number this discount has to be applied)

Click on Ok. A dialog box will be displayed.

14 | P a g e
8. Run the concurrent program, Build Attribute Mapping Rules.
Navigation: Oracle Advanced Pricing Manager (resp) -> Reports, Requests

Make sure that the concurrent program completed successfully.

15 | P a g e
9. Create a Sales Order:
Navigation: Order Management Super User(resp) -> Orders, Returns -> Sales Orders

Save the details entered, Click on Lines

Select the Item, 120A-6(Created in Step1).

Initially, Unit Selling Price $200 is assigned which is from the price list LSS_IBE_PriceList2012.

Save the Line.

16 | P a g e
Now the modified price will be displayed for the sales order line:

Click on Actions, Select View Adjustments

17 | P a g e
Here two discounts have been applied on the sales order line. One is Default Discount and the other is
applied through the modifier created XXLSS_EDP_MODIFIER. Click on Attributes.

Queries:
Queries to find the details of Custom Context and Attribute:

18 | P a g e
SELECT A.PRC_CONTEXT_TYPE, A.PRC_CONTEXT_CODE, A.SEEDED_FLAG SEEDED_CONTEXT,A.ENABLED_FLAG
CONTEXT_ENABLED, B.SEGMENT_ID, B.SEGMENT_CODE CODE,B.USER_PRECEDENCE,B.SEEDED_FLAG
SEEDED_ATTRIBUTE,B.SEGMENT_MAPPING_COLUMN COLUMN_MAPPED, C.SEGMENT_LEVEL LEVEL_CODE,
C.SEEDED_SOURCING_METHOD, C.USER_SOURCING_METHOD SOURCING_METHOD, C.SOURCING_ENABLED
SOURCING_ENABLED, C.USED_IN_SETUP USED_IN_SETUP, C.SOURCING_STATUS SOURCE_STATUS,C.LOV_ENABLED
LOV_ENABLED, C.LIMITS_ENABLED LIMITS_ENABLED,B.AVAILABILITY_IN_BASIC AVAIL_IN_BASIC
FROM QP_PRC_CONTEXTS_B A,QP_SEGMENTS_B B, P_PTE_SEGMENTS C
WHERE 1=1 AND A.PRC_CONTEXT_TYPE IN ('PRODUCT', 'QUALIFIER', 'PRICING_ATTRIBUTE')
AND B.PRC_CONTEXT_ID = A.PRC_CONTEXT_ID
AND C.SEGMENT_ID = B.SEGMENT_ID AND C.PTE_CODE = 'ORDFUL'
AND A.PRC_CONTEXT_CODE like 'LSS_EDP' AND A.PRC_CONTEXT_TYPE = 'QUALIFIER'
ORDER BY PRC_CONTEXT_TYPE, A.PRC_CONTEXT_CODE;

Query to find Sourcing Rule attached to the custom Attribute:

SELECT A.PRC_CONTEXT_TYPE, A.PRC_CONTEXT_CODE,A.SEEDED_FLAG SEEDED_CONTEXT, A.ENABLED_FLAG


CONTEXT_ENABLED,B.SEGMENT_ID, B.SEGMENT_CODE CODE, B.USER_PRECEDENCE,B.SEEDED_FLAG
SEEDED_ATTRIBUTE, B.SEGMENT_MAPPING_COLUMN COLUMN_MAPPED,C.SEGMENT_LEVEL LEVEL_CODE,
C.SEEDED_SOURCING_METHOD,C.USER_SOURCING_METHOD SOURCING_METHOD, C.SOURCING_ENABLED
SOURCING_ENABLED, C.USED_IN_SETUP USED_IN_SETUP,C.SOURCING_STATUS SOURCE_STATUS, C.LOV_ENABLED
LOV_ENABLED,C.LIMITS_ENABLED LIMITS_ENABLED, B.AVAILABILITY_IN_BASIC AVAIL_IN_BASIC
FROM QP_PRC_CONTEXTS_B A, QP_SEGMENTS_B B, QP_PTE_SEGMENTS C
WHERE A.PRC_CONTEXT_TYPE IN ('PRODUCT', 'QUALIFIER', 'PRICING_ATTRIBUTE')
AND B.PRC_CONTEXT_ID = A.PRC_CONTEXT_ID
AND C.SEGMENT_ID = B.SEGMENT_ID AND C.PTE_CODE = 'ORDFUL'
AND A.PRC_CONTEXT_CODE like 'LSS_EDP' AND A.PRC_CONTEXT_TYPE = 'QUALIFIER'
ORDER BY PRC_CONTEXT_TYPE, A.PRC_CONTEXT_CODE;

19 | P a g e

You might also like