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

Similar Messages

  • Move Order lines and Delivery Detail lines - Relationship

    Hi All,
    Is there a one - to - one realtionship between Move Order Line and Delivery Detail Line?
    i.e., Each Move Order line will correspond to only one Delivery Details line Record?
    Thanks in advance.
    Regards,
    Gowri

    Hello,
    There is a one - to - many relationship between Move Order Line and Delivery Detail Line when you split lines in delivery.
    select * from mtl_material_transactions t you have source_id.
    select * from WSH_DELIVERABLES_v t you have move_order_id.
    Regards,
    Luko

  • Line id in sales order lines and source_line_id in wsh delivery details are entirely different

    i am trying to get serial number based on sales order line,i am getting no data since   AND WSH.SOURCE_LINE_ID = OOL.LINE_ID is failing,Please help me.Im not getting what wrong im doing
    SELECT OOH.ORDER_NUMBER
         ,OOH.FLOW_STATUS_CODE
         ,OOH.CUST_PO_NUMBER
         ,OOL.ORDERED_ITEM
         ,OOL.LINE_ID
         ,OOL.ORDERED_QUANTITY
         ,OOH.ORDER_TYPE_ID
        ,WSN.FM_SERIAL_NUMBER
    FROM SO_ORDER_TYPES_ALL SOT
         ,OE_ORDER_HEADERS_ALL OOH
         ,OE_ORDER_LINES_ALL OOL
         ,WSH_SERIAL_NUMBERS WSN
         ,WSH_DELIVERY_DETAILS WSH
    WHERE 1=1
      AND WSN.DELIVERY_DETAIL_ID = WSH.DELIVERY_DETAIL_ID
      AND WSH.SOURCE_LINE_ID = OOL.LINE_ID
      AND OOL.SOURCE_TYPE_CODE = 'EXTERNAL'
      AND OOH.HEADER_ID = OOL.HEADER_ID
      AND OOH.ORDER_TYPE_ID = SOT.ORDER_TYPE_ID
      AND SOT.NAME = 'US Distributor Order'

    what is the status of SO and SO line ?
    Have you manually check the line_id and source_line_id from backend using select statement ?

  • Queries for Open Sales Order Lines and Open Purchase Order Lines

    Experts,
    Forgive me if these have been addressed elsewhere but I can't find them.  I'd like to create two queries to use as Alerts as follows:
    1.  Query of open lines in Sales Orders that are more than two weeks old
    2.  Query of open lines in Purchase Orders that are more than 2 days old
    Thanks in advance for your help.
    Steve

    Hi Steve,
    A couple of query templates you can use for your alerts are as follows:
    Purchase Orders
    SELECT T0.\[DocNum\], T0.\[DocDate\], T0.\[DocDueDate\], T0.\[CardCode\], T0.\[CardName\], T1.\[ItemCode\], T1.\[Dscription\], T1.\[Quantity\], T1.\[OpenQty\], T1.\[Price\] FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.\[DocDueDate\] < (getdate() -2) AND  T1.\[LineStatus\] = 'O'
    Sales Orders
    SELECT T0.\[DocNum\], T0.\[DocDate\], T0.\[DocDueDate\], T0.\[CardCode\], T0.\[CardName\], T1.\[ItemCode\], T1.\[Dscription\], T1.\[Quantity\], T1.\[OpenQty\], T1.\[Price\] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.\[DocDueDate\] < (getdate() -14) AND  T1.\[LineStatus\] = 'O'
    You can change the SELECT section to remove some of the columns or add extra columns if need be.  Once your happy with the query you can attach it to an alert and set the frequency.
    Regards,
    Adrian

  • Entry of Configured Star item in sales order line

    Hi All,
    We have a requirement to enter a Configured item(STAR Item) into a sales order line and facing pricing issues.
    The Configured item will be imported from a legacy system(client's equivalent of i-store) along with all the option class and options into Order Management.During this import, we will update the unit selling price of the star item and complete the sales order.
    Now, when another order comes in for the same star item(same set of options), client wants to just enter the item manually in OM without having to do configuration(as the options classes are close to 30 which would be in-efficient from a timing perspective).In this case if they were to enter the star item right into the sales order line, then we are unable to price it as this item does not exist in any price list.
    So, can anyone suggest if there is a standard way to add the star item into a price list (via profile options/advanced pricing attributes. etc.,) or would it make sense just to add the star item into the price list when it first came from the leagacy system using some customisation.
    To add: we are using Oracle OM and a legacy system for configuring products. We are not using Oracle Configurator.
    Please help resolve this paramount issue.
    Regards.
    Sarav

    Best way is to add the * number to the price list when it first comes over.

  • How to round quantity with FMS for some items in Production order lines?

    Hello,
    How to round the quantity with FMS or SP for only some items in the composition of Production order (lines) and the bill of materials like a box or a stick that should not be with commas.
    Exemple  of Production Order
    P1
      M1 | 234,78
      M2 | 104,04 --> 104
      M3 | 60,7
      M4 | 512, 00
      M5 | 107,67 --> 108
    and others will not be rounded
    Thanks,
    Hafid

    Hi Gordon,
    you're always the first to respond, thank you.
    Its when adding the production order, before its creation or when entering the quantity of product in OWOR.
    Like :
    SELECT CASE WHEN ($[$37.4.0] = 'M2') OR ($[$37.4.0] = 'M5') THEN ROUND (T0.[PlannedQty],0)
    ELSE T0.[PlannedQty] END AS PlannedQty FROM WOR1 T0
    or
    SELECT ROUND (T0.[PlannedQty],0) FROM WOR1 T0 WHERE T0.[ItemCode] =$[$37.4.0] AND (T0.[ItemCode] = 'M2' OR  T0.[ItemCode] = 'M5)
    Thanks,
    Hafid

  • Changing the Availability Check key in an existent Sales Order line

    Hello gurus.
    Is it possible to modify the Availability Check key (VBAP-MTVFP) of a material in an existent Sales Order line?
    I changed it in the material master, but since documents are not automatically updated, I wanted to modify this value in an existing sales order line. I am not even able to find the field in it.
    I had to delete the order line and create it again, but then I have troubles getting the exact same confirmed date that I had before.
    Any help? Thank you.

    You cant see at item level.  To see in sale order, click from top menu bar, Environment -- Availability.   Now you can see the availability check on top of the screen.
    Meanwhile, I dont think, this field will be in editable mode once partial delivery is made in which case, LSMW also wont help you.
    If your requirement is desperate to change the availability check, to me the available option is close the existing sale orders, create fresh orders after changing the availability check in material master.  On the other hand, if you want to change only in sale order, then the option is LSMW as you cant even succeeed in TCode MASS
    thanks
    G. Lakshmipathi

  • This field cannot be updated as there are open sales order lines

    When trying to enable Item Attributes then I am getting a message "This field cannot be updated as there are open sales order lines". I cancelled the Sales Order ( which was having only 1 sales order line and that is also cancelled) but still I am getting the same message.
    How to overcome this problem.
    Khan

    Thanks Karthik & Sandeep........
    Issue got fixed. There was an open Sales order Line because of that line the issue was coming. After cancelling that SO Line, Users were able to update the Item field.
    Regards,
    Khan.
    http://moreapps4u.blogspot.com/

  • AR Invoice Presentation / Invoice Lines diff than Sales Order Lines

    Hi,
    Due to business rules I got the following requirement, I'd like to get advice or second opinions please:
    Instead of showing 200 lines we want to show 1 line in the invoice summarizing the job done.
    The requirement is:
    The invoice should summarize the Order Lines, meaning that we want to have different lines in the invoice than those in the orders composing the invoice. The total amounts must equal between both, the invoice and the orders lines been invoiced.
    For example:
    We need to create an Invoice for 2 Sales orders with 10 lines each, each line for $1 usd.
    The invoice could be in any of these situations:
    - Having only one line composing the 2 orders. The invoiced amount is $20.
    - Having 2 lines composing the 2 orders. The invoiced amount is $20 ($10 line 1, $10 line 2)
    The description on the invoice lines must be completly open.
    Internaly, the link/reference between the invoice line and the order line(s) composing it must be kept.
    This must work with 1 or more Sales Orders (partial or complete)
    Can be done via autoinvoice or not. (The user is able to compose and reference the invoice manually)
    ¿Is there already something done that I can use? Just point me on one direction and I'd be happy to investigate.
    I already have 1 or 2 ideas of how to achieve this without customizing at all.
    Just wanted to check and get advice and second opinions on this before taking a decision.
    Technical Spec:
    Oracle EBS 11i (11.5.10.2)
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Thanks in advance.
    Juan Alcocer

    seems to error
    APP-AR-11526
    ORA-28115
    seems the security policy is implemented at your database leval and check which ID you are using to insert the record.Check with your DBA, for security to resolve first for ORA-28115.
    Disabled in case if you have any custom triggers defined on RA_CUSTOMER_TRX_ALL.
    Few Documentation for ORA-28115
    ORA-28115 with EXEMPT ACCESS POLICY privilege
    A user USER1 has been granted select, insert, update, delete on all
    tables of an application schema (USER2) that uses row-level security.
    The RLS policies cover select, insert, update, and delete, and have check option enabled. USER1 has also been granted EXEMPT ACCESS POLICY system privilege.
    Each table in the USER2 schema has a trigger that causes insertion of
    a row into an audit table whenever DML is performed. When USER1 performs DML on a USER2 table, the operation fails with

  • I am trying to apply for a job on line and I am receiving this message t has been determined that you are currently running a "Popup Blocker". In order to continue, please allow this site from within your "Popup Blocker" preferences. How do I fix this?

    Hello,
    I am trying to apply for a job on line and I am receiving the following message "
    t has been determined that you are currently running a "Popup Blocker". In order to continue, please allow this site from within your "Popup Blocker" preferences
    How do I correct this??
    Thanks!

    Open Safari preferences, click on the Security icon in the toolbar, uncheck the pop-up blocker option.

  • 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

  • Manual price change on Sales Order line

    Hi everyone,
    Say I have a product A and have entered this in the price list Product A = USD 100 per unit.
    I create the order and process the order, do ship confirm, but at the time of creating the invoice, I want to change the price to 97. or 95 or whatever. This is not fixed and depends probably on various business factors not in anyone's control.
    I tried to manually change the price on the sales order line, but it is not allowing me to change, saying 'no manual discounts available'. My questions are :
    1. How can I manually change the price of a product at the time of invoicing?
    2. I have not defined any modifiers or qualifiers. Is this required, and if yes, what type and how to do it.
    3. At what level can the price be changed? at order booking or even after ship confirm?
    4. If I change the price today, this price change will be applicable to what orders? All orders with booked statuses, or all orders which are not yet ship confirmed, or all orders not interfaced or all future orders entered after this price change is saved?
    5. Do I need to make this price change in the price list also?
    Pls reply asap.
    Thanks a lot in advance.
    Sudhindra Desai

    Hi Sudhindra,
    Check out if this helps:
    1. How can I manually change the price of a product at the time of invoicing?
    You cannot change the price once invoicing is done or when the Order Line Status becomes 'Closed' . Any change at the order entry level can only be effected till the Order Line Status is in 'Entered' Stage.
    2. I have not defined any modifiers or qualifiers. Is this required, and if yes, what type and how to do it.
    We have defined a modifier for our business purpose where by we can manually change the Price at the order entry level. If you require I can send you the screen shots of the setups we have done. I would need your e-mail id for that.
    3. At what level can the price be changed? at order booking or even after ship confirm?
    Price can be changed till the order is in 'Entered Stage'. It cannot be changed once it is 'Booked'
    4. If I change the price today, this price change will be applicable to what orders? All orders with booked statuses, or all orders which are not yet ship confirmed, or all orders not interfaced or all future orders entered after this price change is saved?
    I did'nt understand this question actually. I think the price change is done on an order to order basis, if it is done for a particular order I don't think so it would affect further orders. If i'm changing the price in my price list then surely it would affect future orders.
    5. Do I need to make this price change in the price list also?
    This depends on ur business situation. If the price change is permanent u can make the changes in the price list also. Our business situation demands a base price to be defined in the price list even though the price we enter at the order entry level is always different from what comes from the attached price list.
    Hope this helps you.
    Regards,
    Anil Wadhwa

  • How to save LIST_LINE_ID of Price List when create Sales Order Line

    I dont know how save the LIST_LINE_ID of the Price List on Sales Order or anywhere when create Sales Order Line.
    I create with the following steps:
    Step 1: Create Price List for Item A with two line: Line 1 (Unit Price = 10,5, Pricing Attribute with Tax Classification Code = 5%), Line 2 (Unit Price = 11, Pricing Attribute with Tax Classification Code = 10%)
    Step 2: I create Sales Order Line with Item A, Tax Classification Code = 5% --> Unit Selling Price = List Price = 10,5 but dont bookorder
    Step 3: I update the Unit Price of Line 1 into 11.55.
    Step4 : I book this Sales Order. Howerver, I use form personalization to customize Book Event: if the Unit Price of Item on Price List > Unit Selling Price then cant not Book. But I dont konw List Price of Sales Order belong the line of Price List.
    Please help me check this issue. Thanks for your supports.
    BinhTC
    Email: [email protected]

    Bob's right - except that if you have OM: List Price Override Privilege set to 'Unlimited' (and from your scenario it sounds as if you have) it is possible that the value in unit_list_price will vary from what was originally retrieved from the price list.
    In that case, a safer bet is to use :LINE.original_list_price in your personalization as this will always contain what was originally retrieved and will mean you can avoid any repeat lookup via list_line_id.
    Regards,
    Jon

  • Sales Order Lines with inclusive VAT prices

    I am integrating a 3rd party web site order into SAP B1. The site can only provide VAT Inclusive Prices and cannot provide the VAT rate or code - that SAP order will be loaded with the VAT rate taken from the BP / Item matrix.
    This is not a problem when creating order lines as I can use the <PriceAfterVAT> element (using DI Server). However when adding Freight Lines to the B1 order there is no equivalent element. It appears that I can only add a value excluding VAT.
    Is there any way of adding a VAT Inclusine value to a Freight Line?
    Can Freight Items be set up so that the value can be entered as Vat Inclusive?
    I would prefer not to have to caluclate and enter the VAT exlcusive price as this invovles mimicing the Web Sites VAT Matrix calculation and hoping that this mimics the SAP VAT calculation and hopefully not ending up with rounding problems. Note that the Web Site has already taken payment via credit card and the invoice from SAP must match the Web Transaction.
    Any help would be appreciated.

    Hi Nick,
    Have you considered storing the freight costs on the order as a non-stock item on the item rows rather than using the freight lines? In that way you could use the same PriceAfterVAT field to back calculate the exclusive price.
    I'd recommend you also ask your question on the application forum:
    SAP Business One Application
    as they may have other suggestions as to how you could set your tax up.
    Kind Regards,
    Owen

  • User-exit in VA01/VA02 to add order item and condition price

    Hi experts,
       I have an urgent requirement to add an order item and pricing for VA01/VA02 when certain logic are met. Do you know a user-exit in VA01/VA02 to add sales order item and condition price for an order?
    I am currently using user-exit USEREXIT_SAVE_DOCUMENT_PREPARE but I can only add the required order item to xvbap but I also need to add a condition code and condition price for the added item (in xkomv). Your response are very much appreciated.
    Thanks in advance!

    Hi Leo,
      Check out few more exits:
    Exit Name           Description
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0001            Determine alternative materials for product selection
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    SDAPO001            Activating Sourcing Subitem Quantity Propagation
    Reward points if this helps.
    Manish

Maybe you are looking for

  • Authenitication using AD and Kerberos with JAAS servers

    Hello, pleas help me!!!!!!!!!!!!!!!!!!!!!! Im very unhappy, becasue I cant set up the authenitication. I set up it by the admin quide, but I cant set-up the AD plug-in. It wrote this error Error updating Windows AD authentication properties: The Acti

  • IPhone glitchy and worsening?

    I bought the iPhone 4s around the 17th October. I had no issues until a month after where I noticed there was some glitching here and there, but nothing too noticeable. So I ignored. It's now becoming impossible at times to even use it.. Often I can'

  • Long String as parameter

    I have the following PARAMETERS: texto(10000) TYPE c. But it only accept less than 200 characters and I want to receive more. Is this possible? Thanx in advance

  • My LED light turns on and off on its own, how can I fix this?

    I dropped my phone today and my LED light on the back by the camera turns on and off randomly. I've dropped it before today and it just now started doing this. How can I fix it or do I have to bring it in to a Apple store?

  • SGE2000 slow forwarding as accessswitch with LACP to SG500X stack

    Hello everyone, Question: Does any body know why  ports on my SGE2000 take so long (>60s) before forwarding packets to  the end user systems (desktop computers). I got two SG500X switches stacked in 10G mode and got two SGE2000 switches connected in