Manual override option for Unit selling price in Order line level.

In OM R-12
Our client wants manual override option for Unit selling price in Order line level.
But there is no solution available to fulfill this requirment. To be able to manually override the price on a Sales Order line you
must have defined a manual modifier that qualifies for the Sales Order line in question. Without a suitable manual modifier the price cannot be changed.
This is current standard functionality.
Anybody can give some suggestion/workaround to override selling price in Order header level without using the modifiers.
regards,

Hi Kashif,
I'm finding it little difficult to buy Oracle Support's feedback with regards to R12 functionality for direct List Price update without using any modifier (manual or whatever). After all it is Oracle's product and they should know better. But test results in Solution Beacon's Vision 12.0.6 instance (http://www.solutionbeacon.com/tools_r12vision.htm) and documentation updates in R12 (R12.0.4) OM user guide & implementation manuals potray a different picture.
After your last post, I did a test in Solution Beacon's Vision 12.0.6 instance with following details:
OM: List Price Override Privilege = "Unlimited Access" at user level
OM: Discounting Privileges = "None" at user level
No manual modifiers defined and Order status = "Entered"
I could display the "List Price" field from folder under Line Items >> Main tab, override the list price to a new value and save. The unit selling price showed the new value based on updated List Price as soon as I tabbed out of the list price field after overriding. After saving it showed the new selling price. _Please note that under Line Items >> Pricing tab there is another "List Price" field and that is not editable_. For such overrides "View Adjustments" (from Line >> Actions) will not show any adjustment details as it is a direct update of list price.
Also please note that, if "Enforce List Price" checkbox is selected for the order type, the list price cannot be overridden even if the profile option is set to "Unlimited Access".
Document References:
Oracle® Order Management User's Guide
Release 12, Part No. B28099-03, September 2007 >> R12.0.4
Page No. 10-74
+Note: Note: If any order line for an order has the Calculate Price Flag value equal to Partial Price or Freeze Price new order level adjustments will not be applied or allowed to be overridden. _The profile option OM: List Price Override  Privilege controls your ability to override the unit list price. If you have this profile set to Unlimited, you may modify the unit list price by editing the current value displayed_. The original list price is saved in a hidden folder field, so you can display it if necessary+.
Page No. 10-94
User Procedures
_A new profile option, OM: List Price Override Privilege controls whether or not you can update the List Price_. It is enabled and updated at the application, responsibility and user level. It is not user visible and updatable. The values include+:
- View Only: This is the default value. If set to this value, the current behavior is retained, which means unit list price field is protected.
- Unlimited Privilege: If set to this value, you can override the unit list price field from the main tab and immediately see selling price adjusted accordingly.
To use Override List Price:
+1. Navigate to the Sales Orders/Quick Sales Orders window.+
+2. Enter the header and line information, including the ordered item and quantity, then tab to the next field. The Selling Price and List Price display+.
+3. If the profile is set to Unlimited Privilege, you can enter a new list price in the List Price field. You can either proceed to the next line or save your work+.
+4. You can see the new, entered list price, and if there are automatic discounts applied, they will be based on the new list price+.
+5. If the folder has been modified to show the Original List Price, the original list price displays+.
+6. To change the List Price again, go to the list price field and enter a new value, replacing a previously entered value. If Audit Trail is enabled for List Price and a reason is required, a window appears to enter a reason and optional comments+.
Note: Subsequent overrides of the List Price, after the order line is saved, can be captured by Audit Trail, depending on the setup of Audit Trail (entered or booked state) and any processing constraints that have been set up.
In the OM Implementation Manual also there are notes related to this.
OM Implementation Manual
Release 12, Part No. B25975-03, September 2007 >> R12.0.4
You can refer to page no. 2-59, C-4 etc.
Thanks
Supro

Similar Messages

  • Update Unit Price at Order Line Level

    Hi Sir, Ma'am,
    Is there a way to enable user to update the Unit Price at Order Line Lever without updating the Price List?
    Thanks in Advance,
    Nuel

    You can also enable the different adjustment (Manaully update allowed) so that you can use the same and update the unit selling price.
    This will keep the price list as it is and it will show unit list price for item as Origanl Price.
    Regards,
    Aks

  • Price from Order Line and Price from QP_PREQ_PUB.PRICE_REQUEST is different

    Hi,
    I have trouble in using QP_PREQ_PUB.PRICE_REQUEST to derive the price of an item.
    RDBMS : 11.1.0.7.0
    Oracle Applications : 12.1.3
    From the Pricing Request Viewer or from Order Entry Line, The price lis coming as expected, but not from QP_PREQ_PUB.PRICE_REQUEST API.
    Here are the details -
    Primary Price List - 'Primary'
    Secondary Price List - 'Secondary1' - Item Price 40 (Precedence 150)
    Secondary Price List - 'Secondary2' - Item Price 25 (Precedence 130) , Custom Qualifier Qualifier_Attribute31 = > Attribute1('Yes/No') from Item Master.
    From the application, it is giving 25. Where as using the below code it is giving 40, Can you please advise what could be the issue/fix for it?
    DECLARE
    p_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    p_qual_tbl QP_PREQ_GRP.QUAL_TBL_TYPE;
    p_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    p_LINE_DETAIL_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    p_LINE_DETAIL_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    p_LINE_DETAIL_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    p_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    p_control_rec QP_PREQ_GRP.CONTROL_RECORD_TYPE;
    x_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    x_line_qual QP_PREQ_GRP.QUAL_TBL_TYPE;
    x_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    x_line_detail_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    x_line_detail_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    x_line_detail_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    x_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    x_return_status VARCHAR2(240);
    x_return_status_text VARCHAR2(240);
    qual_rec QP_PREQ_GRP.QUAL_REC_TYPE;
    line_attr_rec QP_PREQ_GRP.LINE_ATTR_REC_TYPE;
    line_rec QP_PREQ_GRP.LINE_REC_TYPE;
    detail_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    ldet_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    rltd_rec QP_PREQ_GRP.RELATED_LINES_REC_TYPE;
    x_price_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    x_qual_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    v_line_tbl_cnt integer;
    I BINARY_INTEGER;
    l_version VARCHAR2(240);
    l_file_val VARCHAR2(60);
    L_MODIFIER VARCHAR2(4000);
    L_ADJUSTMENT_AMOUNT VARCHAR2(300);
    L_MOD_NAME VARCHAR2(240);
    l_unit_price number;
    l_selling_price number;
    BEGIN
    MO_GLOBAL.INIT('ONT');
    MO_GLOBAL.SET_POLICY_CONTEXT('S',89);
    --FND_GLOBAL.APPS_INITIALIZE(1130,21623,660);
    DBMS_OUTPUT.PUT_LINE('1');
    v_line_tbl_cnt := 1;
    ---- Control Record
    p_control_rec.pricing_event := 'BATCH';
    p_control_rec.calculate_flag := QP_PREQ_GRP.G_SEARCH_N_CALCULATE;
    p_control_rec.simulation_flag := 'Y';
    p_control_rec.source_order_amount_flag := 'Y';
    p_control_rec.PUBLIC_API_CALL_FLAG := 'N';
    p_control_rec.rounding_flag := 'Q';
    p_control_Rec.manual_discount_flag := 'N';
    --p_control_rec.MANUAL_ADJUSTMENTS_CALL_FLAG := 'Y';
    p_control_rec.request_type_code := 'ONT';
    p_control_rec.TEMP_TABLE_INSERT_FLAG := 'Y';
    DBMS_OUTPUT.PUT_LINE('2');
    line_rec.request_type_code :='ONT';
    --line_rec.PRICE_LIST_HEADER_ID := 8007;
    line_rec.line_id :=2125125; -- Order Line Id. This can be any thing for this script
    line_rec.line_Index :=1; -- Request Line Index
    line_rec.line_type_code := 'LINE'; -- LINE or ORDER(Summary Line)
    line_rec.pricing_effective_date := TRUNC(sysdate); -- Pricing as of what date ?
    line_rec.active_date_first := TRUNC(sysdate); -- Can be Ordered Date or Ship Date
    line_rec.active_date_second := TRUNC(sysdate); -- Can be Ordered Date or Ship Date
    line_rec.active_date_first_type := 'ORD'; -- ORD/SHIP
    line_rec.active_date_second_type :='SHIP'; -- ORD/SHIP
    line_rec.line_quantity := 1; -- Ordered Quantity
    line_rec.line_uom_code := 'EA'; -- Ordered UOM Code
    line_rec.currency_code := 'USD'; -- Currency Code
    line_rec.price_flag := 'Y'; -- Price Flag can have 'Y' , 'N'(No pricing) , 'P'(Phase)
    p_line_tbl(1) := line_rec;
    DBMS_OUTPUT.PUT_LINE('3');
    ---- Line Attribute Record
    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 :='Y';
    p_line_attr_tbl(1) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE1';
    --line_attr_rec.COMPARISON_OPERATOR_CODE         := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := '4466'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(2) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE1';
    --line_attr_rec.COMPARISON_OPERATOR_CODE         := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := '2395'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(3) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE30';
    --line_attr_rec.COMPARISON_OPERATOR_CODE         := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := 'Yes'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(3) := line_attr_rec;
    DBMS_OUTPUT.PUT_LINE('4');
    ---- Qualifier Attribute Record
    qual_rec.LINE_INDEX := 1; -- Attributes for the above line. Attributes are attached with the line index
    qual_rec.QUALIFIER_CONTEXT :='MODLIST';
    qual_rec.QUALIFIER_ATTRIBUTE :='QUALIFIER_ATTRIBUTE4';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM :='8007'; -- PRICE LIST ID
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG :='Y';
    p_qual_tbl(1) := qual_rec;
    DBMS_OUTPUT.PUT_LINE('5');
    qual_rec.line_index := 1;
    qual_rec.qualifier_context := 'ITEM';
    qual_rec.qualifier_attribute := 'QUALIFIER_ATTRIBUTE31';
    qual_rec.qualifier_attr_value_from := 'Yes';
    qual_rec.comparison_operator_code := '=';
    qual_rec.validated_flag := 'Y';
    p_qual_tbl (2) := qual_rec;
    DBMS_OUTPUT.PUT_LINE('6');
    OE_ORDER_PUB.G_LINE.inventory_item_id := 4466;
    DBMS_OUTPUT.PUT_LINE(Fnd_Profile.VALUE('QP_CUSTOM_SOURCED') );
    --QP_Attr_Mapping_PUB.Build_Contexts
    --( p_request_type_code => 'ONT',
    -- p_line_index => 1,
    -- p_pricing_type_code => 'L'
    QP_Attr_Mapping_PUB.Build_Contexts(
    p_request_type_code => 'ONT',
    p_pricing_type => 'L',
    --p_org_id => 89,
    x_price_contexts_result_tbl => x_price_contexts_result_tbl,
    x_qual_contexts_result_tbl => x_qual_contexts_result_tbl );
    I := x_qual_contexts_result_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Context: '||x_qual_contexts_result_tbl(I).context_name);
    DBMS_OUTPUT.PUT_LINE('attribute_name: '||x_qual_contexts_result_tbl(I).attribute_name);
    DBMS_OUTPUT.PUT_LINE('attribute_value: '||x_qual_contexts_result_tbl(I).attribute_value);
    EXIT WHEN I = x_qual_contexts_result_tbl.LAST;
    I := x_qual_contexts_result_tbl.NEXT(I);
    END LOOP;
    END IF;
    I := x_price_contexts_result_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Context: '||x_price_contexts_result_tbl(I).context_name);
    DBMS_OUTPUT.PUT_LINE('attribute_name: '||x_price_contexts_result_tbl(I).attribute_name);
    DBMS_OUTPUT.PUT_LINE('attribute_value: '||x_price_contexts_result_tbl(I).attribute_value);
    EXIT WHEN I = x_price_contexts_result_tbl.LAST;
    I := x_price_contexts_result_tbl.NEXT(I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE(Fnd_Profile.VALUE('QP_CUSTOM_SOURCED') );
    DBMS_OUTPUT.PUT_LINE('7');
    l_version := QP_PREQ_GRP.GET_VERSION;
    dbms_output.put_line(OE_ORDER_PUB.G_LINE.price_list_id);
    dbms_output.put_line(OE_ORDER_PUB.G_LINE.inventory_item_id);
    QP_PREQ_PUB.PRICE_REQUEST
    (p_line_tbl,
    p_qual_tbl,
    p_line_attr_tbl,
    p_line_detail_tbl,
    p_line_detail_qual_tbl,
    p_line_detail_attr_tbl,
    p_related_lines_tbl,
    p_control_rec,
    x_line_tbl,
    x_line_qual,
    x_line_attr_tbl,
    x_line_detail_tbl,
    x_line_detail_qual_tbl,
    x_line_detail_attr_tbl,
    x_related_lines_tbl,
    x_return_status,
    x_return_status_text);
    -- Return Status Information ..
    DBMS_OUTPUT.PUT_LINE('8');
    DBMS_OUTPUT.PUT_LINE('Return Status text '|| x_return_status_text);
    DBMS_OUTPUT.PUT_LINE('Return Status '|| x_return_status);
    DBMS_OUTPUT.PUT_LINE('+---------Information Returned to Caller---------------------+ ');
    DBMS_OUTPUT.PUT_LINE('-------------Request Line Information-------------------');
    I := x_line_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line Index: '||x_line_tbl(I).line_index);
    DBMS_OUTPUT.PUT_LINE('Unit_price: '||x_line_tbl(I).unit_price);
    DBMS_OUTPUT.PUT_LINE('Percent price: '||x_line_tbl(I).percent_price);
    DBMS_OUTPUT.PUT_LINE('Adjusted Unit Price: '||x_line_tbl(I).adjusted_unit_price);
    DBMS_OUTPUT.PUT_LINE('Pricing status code: '||x_line_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('Pricing status text: '||x_line_tbl(I).status_text);
    EXIT WHEN I = x_line_tbl.LAST;
    I := x_line_tbl.NEXT(I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE('-----------Pricing Attributes Information-------------');
    I := x_line_detail_attr_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line detail Index '||x_line_detail_attr_tbl(I).line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Context '||x_line_detail_attr_tbl(I).pricing_context);
    DBMS_OUTPUT.PUT_LINE('Attribute '||x_line_detail_attr_tbl(I).pricing_attribute);
    DBMS_OUTPUT.PUT_LINE('Value '||x_line_detail_attr_tbl(I).pricing_attr_value_from);
    DBMS_OUTPUT.PUT_LINE('Status Code '||x_line_detail_attr_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_attr_tbl.last;
    I:=x_line_detail_attr_tbl.NEXT(I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE('-----------Qualifier Attributes Information-------------');
    I := x_line_detail_qual_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line Detail Index '||x_line_detail_qual_tbl(I).line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Context '||x_line_detail_qual_tbl(I).qualifier_context);
    DBMS_OUTPUT.PUT_LINE('Attribute '||x_line_detail_qual_tbl(I).qualifier_attribute);
    DBMS_OUTPUT.PUT_LINE('Value '||x_line_detail_qual_tbl(I).qualifier_attr_value_from);
    DBMS_OUTPUT.PUT_LINE('Status Code '||x_line_detail_qual_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_qual_tbl.last;
    I:=x_line_detail_qual_tbl.NEXT(I);
    END LOOP;
    END IF;
    I := x_line_detail_tbl.FIRST;
    DBMS_OUTPUT.PUT_LINE('------------Price List/Discount Information------------');
    IF I IS NOT NULL THEN
    LOOP
    L_MOD_NAME := '';
    DBMS_OUTPUT.PUT_LINE('Line Index: '||x_line_detail_tbl(I).line_index);
    DBMS_OUTPUT.PUT_LINE('Line Detail Index: '||x_line_detail_tbl(I).line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Line Detail Type:'||x_line_detail_tbl(I).line_detail_type_code);
    DBMS_OUTPUT.PUT_LINE('List Header Id: '||x_line_detail_tbl(I).list_header_id);
    DBMS_OUTPUT.PUT_LINE('List Line Id: '||x_line_detail_tbl(I).list_line_id);
    DBMS_OUTPUT.PUT_LINE('List Line Type Code: '||x_line_detail_tbl(I).list_line_type_code);
    DBMS_OUTPUT.PUT_LINE('Adjustment Amount : '||x_line_detail_tbl(I).adjustment_amount);
    DBMS_OUTPUT.PUT_LINE('Line Quantity : '||x_line_detail_tbl(I).line_quantity);
    DBMS_OUTPUT.PUT_LINE('Operand Calculation Code: '||x_line_detail_tbl(I).Operand_calculation_code);
    DBMS_OUTPUT.PUT_LINE('Operand value: '||x_line_detail_tbl(I).operand_value);
    DBMS_OUTPUT.PUT_LINE('Automatic Flag: '||x_line_detail_tbl(I).automatic_flag);
    DBMS_OUTPUT.PUT_LINE('Override Flag: '||x_line_detail_tbl(I).override_flag);
    DBMS_OUTPUT.PUT_LINE('status_code: '||x_line_detail_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('status text: '||x_line_detail_tbl(I).status_text);
    DBMS_OUTPUT.PUT_LINE('-------------------------------------------');
    EXIT WHEN I = x_line_detail_tbl.LAST;
    BEGIN
    SELECT NAME INTO L_MOD_NAME
    FROM QP_LIST_HEADERS_ALL
    WHERE LIST_HEADER_ID=x_line_detail_tbl(I).list_header_id
    AND x_line_detail_tbl(I).list_line_type_code <>'PLL'
    AND x_line_detail_tbl(I).adjustment_amount IS NOT NULL;
    L_MODIFIER := L_MODIFIER||'~'||L_MOD_NAME;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF x_line_detail_tbl(I).list_line_type_code <>'PLL' AND x_line_detail_tbl(I).adjustment_amount IS NOT NULL THEN
    L_ADJUSTMENT_AMOUNT := L_ADJUSTMENT_AMOUNT||'~'||x_line_detail_tbl(I).adjustment_amount;
    END IF;
    I := x_line_detail_tbl.NEXT(I);
    END LOOP;
    END IF;
    SELECT line_unit_price , order_uom_selling_price
    INTO l_unit_price , l_selling_price
    FROM qp_preq_lines_tmp
    WHERE pricing_status_code = Qp_Preq_Pub.g_status_updated
    ORDER BY line_id;
    DBMS_OUTPUT.PUT_LINE('Unit Price := '||l_unit_price);--x_line_tbl(1).UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE('Selling Price := '||l_selling_price);---x_line_tbl(1).LINE_UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE('L_MODIFIER: '||L_MODIFIER);
    DBMS_OUTPUT.PUT_LINE('L_ADJUSTMENT_AMOUNT: '||L_ADJUSTMENT_AMOUNT);
    DBMS_OUTPUT.PUT_LINE('--------------Related Lines Information for Price Breaks/Service Items---------------');
    I := x_related_lines_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line Index :'||x_related_lines_tbl(I).line_index);
    DBMS_OUTPUT.PUT_LINE('Line Detail Index: '||x_related_lines_tbl(I).LINE_DETAIL_INDEX);
    DBMS_OUTPUT.PUT_LINE('Relationship Type Code: '||x_related_lines_tbl(I).relationship_type_code);
    DBMS_OUTPUT.PUT_LINE('Related Line Index: '||x_related_lines_tbl(I).RELATED_LINE_INDEX);
    DBMS_OUTPUT.PUT_LINE('Related Line Detail Index: '||x_related_lines_tbl(I).related_line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Status Code: '|| x_related_lines_tbl(I).STATUS_CODE);
    EXIT WHEN I = x_related_lines_tbl.LAST;
    I := x_related_lines_tbl.NEXT(I);
    END LOOP;
    END IF;
    END; -- procedure --;
    Edited by: user7751421 on Apr 20, 2013 8:54 AM

    I tried with bellow code but it shows both Unit Price (price after apply all adjustment) and List price same_
    What I need is get unit selling price before order book, when customer called for inquiry only._
    DECLARE
    p_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    p_qual_tbl QP_PREQ_GRP.QUAL_TBL_TYPE;
    p_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    p_LINE_DETAIL_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    p_LINE_DETAIL_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    p_LINE_DETAIL_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    p_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    p_control_rec QP_PREQ_GRP.CONTROL_RECORD_TYPE;
    x_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    x_line_qual QP_PREQ_GRP.QUAL_TBL_TYPE;
    x_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    x_line_detail_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    x_line_detail_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    x_line_detail_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    x_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    x_return_status VARCHAR2 (240);
    x_return_status_text VARCHAR2 (240);
    qual_rec QP_PREQ_GRP.QUAL_REC_TYPE;
    line_attr_rec QP_PREQ_GRP.LINE_ATTR_REC_TYPE;
    line_rec QP_PREQ_GRP.LINE_REC_TYPE;
    detail_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    ldet_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    rltd_rec QP_PREQ_GRP.RELATED_LINES_REC_TYPE;
    x_price_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    x_qual_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    v_line_tbl_cnt INTEGER;
    I BINARY_INTEGER;
    l_version VARCHAR2 (240);
    l_file_val VARCHAR2 (60);
    L_MODIFIER VARCHAR2 (4000);
    L_ADJUSTMENT_AMOUNT VARCHAR2 (300);
    L_MOD_NAME VARCHAR2 (240);
    l_unit_price NUMBER;
    l_selling_price NUMBER;
    l_item_id number:=17155;
    BEGIN
    MO_GLOBAL.INIT ('ONT');
    MO_GLOBAL.SET_POLICY_CONTEXT ('S', 91);
    --FND_GLOBAL.APPS_INITIALIZE(1130,21623,660);
    DBMS_OUTPUT.PUT_LINE ('1');
    v_line_tbl_cnt := 1;
    ---- Control Record
    p_control_rec.pricing_event := 'LINE';
    p_control_rec.calculate_flag := 'Y';
    p_control_rec.simulation_flag := 'Y';
    p_control_rec.source_order_amount_flag := 'Y';
    p_control_rec.PUBLIC_API_CALL_FLAG := 'N';
    p_control_rec.rounding_flag := 'Q';
    p_control_Rec.manual_discount_flag := 'N';
    --p_control_rec.MANUAL_ADJUSTMENTS_CALL_FLAG := 'Y';
    p_control_rec.request_type_code := 'ONT';
    p_control_rec.TEMP_TABLE_INSERT_FLAG := 'Y';
    DBMS_OUTPUT.PUT_LINE ('2');
    line_rec.request_type_code := 'ONT';
    -- line_rec.PRICE_LIST_HEADER_ID := 386481;
    line_rec.line_id := 72202; -- Order Line Id. This can be any thing for this script
    line_rec.line_Index := 1; -- Request Line Index
    line_rec.line_type_code := 'LINE'; -- LINE or ORDER(Summary Line)
    line_rec.pricing_effective_date := TRUNC (SYSDATE); -- Pricing as of what date ?
    line_rec.active_date_first := TRUNC (SYSDATE); -- Can be Ordered Date or Ship Date
    line_rec.active_date_second := TRUNC (SYSDATE); -- Can be Ordered Date or Ship Date
    line_rec.active_date_first_type := 'ORD'; -- ORD/SHIP
    line_rec.active_date_second_type := 'SHIP'; -- ORD/SHIP
    line_rec.line_quantity := 10; -- Ordered Quantity
    line_rec.line_uom_code := 'Ea'; -- Ordered UOM Code
    line_rec.currency_code := 'USD'; -- Currency Code
    line_rec.price_flag := 'Y'; -- Price Flag can have 'Y' , 'N'(No pricing) , 'P'(Phase)
    p_line_tbl (1) := line_rec;
    DBMS_OUTPUT.PUT_LINE ('3');
    ---- Line Attribute Record
    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;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE1';
    --line_attr_rec.COMPARISON_OPERATOR_CODE := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := '17155'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG := 'Y';
    p_line_attr_tbl (2) := line_attr_rec;
    -- line_attr_rec.LINE_INDEX := 1;
    -- line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    -- line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE1';
    -- --line_attr_rec.COMPARISON_OPERATOR_CODE := 'BETWEEN';
    -- line_attr_rec.PRICING_ATTR_VALUE_FROM := '72201'; -- INVENTORY ITEM ID
    -- line_attr_rec.VALIDATED_FLAG := 'Y';
    -- p_line_attr_tbl (3) := line_attr_rec;
    -- line_attr_rec.LINE_INDEX := 1;
    -- line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    -- line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE30';
    -- --line_attr_rec.COMPARISON_OPERATOR_CODE := 'BETWEEN';
    -- line_attr_rec.PRICING_ATTR_VALUE_FROM := 'Yes'; -- INVENTORY ITEM ID
    -- line_attr_rec.VALIDATED_FLAG := 'Y';
    -- p_line_attr_tbl (3) := line_attr_rec;
    DBMS_OUTPUT.PUT_LINE ('4');
    ---- Qualifier Attribute Record
    qual_rec.LINE_INDEX := 1; -- Attributes for the above line. Attributes are attached with the line index
    qual_rec.QUALIFIER_CONTEXT := 'MODLIST';
    qual_rec.QUALIFIER_ATTRIBUTE := 'QUALIFIER_ATTRIBUTE4';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM := '386481'; -- PRICE LIST ID
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG := 'Y';
    p_qual_tbl (1) := qual_rec;
    DBMS_OUTPUT.PUT_LINE ('5');
    -- qual_rec.line_index := 1;
    -- qual_rec.qualifier_context := 'ITEM';
    -- qual_rec.qualifier_attribute := 'QUALIFIER_ATTRIBUTE31';
    -- qual_rec.qualifier_attr_value_from := 'Yes';
    -- qual_rec.comparison_operator_code := '=';
    -- qual_rec.validated_flag := 'Y';
    -- p_qual_tbl (2) := qual_rec;
    qual_rec.LINE_INDEX := 1; -- Attributes for the above line. Attributes are attached with the line index
    qual_rec.QUALIFIER_CONTEXT := 'CUSTOMER';
    qual_rec.QUALIFIER_ATTRIBUTE := 'QUALIFIER_ATTRIBUTE5';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM := 5728; -- Customer Account ID
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG := 'Y';
    p_qual_tbl (3) := qual_rec;
    qual_rec.LINE_INDEX := 1;
    qual_rec.QUALIFIER_CONTEXT := 'ITEM_CATEGORY';
    qual_rec.QUALIFIER_ATTRIBUTE := 'QUALIFIER_ATTRIBUTE35';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM := 'TOOLS.HARDWARE TOOLS (DISCOUNTABLE).'; -- item category
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG := 'N';
    p_qual_tbl (4) := qual_rec;
    DBMS_OUTPUT.PUT_LINE ('6');
    OE_ORDER_PUB.G_LINE.inventory_item_id := l_item_id;
    DBMS_OUTPUT.PUT_LINE (Fnd_Profile.VALUE ('QP_CUSTOM_SOURCED'));
    --QP_Attr_Mapping_PUB.Build_Contexts
    --( p_request_type_code => 'ONT',
    -- p_line_index => 1,
    -- p_pricing_type_code => 'L'
    QP_Attr_Mapping_PUB.
    Build_Contexts (
    p_request_type_code => 'ONT',
    p_pricing_type => 'L',
    --p_org_id => 89,
    x_price_contexts_result_tbl => x_price_contexts_result_tbl,
    x_qual_contexts_result_tbl => x_qual_contexts_result_tbl);
    I := x_qual_contexts_result_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Context: ' || x_qual_contexts_result_tbl (I).context_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_name: '
    || x_qual_contexts_result_tbl (I).attribute_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_value: '
    || x_qual_contexts_result_tbl (I).attribute_value);
    EXIT WHEN I = x_qual_contexts_result_tbl.LAST;
    I := x_qual_contexts_result_tbl.NEXT (I);
    END LOOP;
    END IF;
    I := x_price_contexts_result_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Context: ' || x_price_contexts_result_tbl (I).context_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_name: '
    || x_price_contexts_result_tbl (I).attribute_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_value: '
    || x_price_contexts_result_tbl (I).attribute_value);
    EXIT WHEN I = x_price_contexts_result_tbl.LAST;
    I := x_price_contexts_result_tbl.NEXT (I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE (' Fnd_Profile.VALUE (QP_CUSTOM_SOURCED): ' || Fnd_Profile.VALUE ('QP_CUSTOM_SOURCED'));
    DBMS_OUTPUT.PUT_LINE ('7');
    l_version := QP_PREQ_GRP.GET_VERSION;
    DBMS_OUTPUT.put_line (OE_ORDER_PUB.G_LINE.price_list_id);
    DBMS_OUTPUT.put_line (OE_ORDER_PUB.G_LINE.inventory_item_id);
    QP_PREQ_PUB.PRICE_REQUEST (p_line_tbl,
    p_qual_tbl,
    p_line_attr_tbl,
    p_line_detail_tbl,
    p_line_detail_qual_tbl,
    p_line_detail_attr_tbl,
    p_related_lines_tbl,
    p_control_rec,
    x_line_tbl,
    x_line_qual,
    x_line_attr_tbl,
    x_line_detail_tbl,
    x_line_detail_qual_tbl,
    x_line_detail_attr_tbl,
    x_related_lines_tbl,
    x_return_status,
    x_return_status_text);
    -- Return Status Information ..
    DBMS_OUTPUT.PUT_LINE ('8');
    DBMS_OUTPUT.PUT_LINE ('Return Status text ' || x_return_status_text);
    DBMS_OUTPUT.PUT_LINE ('Return Status ' || x_return_status);
    DBMS_OUTPUT.
    PUT_LINE (
    '+---------Information Returned to Caller---------------------+ ');
    DBMS_OUTPUT.
    PUT_LINE ('-------------Request Line Information-------------------');
    I := x_line_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE ('Line Index: ' || x_line_tbl (I).line_index);
    DBMS_OUTPUT.PUT_LINE ('Unit_price: ' || x_line_tbl (I).unit_price);
    DBMS_OUTPUT.
    PUT_LINE ('Percent price: ' || x_line_tbl (I).percent_price);
    DBMS_OUTPUT.
    PUT_LINE (
    'Adjusted Unit Price: ' || x_line_tbl (I).adjusted_unit_price);
    DBMS_OUTPUT.
    PUT_LINE ('Pricing status code: ' || x_line_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('Pricing status text: ' || x_line_tbl (I).status_text);
    EXIT WHEN I = x_line_tbl.LAST;
    I := x_line_tbl.NEXT (I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.
    PUT_LINE ('-----------Pricing Attributes Information-------------');
    I := x_line_detail_attr_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Line detail Index '
    || x_line_detail_attr_tbl (I).line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE ('Context ' || x_line_detail_attr_tbl (I).pricing_context);
    DBMS_OUTPUT.
    PUT_LINE (
    'Attribute ' || x_line_detail_attr_tbl (I).pricing_attribute);
    DBMS_OUTPUT.
    PUT_LINE (
    'Value ' || x_line_detail_attr_tbl (I).pricing_attr_value_from);
    DBMS_OUTPUT.
    PUT_LINE ('Status Code ' || x_line_detail_attr_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_attr_tbl.LAST;
    I := x_line_detail_attr_tbl.NEXT (I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.
    PUT_LINE ('-----------Qualifier Attributes Information-------------');
    I := x_line_detail_qual_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Index '
    || x_line_detail_qual_tbl (I).line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Context ' || x_line_detail_qual_tbl (I).qualifier_context);
    DBMS_OUTPUT.
    PUT_LINE (
    'Attribute ' || x_line_detail_qual_tbl (I).qualifier_attribute);
    DBMS_OUTPUT.
    PUT_LINE (
    'Value ' || x_line_detail_qual_tbl (I).qualifier_attr_value_from);
    DBMS_OUTPUT.
    PUT_LINE ('Status Code ' || x_line_detail_qual_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_qual_tbl.LAST;
    I := x_line_detail_qual_tbl.NEXT (I);
    END LOOP;
    END IF;
    I := x_line_detail_tbl.FIRST;
    DBMS_OUTPUT.
    PUT_LINE ('------------Price List/Discount Information------------');
    IF I IS NOT NULL
    THEN
    LOOP
    L_MOD_NAME := '';
    DBMS_OUTPUT.
    PUT_LINE ('Line Index: ' || x_line_detail_tbl (I).line_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Index: ' || x_line_detail_tbl (I).line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Type:'
    || x_line_detail_tbl (I).line_detail_type_code);
    DBMS_OUTPUT.
    PUT_LINE (
    'List Header Id: ' || x_line_detail_tbl (I).list_header_id);
    DBMS_OUTPUT.
    PUT_LINE ('List Line Id: ' || x_line_detail_tbl (I).list_line_id);
    DBMS_OUTPUT.
    PUT_LINE (
    'List Line Type Code: '
    || x_line_detail_tbl (I).list_line_type_code);
    DBMS_OUTPUT.
    PUT_LINE (
    'Adjustment Amount : ' || x_line_detail_tbl (I).adjustment_amount);
    DBMS_OUTPUT.
    PUT_LINE ('Line Quantity : ' || x_line_detail_tbl (I).line_quantity);
    DBMS_OUTPUT.
    PUT_LINE (
    'Operand Calculation Code: '
    || x_line_detail_tbl (I).Operand_calculation_code);
    DBMS_OUTPUT.
    PUT_LINE ('Operand value: ' || x_line_detail_tbl (I).operand_value);
    DBMS_OUTPUT.
    PUT_LINE (
    'Automatic Flag: ' || x_line_detail_tbl (I).automatic_flag);
    DBMS_OUTPUT.
    PUT_LINE ('Override Flag: ' || x_line_detail_tbl (I).override_flag);
    DBMS_OUTPUT.
    PUT_LINE ('status_code: ' || x_line_detail_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('status text: ' || x_line_detail_tbl (I).status_text);
    DBMS_OUTPUT.PUT_LINE ('-------------------------------------------');
    EXIT WHEN I = x_line_detail_tbl.LAST;
    BEGIN
    SELECT NAME
    INTO L_MOD_NAME
    FROM QP_LIST_HEADERS_ALL
    WHERE LIST_HEADER_ID = x_line_detail_tbl (I).list_header_id
    AND x_line_detail_tbl (I).list_line_type_code = 'PLL'
    AND x_line_detail_tbl (I).adjustment_amount IS NOT NULL;
    L_MODIFIER := L_MODIFIER || '~' || L_MOD_NAME;
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;
    END;
    IF x_line_detail_tbl (I).list_line_type_code = 'PLL'
    AND x_line_detail_tbl (I).adjustment_amount IS NOT NULL
    THEN
    L_ADJUSTMENT_AMOUNT :=
    L_ADJUSTMENT_AMOUNT
    || '~'
    || x_line_detail_tbl (I).adjustment_amount;
    END IF;
    I := x_line_detail_tbl.NEXT (I);
    END LOOP;
    END IF;
    SELECT line_unit_price, order_uom_selling_price
    INTO l_unit_price, l_selling_price
    FROM qp_preq_lines_tmp
    WHERE pricing_status_code = Qp_Preq_Pub.g_status_updated
    ORDER BY line_id;
    DBMS_OUTPUT.PUT_LINE ('Unit Price := ' || l_unit_price); --x_line_tbl(1).UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE ('Selling Price := ' || l_selling_price); ---x_line_tbl(1).LINE_UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE ('L_MODIFIER: ' || L_MODIFIER);
    DBMS_OUTPUT.PUT_LINE ('L_ADJUSTMENT_AMOUNT: ' || L_ADJUSTMENT_AMOUNT);
    DBMS_OUTPUT.
    PUT_LINE (
    '--------------Related Lines Information for Price Breaks/Service Items---------------');
    I := x_related_lines_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE ('Line Index :' || x_related_lines_tbl (I).line_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Index: '
    || x_related_lines_tbl (I).LINE_DETAIL_INDEX);
    DBMS_OUTPUT.
    PUT_LINE (
    'Relationship Type Code: '
    || x_related_lines_tbl (I).relationship_type_code);
    DBMS_OUTPUT.
    PUT_LINE (
    'Related Line Index: '
    || x_related_lines_tbl (I).RELATED_LINE_INDEX);
    DBMS_OUTPUT.
    PUT_LINE (
    'Related Line Detail Index: '
    || x_related_lines_tbl (I).related_line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE ('Status Code: ' || x_related_lines_tbl (I).STATUS_CODE);
    EXIT WHEN I = x_related_lines_tbl.LAST;
    I := x_related_lines_tbl.NEXT (I);
    END LOOP;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.
    PUT_LINE ('SQLERRM' || SQLERRM);
    END;
    Kindly provide sugession if I miss any thing.
    Regards,
    Akil
    Edited by: 1004537 on May 9, 2013 7:20 AM
    Edited by: 1004537 on May 9, 2013 7:20 AM

  • Cannot manual adjustment unit selling price for Retrobill order

    Dears,
    I try formpersonalzation to set to update allowed and alterable,but still cannot update unit selling price?
    there is a message:
    Get_manual_adjustment#2 ORA-01403:no data found in Package oe_order_adj_pvt Procedure oe_line_adj.calulate_adjustments
    Edited by: user6911393 on 2011/5/18 下午 9:00
    Is there method can find the way to adjustment unit selling price manually fro Retrobill order?
    Thank you very much!

    Dears,
    I try formpersonalzation to set to update allowed and alterable,but still cannot update unit selling price?
    there is a message:
    Get_manual_adjustment#2 ORA-01403:no data found in Package oe_order_adj_pvt Procedure oe_line_adj.calulate_adjustments
    Edited by: user6911393 on 2011/5/18 下午 9:00
    Is there method can find the way to adjustment unit selling price manually fro Retrobill order?
    Thank you very much!

  • Unit Selling Price Override through PROCESS_ORDER API

    Hi All,
    I have this below requirement to be achieved through process_order API.
    1. In the Order Oganizer UI, I open the Order Entry form.
    2. Open the Lines tab
    3. For the Unit Selling Price, I change the price manually and tab out.
    4. Its gives me a LOV to select a Surcharge modifier.
    5. I select one of the surcharge and click save.
    6. The price is overridden and a manual price adjustment is created for the above selected surcharge.
    This functionality I want to acieve through the PROCESS_ORDER API. Basically, I want to override the unit selling price and apply a surchage modifier. This should change the selling price and create a adjustement record for the above line.
    Please let me know if anyone knows about this. That would help me.
    Thanks,
    Anand

    Anand
    I tested this in 12.0.4 vision and works. Also if you need to use update option if you are applying the same modifier more than once(not create), just like the way screen changes behave.
    DECLARE
    l_return_status VARCHAR2 (30);
    x_msg_data VARCHAR2 (2000);
    x_msg_count NUMBER;
    l_adj_rec oe_order_pub.line_adj_rec_type;
    l_adj_tbl oe_order_pub.line_adj_tbl_type;
    l_x_header_rec oe_order_pub.header_rec_type;
    l_x_header_adj_tbl oe_order_pub.header_adj_tbl_type;
    l_x_header_scredit_tbl oe_order_pub.header_scredit_tbl_type;
    l_x_line_tbl oe_order_pub.line_tbl_type;
    l_x_line_adj_tbl oe_order_pub.line_adj_tbl_type;
    l_x_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
    l_x_lot_serial_tbl oe_order_pub.lot_serial_tbl_type;
    l_x_action_request_tbl oe_order_pub.request_tbl_type;
    l_x_header_price_att_tbl oe_order_pub.header_price_att_tbl_type;
    l_x_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type;
    l_x_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type;
    l_x_line_price_att_tbl oe_order_pub.line_price_att_tbl_type;
    l_x_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type;
    l_x_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type;
    l_list_line_type_code VARCHAR2 (30) := NULL;
    l_list_line_id NUMBER;
    l_x_header_payment_tbl oe_order_pub.header_payment_tbl_type;
    l_x_line_payment_tbl oe_order_pub.line_payment_tbl_type;
    l_prc_adj_request oe_order_pub.request_tbl_type;
    l_prc_adj_index NUMBER := 1;
    l_price_adj_id NUMBER;
    v_msg_index_out NUMBER;
    x_header_rec_type oe_order_pub.header_rec_type;
    x_header_val_rec_type oe_order_pub.header_val_rec_type;
    x_header_adj_tbl_type oe_order_pub.header_adj_tbl_type;
    x_header_adj_val_tbl_type oe_order_pub.header_adj_val_tbl_type;
    x_header_price_att_tbl_type oe_order_pub.header_price_att_tbl_type;
    x_header_adj_att_tbl_type oe_order_pub.header_adj_att_tbl_type;
    x_header_adj_assoc_tbl_type oe_order_pub.header_adj_assoc_tbl_type;
    x_header_scredit_tbl_type oe_order_pub.header_scredit_tbl_type;
    x_header_scredit_val_tbl_type oe_order_pub.header_scredit_val_tbl_type;
    x_line_tbl_type oe_order_pub.line_tbl_type;
    x_line_val_tbl_type oe_order_pub.line_val_tbl_type;
    x_line_adj_tbl_type oe_order_pub.line_adj_tbl_type;
    x_line_adj_val_tbl_type oe_order_pub.line_adj_val_tbl_type;
    x_line_price_att_tbl_type oe_order_pub.line_price_att_tbl_type;
    x_line_adj_att_tbl_type oe_order_pub.line_adj_att_tbl_type;
    x_line_adj_assoc_tbl_type oe_order_pub.line_adj_assoc_tbl_type;
    x_line_scredit_tbl_type oe_order_pub.line_scredit_tbl_type;
    x_line_scredit_val_tbl_type oe_order_pub.line_scredit_val_tbl_type;
    x_lot_serial_tbl_type oe_order_pub.lot_serial_tbl_type;
    x_lot_serial_val_tbl_type oe_order_pub.lot_serial_val_tbl_type;
    x_request_tbl_type oe_order_pub.request_tbl_type;
    x_header_payment_tbl_type oe_order_pub.header_payment_tbl_type;
    x_header_payment_val_tbl_type oe_order_pub.header_payment_val_tbl_type;
    x_line_payment_tbl_type oe_order_pub.line_payment_tbl_type;
    x_line_payment_val_tbl_type oe_order_pub.line_payment_val_tbl_type;
    l_control_rec oe_globals.control_rec_type;
    BEGIN
    fnd_global.apps_initialize (1005902, 21623, 660);
    mo_global.set_policy_context ('S', 204);
    l_x_line_tbl (1).line_id := 319799;
    l_x_line_tbl (1).header_id := 155008;
    l_adj_rec := oe_order_pub.g_miss_line_adj_rec;
    l_adj_rec.price_adjustment_id := fnd_api.g_miss_num;
    l_adj_rec.list_header_id := 8988; --Modifier id
    l_adj_rec.list_line_id := 16596; --Modifier line id
    l_adj_rec.automatic_flag := 'N';
    l_adj_rec.list_line_type_code := 'DIS'; --Change this is it is surcharge
    l_adj_rec.arithmetic_operator := 'AMT'; --Percentage or amount
    l_adj_rec.operand := 10; --How much?
    l_adj_rec.operation := oe_globals.g_opr_create;
    l_adj_rec.line_index := 1;
    l_adj_rec.update_allowed := 'Y';
    l_adj_rec.applied_flag := 'Y'; --this is required to change the price of the line
    l_adj_rec.change_reason_code := 'MANUAL';
    l_adj_rec.change_reason_text := 'Manually applied adjustments';
    l_adj_tbl (1) := l_adj_rec;
    l_control_rec.process_entity := oe_globals.g_entity_line_adj;
    l_control_rec.process := TRUE;
    oe_order_pub.process_order (p_api_version_number => 1.0
    , x_return_status => l_return_status
    , x_msg_count => x_msg_count
    , x_msg_data => x_msg_data
    , p_header_rec => l_x_header_rec
    , p_header_adj_tbl => l_x_header_adj_tbl
    , p_header_scredit_tbl => l_x_header_scredit_tbl
    , p_header_payment_tbl => l_x_header_payment_tbl
    , p_line_tbl => l_x_line_tbl
    , p_line_adj_tbl => l_adj_tbl
    , p_line_scredit_tbl => l_x_line_scredit_tbl
    , p_line_payment_tbl => l_x_line_payment_tbl
    , p_lot_serial_tbl => l_x_lot_serial_tbl
    , p_action_request_tbl => l_prc_adj_request
    , p_header_price_att_tbl => l_x_header_price_att_tbl
    , p_header_adj_att_tbl => l_x_header_adj_att_tbl
    , p_header_adj_assoc_tbl => l_x_header_adj_assoc_tbl
    , p_line_price_att_tbl => l_x_line_price_att_tbl
    , p_line_adj_att_tbl => l_x_line_adj_att_tbl
    , p_line_adj_assoc_tbl => l_x_line_adj_assoc_tbl
    , x_header_rec => x_header_rec_type
    , x_header_val_rec => x_header_val_rec_type
    , x_header_adj_tbl => x_header_adj_tbl_type
    , x_header_adj_val_tbl => x_header_adj_val_tbl_type
    , x_header_price_att_tbl => x_header_price_att_tbl_type
    , x_header_adj_att_tbl => x_header_adj_att_tbl_type
    , x_header_adj_assoc_tbl => x_header_adj_assoc_tbl_type
    , x_header_scredit_tbl => x_header_scredit_tbl_type
    , x_header_scredit_val_tbl => x_header_scredit_val_tbl_type
    , x_header_payment_tbl => x_header_payment_tbl_type
    , x_header_payment_val_tbl => x_header_payment_val_tbl_type
    , x_line_tbl => x_line_tbl_type
    , x_line_val_tbl => x_line_val_tbl_type
    , x_line_adj_tbl => x_line_adj_tbl_type
    , x_line_adj_val_tbl => x_line_adj_val_tbl_type
    , x_line_price_att_tbl => x_line_price_att_tbl_type
    , x_line_adj_att_tbl => x_line_adj_att_tbl_type
    , x_line_adj_assoc_tbl => x_line_adj_assoc_tbl_type
    , x_line_scredit_tbl => x_line_scredit_tbl_type
    , x_line_scredit_val_tbl => x_line_scredit_val_tbl_type
    , x_line_payment_tbl => x_line_payment_tbl_type
    , x_line_payment_val_tbl => x_line_payment_val_tbl_type
    , x_lot_serial_tbl => x_lot_serial_tbl_type
    , x_lot_serial_val_tbl => x_lot_serial_val_tbl_type
    , x_action_request_tbl => x_request_tbl_type
    DBMS_OUTPUT.put_line (l_return_status);
    IF x_msg_count > 0
    THEN
    FOR v_index IN 1 .. x_msg_count
    LOOP
    oe_msg_pub.get (p_msg_index => v_index, p_encoded => 'F', p_data => x_msg_data, p_msg_index_out => v_msg_index_out);
    x_msg_data := SUBSTR (x_msg_data, 1, 200);
    DBMS_OUTPUT.put_line (x_msg_data);
    DBMS_OUTPUT.put_line ('============================================================');
    END LOOP;
    END IF;
    END;
    Thanks
    Nagamohan

  • Unit selling price is not updating

    Hi
    I am updating unit selling price of an item using API.
    code:
       v_line_tbl (1).request_date := SYSDATE;
       v_line_tbl (1).unit_selling_price := 299;
    in the above code request_date is updating to sysdate but selling price is not updating.
    how to do this?
    Thanks

    The CALCULATE_PRICE_FLAG is in the OE_ORDER_LINES_ALL table.  This setting could override determines pricing engine calls which could be overriding your update.
    Values -
    Calculate Price (Y)
    Partial Price (P)       
    Freeze Price (N)
    Thank you,
    Debbie

  • Need Sample API code to update Quote Line level Unit Selling Price alone.

    Hi,
    i want to update Unit Selling Price alone using API, can any one have sample code to do that.
    ASO_QUOTE_PUB.Update_Quote_Line
    Thanks!
    Kishore

    Hi,
    please find the code below for ASO Quote Line Update. Here this sample only shows an DFF Attribute update. You can try the same for the Unit Selling price Update.
    DECLARE
    l_Api_Version_Number NUMBER;
    l_Init_Msg_List VARCHAR2(1000);
    l_Commit VARCHAR2(1000);
    l_Validation_Level      NUMBER;     
    l_Qte_Header_Rec ASO_QUOTE_PUB.Qte_Header_Rec_Type;
    l_Qte_Line_Rec ASO_QUOTE_PUB.Qte_Line_Rec_Type;
    l_Control_Rec ASO_QUOTE_PUB.Control_rec_Type;
    l_Qte_Line_Dtl_TBL ASO_QUOTE_PUB.Qte_Line_Dtl_tbl_Type;
    l_Line_Attribs_Ext_Tbl ASO_QUOTE_PUB.Line_Attribs_Ext_Tbl_type;
    l_Payment_Tbl ASO_QUOTE_PUB.Payment_Tbl_Type;
    l_Price_Adj_Tbl ASO_QUOTE_PUB.Price_Adj_Tbl_Type;
    l_Price_Attributes_Tbl ASO_QUOTE_PUB.Price_Attributes_Tbl_Type;
    l_Price_Adj_Attr_Tbl ASO_QUOTE_PUB.Price_Adj_Attr_Tbl_Type;
    l_Shipment_Tbl ASO_QUOTE_PUB.Shipment_Tbl_Type;
    l_Tax_Detail_Tbl ASO_QUOTE_PUB.Tax_Detail_Tbl_Type;
    l_Freight_Charge_Tbl ASO_QUOTE_PUB.Freight_Charge_Tbl_Type;
    l_Sales_Credit_Tbl ASO_QUOTE_PUB.Sales_Credit_Tbl_Type;
    l_Quote_Party_Tbl ASO_QUOTE_PUB.Quote_Party_Tbl_Type;
    l_Update_Header_Flag VARCHAR2(100);
    X_Qte_Line_Rec ASO_QUOTE_PUB.Qte_Line_Rec_Type;
    X_Qte_Line_Dtl_TBL ASO_QUOTE_PUB.Qte_Line_Dtl_TBL_Type;
    X_Line_Attribs_Ext_Tbl ASO_QUOTE_PUB.Line_Attribs_Ext_Tbl_type;
    X_Payment_Tbl ASO_QUOTE_PUB.Payment_Tbl_Type;
    X_Price_Adj_Tbl ASO_QUOTE_PUB.Price_Adj_Tbl_Type;
    X_Price_Attributes_Tbl ASO_QUOTE_PUB.Price_Attributes_Tbl_Type;
    X_Price_Adj_Attr_Tbl ASO_QUOTE_PUB.Price_Adj_Attr_Tbl_Type;
    X_Shipment_Tbl ASO_QUOTE_PUB.Shipment_Tbl_Type;
    X_Tax_Detail_Tbl ASO_QUOTE_PUB.Tax_Detail_Tbl_Type;
    X_Freight_Charge_Tbl ASO_QUOTE_PUB.Freight_Charge_Tbl_Type;
    X_Sales_Credit_Tbl ASO_QUOTE_PUB.Sales_Credit_Tbl_Type;
    X_Quote_Party_Tbl ASO_QUOTE_PUB.Quote_Party_Tbl_Type;
    lX_Return_Status VARCHAR2(1000);
    lX_Msg_Count NUMBER;
    lX_Msg_Data VARCHAR2(1000);
         lc_last_update_date date;
         l_file varchar2(2000);
         CURSOR c_quote(c_qte_header_id NUMBER) IS
         SELECT last_update_date
         FROM ASO_QUOTE_HEADERS_ALL
         WHERE quote_header_id = c_qte_header_id;
    BEGIN
         BEGIN
         MO_GLOBAL.init('SQLAP');
         MO_GLOBAL.set_policy_context('S',83);
         fnd_global.apps_initialize(1175,50689,280);
         END;
         OPEN c_quote(l_qte_header_rec.quote_header_id);
         FETCH c_quote INTO lc_last_update_date;
         CLOSE c_quote;
         aso_debug_pub.SetDebugLevel(10);
    aso_debug_pub.Initialize;
    l_file:= ASO_DEBUG_PUB.Set_Debug_Mode('FILE');
    aso_debug_pub.debug_on;
    aso_debug_pub.add('Update Quote',1, 'Y');
    dbms_output.put_line('File :'||l_file);
    dbms_output.put_line( to_char(sysdate, 'mm/dd/yyyy:hh24:SS') );
         l_qte_header_rec.quote_header_id := 24649;
         l_qte_header_rec.last_update_date := lc_last_update_date;
         l_control_rec.last_update_date := lc_last_update_date;
         l_qte_line_rec.quote_header_id := 24649;
         l_qte_line_rec.quote_line_id := 27712;
         l_qte_line_rec.attribute12 := 1000;
         ASO_QUOTE_PUB.Update_Quote_Line(
    P_Api_Version_Number => '1.0',
    P_Init_Msg_List =>     l_Init_Msg_List,
    P_Commit =>     l_Commit,
    P_Qte_Line_Rec =>     l_Qte_Line_Rec,
    P_Control_Rec =>     l_Control_Rec,     
    P_Qte_Line_Dtl_Tbl =>     l_Qte_Line_Dtl_Tbl,
    P_Line_Attribs_Ext_Tbl =>     l_Line_Attribs_Ext_Tbl,
    P_Payment_Tbl =>     l_Payment_Tbl,     
    P_Price_Adj_Tbl =>     l_Price_Adj_Tbl,     
    P_Price_Attributes_Tbl =>     l_Price_Attributes_Tbl,
    P_Price_Adj_Attr_Tbl =>     l_Price_Adj_Attr_Tbl,
    P_Shipment_Tbl =>     l_Shipment_Tbl,
    P_Tax_Detail_Tbl =>     l_Tax_Detail_Tbl,
    P_Freight_Charge_Tbl =>     l_Freight_Charge_Tbl,
    P_Update_Header_Flag =>     l_Update_Header_Flag,
    X_Qte_Line_Rec =>     X_Qte_Line_Rec,
    X_Qte_Line_Dtl_Tbl =>     X_Qte_Line_Dtl_Tbl,
    X_Line_Attribs_Ext_Tbl =>     X_Line_Attribs_Ext_Tbl,
    X_Payment_Tbl =>     X_Payment_Tbl,
    X_Price_Adj_Tbl =>     X_Price_Adj_Tbl,
    X_Price_Attributes_Tbl =>     X_Price_Attributes_Tbl,
    X_Price_Adj_Attr_Tbl =>     X_Price_Adj_Attr_Tbl,
    X_Shipment_Tbl =>     X_Shipment_Tbl,
    X_Tax_Detail_Tbl =>     X_Tax_Detail_Tbl,
    X_Freight_Charge_Tbl =>     X_Freight_Charge_Tbl,
    X_Return_Status =>     lX_Return_Status,
    X_Msg_Count =>     lX_Msg_Count,
    X_Msg_Data =>     lX_Msg_Data
    fnd_msg_pub.count_and_get( p_encoded => 'F'
    , p_count => lx_msg_count
    , p_data => lx_msg_data);
    dbms_output.put_line('no. of FND messages :'||lx_msg_count);
    for k in 1 .. lx_msg_count loop
    lx_msg_data := fnd_msg_pub.get(
    p_msg_index => k,
    p_encoded => 'F');
    dbms_output.put_line('Error msg: '||substr(lx_msg_data,1,240));
    end loop;
    dbms_output.put_line(lx_return_status);
    dbms_output.put_line(to_char(lx_msg_count));
    dbms_output.put_line(lx_msg_data);
    dbms_output.put_line('end');
    END;     
    COMMIT;
    Thanks
    Sunil Devulapally
    Edited by: user13150483 on 05-Jan-2012 10:59

  • Unit Selling Price - Round Off

    Hi All,
    My requirement is to round off the unit selling price in Sales Order screen,
    for example
    Item AS16101 unit selling price is 12.99, while entering this item it should be 13, and saved to database as 13
    Item AS16103 unit selling price is 12.40, while entering this item it should be 12
    In WHEN VALIDATE RECORD, i used round function in form personlization, but in data base its saving the original value.
    Any help on this.
    Regards,
    Max

    In Personalization i have shown the value in messages, its showing correctly but when i enabled the custom events, after my message with value it showing PRE_QUERY trigger and saving the actual value.
    Regards,
    Max

  • Unit Selling Price in OM

    Hi All,
    I am new in OM. i just want to know when my user enter and modified unit selling price the message shows no list of values contain no entries, please advice how can i add its list or how can i use range of list against list.
    Thanks

    Dear All,
    Please advice above issue
    thanks

  • Sales Order - Unit Selling Price - Format Mask

    Hi,
    I want to change Format Mask of Unit Selling Price column on Sales Order Form. By using Forms Personalization it is not being done.
    Please guide me how could I change its format mask from 5 decimal places to 2 decimal places.
    Regards
    Waqas Hassan

    Hi Waqas,
    In the define Currency form in GL setup, change the existing currency code precision to 2.
    this should resolve your issue.
    Make sure you logout and login back to recheck the issue.
    General Ledger Super User-->Setup-->Currency-->Define.
    Thanks
    -Arif.

  • One inspection lot for multiple materials of purchase order line items

    Hi All,
    My client requirement is one inspection lot for multiple materials of purchase order line items.
    Please share your thoughts.
    Thanks in advance for early reply.
    Regards,
    Jishu

    I totally agree with Amol.
    I don't think I would touch that development nor would I ever tell a client it could reliably be done through development.
    Knowing what I know about the table structures, I don't think you could create any development for this that could use a significant amount of the existing tables and functionality.  I think you'd have to create all your own Z tables and basically rebuild the functionality.  Tying it back in with SAP data will be difficult.
    You're even looking at all custom screens for your results recording and UD as well.  And if you have follow-on functions like batch classification requirements, batch determination, COA publication, results copy functions, use of DMR and sampling procedures, physical samples, quality notifications, etc. etc.. you could be looking a whole lot of development.
    Craig

  • Unit Cost is not Populating in Sales Order Line Level for OPM Enabled Org

    Dear All,
    This is to inform you that Unit Cost is not populating in Sales Order Lines. Ideally it should pick from OPM financials, but whenever i am running Cost Update it is throwing error. We need to pull out Unit Cost for Sales Analysis Report. Please suggest on the same ASAP. What are the steps needs be followed to populate the Unit Cost. Please suggest.
    Thanks & Regards,
    Patrick

    Hi
    I think it will pick from PRICE list. Why don't to you try by keeping this item in the mentioned Price list.
    Regards
    Raj

  • Accounting for discounts given at the order entry level

    Hi,
    I'm Anil Wadhwa and I'm working for Amtrex Hitachi Appliances Ltd., Ahmedabad, India. we have implemented Oracle applications 11i and I'm part of the Order to Cash cycle specifically handling the OM Module.
    Initially I had the problem of using the discount feature available in Oracle Advanced Pricing and now I have got the solution for the problem.The problem I was trying to explore a feature whereby I was setting up a qualifier where I'm defining the Customer Class as 'DLR' which would be eligible for discount say @10%.
    I subsequently set up a modifier where I defined a modifier type discount @10% and attached it with predefined qualifier at both the header and line level.
    When I was trying the order entry the price which was defaulting from the attached price list was not getting reduced by 10%.
    Now this problem has been solved by giving a request from the 'Oracle Pricing Manager' called as Build Sourcing Rule.
    Now I want to know is there any way of accounting the discount given.
    Say my list price is 100 and i have given a discount of 10% and my selling price becomes 90.
    Then
    Debit Credit
    Customer 90 Sales account 100
    Discount 10
    How should I do the setup for discount and make sure that when the modifier gets applied whatever is the discount goes into the appropriate accounting setup.
    I will be obliged if somebody can guide me on this issue.
    Thanks & Regards,
    Anil Wadhwa
    [email protected]

    Anil,
    have you used any algorithms for ariving at discounts?
    Thanks
    AGK

  • Standard Report for missing parts at production order operation level?

    Hi PP Gurus,
                We have standard report for missing parts at production orders level.
    For our client, they need a report for missing parts analysis at production order operation level. Do we have any such standard report in the SAP?
    Please help.
    Thanks,
    Reddy.

    Hi Arvind,
          Thanks for for your response.
    1. List: Components,  Layout: Standard layout          set the Missing part
           It shows the component requirement/withdrawn  quantity for each operation of production order. It is not showing the commit quantity.
    2. List: Components,  Layout: Pick list          set the Missing part
           It shows the component requirement/withdrawn  quantity for each production order.
    3. List: Components,  Layout: Missing Parts List-Material View          set the Missing part
           It shows the component requirement/commit quantity for each production order. It is not showing the commit quantity at opertion level.
    4. List: Components,  Layout: Missing Parts List-Order View          set the Missing part
           It shows the component requirement/commit quantity for each production order. It is not showing the commit quantity at opertion level.
          We are unable to get the solution from all these 1 to 4 reports from COOIS.
    Do we have any option to change the existing layout (ex: 3 ) to get the commit quantity for operation with missing parts indicator?
    If avilable, what is the procedure to be followed?
    Thanks,
    Reddy.

  • !!!How to restrict user for making  changes in Sales order , partner level

    Hi all,
    Can anybody tell me how to restrict user for making  changes in Sales order  at partner level, is it through user exit?

    Hi Ruchi
    I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
    Hope its clear
    Reward if help ful
    Sri

Maybe you are looking for