Webadi Guide
Webadi Guide
Author: Barinderpal Singh Virdi Dinesh Mendiratta Date written (MM/DD/YYYY): 20/04/2009 Declaration We hereby declare that this document is based on our personal experiences and experiences of our project members. To the best of our knowledge, this document does not contain any material that infringes the copyrights of any other individual or organization including the customers of Infosys.
Barinder pal Singh Virdi Dinesh Mendiratta Project Details Projects involved H/W Platform S/W Environment Application Type Project Type : ARWNAC : NA : Oracle Applications R12 : Oracle Apps : ERP Support
Target readers Beginners in Oracle Pricing Module Keywords Limits, Modifiers, Qualifiers. Scope: The document provides detail information on Modifiers and Qualifiers in Oracle Pricing Responsibility
Table of Contents
Creating Modifier
This document will provide us detail information on Modifiers and Qualifiers under Oracle Pricing Manager Responsibility. In order to create a modifier list navigate to Oracle Pricing Manager ModifiersModifier Set Up
In order to create Modifier we need to follow following steps: 1. On the Main tab, select the Modifier Type. A modifier type can be Deal, Discount List, Promotion, Surcharge List and Freight and Special Charge List 2. Within the Number field, enter a modifier list value. 3. Select or clear the Active check box. If the Active check box is selected, then the modifier is considered to be active. For expired modifiers, active check box is unchecked. 4. Select or clear the Automatic check box: a. If selected, the Automatic check box is also selected at the line level. Then the modifier becomes automatic and it is applied automatically. b. If cleared, then the modifier is considered a manual modifier and the adjustment must be applied manually rather than automatically. 5. Now, enter a value in the Name field for identifying the modifier. The modifier name should be unique name.
6. A Global check box is checked if the Pricing Security Control Profile is set to ON. If the check box is selected, the modifier list can be used for all operating units in order to do pricing transactions. If this checkbox is cleared, the modifier's use is restricted to the operating unit of the user creating the modifier list. In the later case the user needs to specify Operating Unit for the given modifier list 7. If the modifier Type is Promotion or Deal then user shall enter version. 8. Enter the Start and End Date range for the modifier. These dates determine the validity period of a modifier a. When a qualifier is attached to a price list or modifier header, the effective dates of that qualifier will determine the effective dates for modifier list rather than effective dates on Modifier list. For example, suppose we create a price list with start date as 20-APR-2009 and no end date; then we create a qualifier at the header level with effective dates of 22-APR-2009 and 25-APR-2009 for customer Sky Electronics. However, after 25-APR-2009, the price list will not be valid for Sky Electronics customer or any other customer. b. If we do not enter start and end dates and rather we select Active flag, the list is effective from the modifier creation date. 9. Select a currency. If a currency is selected such as US dollars (USD), the sales order currency must match the modifier currency to determine pricing for the order. 10. Enter a description for the modifier list. If the modifier list Type is Promotion or Deal, select the Advanced tab. On the Advanced tab 11. If the modifier list Type is Promotion or Deal, select the advanced tab. 12. The modifier list types of Promotion and Deal have a parent-child relationship for reporting purposes. A Deal modifier list must be associated with a parent Promotion by providing the promotion name and version. 13. Enter the Parent Number and Parent Version to specify the promotion to which the deal is associated. 14. Select the Ask for box to create an Ask for modifier. This means the customer must specifically request that the modifier benefit be applied (for example, by providing a special discount number), otherwise it will not be applied. The Ask for box is only available for modifier list types of Deal and Promotion. 15. In the Date Type I field, specify Order Date and a date range.
In the Date Type II field, specify Scheduled Ship Date and a date range. The Order Date and Scheduled Ship Date are passed by Order Management and cannot be changed. If we and Scheduled Ship Date, the sales order must meet both enter dates for both Order Date dates to be eligible for the modifier On the Other tab 16. This tab displays the following information including details related to sales agreement: a. List Source Document Number: This number signifies the number of sales agreement associated with the modifier created by the user. b. List Source Code: The code associated with the source of modifier is displayed against this tab. c. Pricing Transaction Entity (PTE): This is non-updatable field which displays the pricing transaction entity associated with the modifier. The value of Pricing Transaction Entity is defaulted from the PTE which is used while creating this modifier. d. Source System Code: This tab displays the source system code of the modifier, for example for pricing the source system code will be QP. e. Shareable box: This checkbox indicates whether the modifier is shared or not. In case this modifier is non-shareable, then it is specific to that sales agreement and it cannot be used for other sales agreements. In case the modifier is shareable, then the modifier is not exclusive to the sales agreement and it can be used with other sales agreements.
The item description for which the given modifier is applicable is added under Modifier Summary tab. After adding Item Details the user needs to add application method which can be Percent, Amount and New Price in most cases. All these application methods are different way of providing discounts on item which is explained below with an example: Let us consider Pen as an item with selling price on sales order as 20$.And the value of Discount as 5.In case the application method is New price, then it means that the pen selling price is 5$.If the application method is Percent then the new selling price is 20(5/100*20) =19$ .Further if this application method is amount then new selling price will be 20-5=15$.
We need to create qualifiers to determine the eligibility as on which sales orders this modifier can be applied. If an order is not eligible for a modifier list, then even in case the sales order is eligible for qualifiers created at line level., it will not be considered as eligible for that modifier list To create List-level qualifiers: 1. Navigate to the Advanced Pricing - Define Modifier window.
2. Now click on List Qualifiers within Main Tab to display the Qualifier Groups window. If qualifiers are associated with the modifier list, then Qualifier Groups window does not display. 3. In case we do not want to add qualifiers from qualifier groups, then click Cancel. Alternately, in case we want to add qualifiers from qualifier groups, select one or more qualifier groups that we want to attach. 4. Now we shall select one of the grouping options (Retain Grouping Numbers Across Qualifier Groups or Generate Unique Grouping Numbers Across Qualifier Groups). 5. Further Click OK for the system to display the Qualifier window. In this window, the qualifiers associated with the qualifier groups are listed. 6. One can add, change, and delete individual qualifiers and change the grouping numbers or dates. If we have attached qualifier groups, then verify that the grouping numbers in the window display the correct combination of and and or conditions. For Example we have two qualifiers as operating unit and sales order number. In case these qualifiers have same grouping number then a sales order will become eligible in case it satisfies either of these condition i.e. all sales orders will operating unit as specified in qualifier will be eligible for this modifier. Also the sales order number specified under qualifier will become eligible. But in case these qualifiers have different grouping number then a sales order will become eligible in case it has same operating unit and same order number as specified. 7. Enter the Grouping Number. Qualifiers with the same grouping number generate an and condition, and qualifiers with different grouping numbers generate an or condition. If -1 is used as a qualifier grouping number, the qualifier is used as an and condition for each qualifier group so we are not required to manually add it to each qualifier group. 8. After this, enter the Qualifier Context and Qualifier Attribute. 9. Enter the Operator, Value From, and Value To. If we need to define a Value From/To range using negative numbers, enter the range from lowest to highest value. For example, to define a Volume Order Amount between -99999 to -1, enter the Value From = -99999 and the Value To = -1. Enter value in column Value To only when the Operator is BETWEEN. 10. The Value From Meaning field provides additional details about the selected qualifier. For example, if the qualifier context is CUSTOMER and the attribute is Ship To, the Value From displays the customer name and Value From Meaning displays the site use location for the customer. If the context/attribute combination has no additional details, then Value From and Value From Meaning are identical.
11. In order to copy groups click Copy Groups to add qualifiers from other qualifier groups, and enter Start and End dates of the qualifier. 12. Check and, if necessary, adjust the precedence numbers that default from the qualifier definition. The pricing engine uses the Precedence to resolve incompatibility. If multiple modifiers are eligible within the same phase and incompatibility level, the modifier with the lowest precedence is applied. 13. Click OK and save your work. The start and end dates of the list qualifiers must be within the start and end date of the modifier
10
In case qualifiers are added on Modifier level then they become Header Level Qualifiers i.e. they are applicable to all the items attached at line level under Modifier Summary tab. These qualifiers will be an additional condition along with Line Level Qualifiers. In above screen shot qualifier added by clicking on List Qualifiers will be applicable to both items AD8310ARMZREEL7^ADI and FPF2500^FAIRCHILD. Line Level qualifiers are applicable to items attached to that specific line under Modifier Summary tab. In above screen shot qualifier added by clicking on Line Qualifiers will be applicable to FPF2500^FAIRCHILD item only.
11
Oracle Advanced Pricing enables us to set limits for benefits that a customer can receive for a promotion, deal, or other modifier. These limits can be set on various basis. For example in case the discount set on a modifier is 15 percent then in case the basis set on Limits screen is Item Quantity and amount value is 1000 then ,it specifies that first 1000 quantity on a sales order/orders are eligible for this modifier. So in this case the quantity will keep reducing as a modifier is applied on the sales order/orders. Limits of Modifiers can be also be used to set limits for a specific monetary value.For example in case the discount set on a modifier is 20 percent , the basis for the same is Cumulative Discount Amount and the value is amount column is 500$, then in such case the value specifies that the discount will be applied till this amount is reduced to zero.In case the selling price of an item eligible for a given modifier is 100$, and discount of this item is 20 percent which is equal to 20$.The number of items which will be eligible for this modifier will be 500/20=25 items. We can define a limit across the current transaction or across all transactions to which a promotion or modifier has been applied.
12
Enforcing Limits Oracle Advanced Pricing enables us to set up an enforcement policy to manage transactions if the promotional limits are exceeded. When the benefit amount for a transaction or transaction lines exceed the set limit or available limit balance, the default handling method resolves the situation. For example, if a customer close to their promotional limit places a new order that exceeds their limit amount, under a soft limit the customer gets the full promotion benefit applied to the order. A status message is sent to the calling application (such as Order Management) that the limit has been exceeded. The default limit enforcement is set up by the System Administrator in the QP: Limit Exceed Action profile option. We can accept the default or optionally, select an alternative handling method. The following limit handling methods are available: Hard - Adjust Benefit Amount: Any partial benefit available will be given up to the limit. A promotion based on Usage (number of times it is given) is considered to be a hard limit. Soft - Full Benefit Amount: The full benefit of the promotion is given and a message is sent to the calling application to advise that the limit has been exceeded. If a limit is exceeded, then the order header and lines need to be placed on a promotional limit hold until appropriate business processes allow progression of the entire sales order. These processes may involve adjusting the promotional limits or repricing the order. In addition to setting hard and soft limits we can also make the following adjustments when the limit is exceeded: Adjust the limit up or down while the enforcement is operating. Deactivate the promotion or increase the remaining available limit.
13
Oracle Advanced Pricing enables us to view balances for a given limit. We can also view available amount and consumed amount for a selected limit. For a selected balance, we can view the transactions that have consumed the balance. The available balance is calculated using the following formula: Available balance = Limit Amount - sum of (Consumed Amounts from saved Transactions) Manual versus Automatic Updating of Limit Balances For most transactions, limit balances are updated automatically in case limit amount is changed or in case sales orders are re-priced. However, some balances needs manual update .For example, in case of RMA, cancelled, and deleted orders. In order to update the limit balances manually, we must click on Update balances. As transactions are processed, the discount value is subtracted from the available limit balance. The available balance for successful transactions such as a booked order line or transactions in progress; for example, entered sales order line ( sales order line which is entered but not saved or booked) is updated by pricing engine.
14
However, in case when transaction is roll backed, then also the balance is updated but there can be case that true balance may not reflect back. Order Management), the balance is still updated and in such cases we shall manually update the balance. Once the order or order line is saved and booked, then the available limit balance is reduced by the amount of the completed transaction(s). To view a limit balance: 1. Navigate to the Define Limits window. The limits and their balances are displayed in the Balances region. In case the limit is arranged by category such as sales organizations, product attributes, or qualifier attributes, then limit balances are displayed against each category. 2. The Available field signifies the left amount of a limit or sub-limit remaining. In case the limit To view limit transaction details: 1. Navigate to the window named--Define Limits. 2. Now select the balance whose transaction details we are interested to check. 3. Click on Transactions in order to check transaction details in Define Transactions window: Date Request: Display the date the transaction occurred. Price Request Code: Displays the pricing code automatically for an Automatic transaction. You can enter a pricing code manually for a Manual transaction. The price request code will contain ONT keyword (which tells that the transaction is order management based) concatenated with sales order header Id and sales order Line Id. Manual: This is enabled in case of a manual transaction. A manual transaction can updated, deleted, or added. Amount: It signifies the amount of limit consumed Request Type: It displays the name of the calling application which is mostly Order Management. Reason: Under this tab the reason for the transaction is displayed. The user can enter a manual reason in case of manual adjustments. The Define Transactions window displays all the transactions which are applied against the limit. We can adjust the limit balances by manually adding new transactions or updating existing manual transactions in Define Transactions window. The pricing engine
15
cannot update or delete a limit transaction. Only manual transactions can be added, update and deleted. Technical Details: Oracle Advanced Pricing comes with number of APIs to update standard table. Most of the commonly used APIs are required to update or create modifiers header or lines, to update limits on modifiers and to reverse limits (quantity) consumed against a sales order line. In order to create or update the balances of a modifier, then we can use qp_limits_pub.process_limits API. The code snippet to use this API is given below: DECLARE ---This variable will store Limit Amount against Input Authorization id -l_num_amt qp_limits.amount%TYPE; ---This variable will be used to store Limit Id against Input Authorization id -l_num_limit_id qp_limits.limit_id%TYPE; ---This table type will be input to QP_LIMITS_PUB.PROCESS_LIMITS API and it will also have Limit Id details -l_tbl_limit_balances qp_limits_pub.limit_balances_tbl_type; l_tbl_limit_balances_val qp_limits_pub.limit_balances_val_tbl_type; l_limits_rec qp_limits_pub.limits_rec_type; l_limits_val_rec qp_limits_pub.limits_val_rec_type; l_limit_attrs_tbl qp_limits_pub.limit_attrs_tbl_type; l_limit_attrs_val_tbl qp_limits_pub.limit_attrs_val_tbl_type; l_limit_balances_tbl qp_limits_pub.limit_balances_tbl_type; l_limit_balances_val_tbl qp_limits_pub.limit_balances_val_tbl_type; ---This variable stores the status of called API -l_chr_retstatus VARCHAR2 (1); ---This variable stores the return message of called API -l_chr_retstatus_msg VARCHAR2 (4000); l_num_count NUMBER; BEGIN SELECT qpl.amount, qpl.limit_id INTO l_num_amt, l_num_limit_id FROM qp_list_headers_vl qlhv, qp_list_headers_all_b qlhab, qp_modifier_summary_v qpms, qp_limits qpl WHERE qlhv.description = '<Pass the name of Modifer Here>' AND qlhv.list_header_id = qlhab.list_header_id AND qpms.list_header_id = qlhab.list_header_id AND UPPER (qpms.modifier_level_code) = 'LINE' AND qpms.list_line_id = qpl.list_line_id AND UPPER (qpl.limit_level_code) = 'ACROSS_TRANSACTION' AND UPPER (qpl.basis) = 'QUANTITY'
16
AND TO_NUMBER (qpms.product_attr_val) = <Pass Inventory Item Id for which Modifier is created> AND qpl.multival_attr1_type IS NULL AND qpl.multival_attr1_context IS NULL AND UPPER (qpms.product_attribute_context) = 'ITEM' AND UPPER (qpms.product_attribute_type) = 'ITEM NUMBER' AND UPPER (qpms.product_attr) = 'PRICING_ATTRIBUTE1' AND TRUNC (NVL (qpms.start_date_active, SYSDATE)) <= TRUNC (SYSDATE) AND TRUNC (NVL (qpms.end_date_active, SYSDATE)) >= TRUNC (SYSDATE); l_tbl_limit_balances (1).limit_balance_id := fnd_api.g_miss_num; l_tbl_limit_balances (1).created_by := fnd_global.user_id; l_tbl_limit_balances (1).last_updated_by := fnd_global.user_id; l_tbl_limit_balances (1).available_amount := l_num_amt; l_tbl_limit_balances (1).reserved_amount := 0; l_tbl_limit_balances (1).consumed_amount := 0; l_tbl_limit_balances (1).operation := qp_globals.g_opr_create; -- pass it as qp_globals.g_opr_update --in case we want to update the limits of existing modifier l_tbl_limit_balances (1).limit_id := l_num_limit_id; ---Calling QP_LIMITS_PUB.PROCESS_LIMITS API in order to create limit balance Id -DBMS_OUTPUT.put_line ('******BEFORE CALLING QP_LIMITS_PUB.PROCESS_LIMITS API IN ORDER TO PROCESS LIMITS OF MODIFIER**** ' ); qp_limits_pub.process_limits (p_api_version_number => 1.0, x_return_status => l_chr_retstatus, x_msg_count => l_num_count, x_msg_data => l_chr_retstatus_msg, p_limit_balances_tbl => l_tbl_limit_balances, p_limit_balances_val_tbl => l_tbl_limit_balances_val, x_limits_rec => l_limits_rec, x_limits_val_rec => l_limits_val_rec, x_limit_attrs_tbl => l_limit_attrs_tbl, x_limit_attrs_val_tbl => l_limit_attrs_val_tbl, x_limit_balances_tbl => l_limit_balances_tbl, x_limit_balances_val_tbl => l_limit_balances_val_tbl ); DBMS_OUTPUT.put_line ('Return status: ' || l_chr_retstatus); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Error Code: ' || SQLCODE); DBMS_OUTPUT.put_line ('Error Message: ' || SQLERRM); END;
In order to update balances of a modifier we can use QP_LIMIT_CONC_REQ.UPDATE_BALANCES API. The return code can be used to determine if the API has ended successfully or not. In case this return code is 0 then API has successfully updated balances else wise API has ended in error . The code snippet to use this API is given below: DECLARE l_num_authorization_number NUMBER;
17
---This variable will be used to store return success/error code on calling QP_LIMIT_CONC_REQ.UPDATE_BALANCES API -l_num_retcode NUMBER := 0; ---This variable stores list line id -l_num_list_line_id qp_modifier_summary_v.list_line_id%TYPE; ---This variable will store Limit Balance Id -l_num_limit_balance_id qp_limit_balances.limit_balance_id%TYPE; ---This variable stores the return message of called procedure -l_chr_retstatus_msg VARCHAR2 (4000); ---This variable will be used to store Limit Id against Input Authorization id -l_num_limit_id qp_limits.limit_id%TYPE; BEGIN SELECT qpl.limit_id, qpms.list_line_id, qlb.limit_balance_id INTO l_num_limit_id, l_num_list_line_id, l_num_list_line_id FROM qp_list_headers_vl qlhv, qp_list_headers_all_b qlhab, qp_modifier_summary_v qpms, qp_limits qpl, qp_limit_balances qlb WHERE qlhv.description = '<Pass Here Name of Modifier>' AND qlhv.list_header_id = qlhab.list_header_id AND qpms.list_header_id = qlhab.list_header_id AND UPPER (qpms.modifier_level_code) = 'LINE' AND qpms.list_line_id = qpl.list_line_id AND UPPER (qpl.limit_level_code) = 'ACROSS_TRANSACTION' AND UPPER (qpl.basis) = 'QUANTITY' AND TO_NUMBER (qpms.product_attr_val) = <Pass Inventory Item Id for which Modifier is created> AND qpl.multival_attr1_type IS NULL AND qpl.multival_attr1_context IS NULL AND UPPER (qpms.product_attribute_context) = 'ITEM' AND UPPER (qpms.product_attribute_type) = 'ITEM NUMBER' AND UPPER (qpms.product_attr) = 'PRICING_ATTRIBUTE1' AND qpl.limit_id = qlb.limit_id AND TRUNC (NVL (qpms.start_date_active, SYSDATE)) <= TRUNC (SYSDATE) AND TRUNC (NVL (qpms.end_date_active, SYSDATE)) >= TRUNC (SYSDATE); DBMS_OUTPUT.put_line ('******BEFORE CALLING QP_LIMIT_CONC_REQ.UPDATE_BALANCES API IN ORDER TO UPDATE BALANCES OF MODIFIER**** ' ); qp_limit_conc_req.update_balances (x_retcode => l_num_retcode, x_errbuf => l_chr_retstatus_msg, p_list_header_id => l_num_authorization_number, p_list_line_id => l_num_list_line_id, p_limit_id => l_num_limit_id, p_limit_balance_id => l_num_limit_balance_id
18
); DBMS_OUTPUT.put_line ('Return Code: ' || l_num_retcode); DBMS_OUTPUT.put_line ('return Message: ' || l_chr_retstatus_msg); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Error Code: ' || SQLCODE); DBMS_OUTPUT.put_line ('Error Message: ' || SQLERRM); END; In case there is requirement to reverse already consumed quantity on modifier, then we can make use of QP_UTIL_PUB.REVERSE_LIMITS API. The code snippet to use this API is mentioned below: DECLARE ---This variable will store Price request code on sales order line -l_chr_price_request_code oe_order_lines_all.price_request_code%TYPE; ---This variable will store Sales Order Line Id -l_num_so_line_id NUMBER; ---This variable will store Sales Order Header Id -l_num_so_header_id NUMBER; ---This variable will store Sales Order Shipped Quantity -l_num_shipped_quantity NUMBER; ---This variable stores the status of called procedure -l_chr_retstatus VARCHAR2 (1); ---This variable stores the return message of called procedure -l_chr_retstatus_msg VARCHAR2 (4000); BEGIN SELECT oola.line_id, oola.header_id, oola.price_request_code, oola.shipped_quantity INTO l_num_so_line_id, l_num_so_header_id, l_chr_price_request_code, l_num_shipped_quantity FROM oe_order_headers_all ooha, oe_order_lines_all oola, mtl_system_items_b msib WHERE ooha.header_id = oola.header_id AND ooha.order_number = '<Pass Here ORDER NUMBER>' AND oola.inventory_item_id = msib.inventory_item_id AND msib.organization_id = oola.ship_from_org_id AND msib.segment1 LIKE '<Pass here Item Name>; IF (l_chr_price_request_code IS NULL) THEN l_chr_price_request_code :=
19
('ONT-' || l_num_so_header_id || '-' || l_num_so_line_id ); END IF; DBMS_OUTPUT.put_line ('******BEFORE CALLING QP_UTIL_PUB.REVERSE_LIMITS API IN ORDER TO REVERSE LIMITS OF MODIFIER**** ); qp_util_pub.reverse_limits (p_action_code => 'CANCEL', p_cons_price_request_code => l_chr_price_request_code, p_orig_ordered_qty => l_num_shipped_quantity, p_amended_qty => l_num_shipped_quantity, p_ret_price_request_code => NULL, p_returned_qty => NULL, x_return_status => l_chr_retstatus, x_return_message => l_chr_retstatus_msg ); DBMS_OUTPUT.put_line ('Return Code: ' || l_chr_retstatus); DBMS_OUTPUT.put_line ('return Message: ' || l_chr_retstatus_msg); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Error Code: ' || SQLCODE); DBMS_OUTPUT.put_line ('Error Message: ' || SQLERRM); END; Reference(s)
Web Link:
https://metalink.oracle.com/CSP/ui/index.html
20