Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Prev
Next
Restore Objects In AD
Restore Active Directory At The Object Level. Free Trial Download!
www.Quest.com/Active-Directory
www.confluentminds.com/Trainings/SCM/Topic3.7_Ch3_Part3.html
1/4
6/10/12
gpr_pricing_attr_tbl(J).EXCLUDER_FLAG := 'N'; gpr_pricing_attr_tbl(J).ATTRIBUTE_GROUPING_NO := 1; gpr_pricing_attr_tbl(J).PRICE_LIST_LINE_INDEX := 2; gpr_pricing_attr_tbl(J).operation := QP_GLOBALS.G_OPR_CREATE; J := J + 1; gpr_pricing_attr_tbl(J).pricing_attribute_id := FND_API.G_MISS_NUM; gpr_pricing_attr_tbl(J).list_line_id := FND_API.G_MISS_NUM; gpr_pricing_attr_tbl(J).PRODUCT_ATTRIBUTE_CONTEXT := 'ITEM'; gpr_pricing_attr_tbl(J).PRODUCT_ATTRIBUTE := 'PRICING_ATTRIBUTE1'; gpr_pricing_attr_tbl(J).PRODUCT_ATTR_VALUE := '62083'; gpr_pricing_attr_tbl(J).PRODUCT_UOM_CODE := 'Ea'; gpr_pricing_attr_tbl(J).EXCLUDER_FLAG := 'N'; gpr_pricing_attr_tbl(J).ATTRIBUTE_GROUPING_NO := 1; gpr_pricing_attr_tbl(J).PRICE_LIST_LINE_INDEX := 3; gpr_pricing_attr_tbl(J).operation := QP_GLOBALS.G_OPR_CREATE; --dbms_output.put_line('before process price list '); QP_PRICE_LIST_PUB.Process_Price_List ( p_api_version_number=> 1 , p_init_msg_list=> FND_API.G_FALSE , p_return_values=> FND_API.G_FALSE , p_commit=> FND_API.G_FALSE , x_return_status=> gpr_return_status , x_msg_count=> gpr_msg_count , x_msg_data=> gpr_msg_data , p_PRICE_LIST_rec=> gpr_price_list_rec , p_PRICE_LIST_LINE_tbl=> gpr_price_list_line_tbl , p_PRICING_ATTR_tbl=> gpr_pricing_attr_tbl , x_PRICE_LIST_rec=> ppr_price_list_rec , x_PRICE_LIST_val_rec=> ppr_price_list_val_rec , x_PRICE_LIST_LINE_tbl=> ppr_price_list_line_tbl , x_PRICE_LIST_LINE_val_tbl=> ppr_price_list_line_val_tbl , x_QUALIFIERS_tbl=> ppr_qualifiers_tbl , x_QUALIFIERS_val_tbl=> ppr_qualifiers_val_tbl , x_PRICING_ATTR_tbl=> ppr_pricing_attr_tbl , x_PRICING_ATTR_val_tbl=> ppr_pricing_attr_val_tbl ); IF gpr_return_status <> FND_API.G_RET_STS_SUCCESS THEN RAISE FND_API.G_EXC_UNEXPECTED_ERROR; END IF; --dbms_output.put_line('after process price list '); EXCEPTION WHEN FND_API.G_EXC_ERROR THEN gpr_return_status := FND_API.G_RET_STS_ERROR; --Get message count and data --dbms_output.put_line('err msg 1 is : ' || gpr_msg_data); Rollback; WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN gpr_return_status := FND_API.G_RET_STS_UNEXP_ERROR ; --dbms_output.put_line(' msg count 2 is : ' || gpr_msg_count); for k in 1 .. gpr_msg_count loop gpr_msg_data := oe_msg_pub.get( p_msg_index => k, p_encoded => 'F' ); /* oe_msg_pub.Count_And_Get ( p_count=> gpr_msg_count , p_data=> gpr_msg_data ); */ --Get message count and data --dbms_output.put_line('err msg ' || k ||'is: ' || gpr_msg_data); null; end loop; Rollback; WHEN OTHERS THEN gpr_return_status := FND_API.G_RET_STS_UNEXP_ERROR ; --Get message count and data --dbms_output.put_line('err msg 3 is : ' || gpr_msg_data); Rollback; end;
3.7.2. Pricing Scenario2 This sample script inserts a Pricing Formula with seven different pricing formula lines to demonstrate the six formula line types supported in Advanced Pricing formulas: * Price List Line (PLL) * Function (FUNC) * List Price(LP) * Numeric Constant (NUM) * Pricing Attribute (PRA) * Factor List(ML) * Modifier Value (MV) Oracle Basic Pricing supports three formula line types: www.confluentminds.com/Trainings/SCM/Topic3.7_Ch3_Part3.html
2/4
6/10/12
Oracle Basic Pricing supports three formula line types: * Pricing Attribute (PRA) * Numeric Constant (NUM) * Factor List (ML) A pricing formula header record and seven price formula lines are created. For the formula line of type Factor List, the list_header_id of an existing Factor List is used in this sample script. This script must be modified by the user so that the following column is populated with a valid list_header_id of an existing Factor List: gpr_formula_lines_tbl(K).price_modifier_list_id and the following column is populated with a valid list_line_id of an existing Price List Line from the instance where this script is run: gpr_formula_lines_tbl(K).price_list_line_id.
Declare ::::::::::: K number := 1; Begin /* Set the price_formula_id to g_miss_num to Create the Price Formula Record(Header)*/ gpr_formula_rec.price_formula_id := FND_API.G_MISS_NUM; gpr_formula_rec.name := 'Sample1-PF 1025-1'; gpr_formula_rec.description := 'Sample Pricing Formula'; gpr_formula_rec.formula := 'SQRT(1)*2-NVL(3,4)/5+6'; --Any valid Mathematical Expression including built-in database functions. --Every operand must correspond to a step_number in a price formula line. gpr_formula_rec.operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 1 of type 'List Price'(LP) */ K := 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'LP' gpr_formula_lines_tbl(K).step_number := 1; gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 2 of type 'Price List Line'(PLL) */ K := K + 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'PLL'; gpr_formula_lines_tbl(K).step_number := 2; gpr_formula_lines_tbl(K).price_list_line_id := 293195; -- Corresponds to the list_line_id of the item 'dw01' on the PriceList -- 'Testing 1023'. gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 3 of type 'Pricing Attribute'(PRA) */ K := K + 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'PRA'; gpr_formula_lines_tbl(K).step_number := 3; gpr_formula_lines_tbl(K).pricing_attribute_context := 'PRICING ATTRIBUTE'; gpr_formula_lines_tbl(K).pricing_attribute := 'PRICING_ATTRIBUTE12'; -- Corresponds to the Pricing Attribute 'Insurance Cost' gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 4 of type 'Numeric Constant'(NUM) */ K := K + 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'NUM'; gpr_formula_lines_tbl(K).step_number := 4; gpr_formula_lines_tbl(K).numeric_constant := 1000; gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 5 of type 'Function'(FUNC) */ -- User must customize the QP_CUSTOM.Get_Custom_Price function -- to return a numeric value and also set the profile option -- 'QP: Get Custom Price Customized' to 'Yes' at the Site Level to -- successfully use this formula line type (FUNC) in their formulas. K := K + 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'FUNC'; gpr_formula_lines_tbl(K).step_number := 5; gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 6 of type 'Factor List'(ML) */ K := K + 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'ML'; gpr_formula_lines_tbl(K).step_number := 6;
www.confluentminds.com/Trainings/SCM/Topic3.7_Ch3_Part3.html
3/4
6/10/12
gpr_formula_lines_tbl(K).price_modifier_list_id := 50174; -- Corresponds to the list_header_id of an existing Factor List -- 'ABC' gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; /* Create price formula line 7 of type 'Modifier Value'(MV) */ K := K + 1; gpr_formula_lines_tbl(K).price_formula_id := FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).price_formula_line_id:= FND_API.G_MISS_NUM; gpr_formula_lines_tbl(K).formula_line_type_code := 'MV' gpr_formula_lines_tbl(K).step_number := 7; gpr_formula_lines_tbl(K).operation := QP_GLOBALS.G_OPR_CREATE; --dbms_output.put_line('before process price formula '); QP_PRICE_FORMULA_PUB.Process_Price_Formula ( p_api_version_number => 1 , p_init_msg_list => FND_API.G_FALSE , p_return_values => FND_API.G_FALSE , p_commit => FND_API.G_FALSE , x_return_status => gpr_return_status , x_msg_count => gpr_msg_count , x_msg_data => gpr_msg_data , p_FORMULA_rec => gpr_formula_rec , p_FORMULA_LINES_tbl => gpr_formula_lines_tbl , x_FORMULA_rec => ppr_formula_rec , x_FORMULA_val_rec => ppr_formula_val_rec , x_FORMULA_LINES_tbl => ppr_formula_lines_tbl , x_FORMULA_LINES_val_tbl => ppr_formula_lines_val_tbl ); IF gpr_return_status <> FND_API.G_RET_STS_SUCCESS THEN RAISE FND_API.G_EXC_UNEXPECTED_ERROR; END IF --dbms_output.put_line('after process price formula '); EXCEPTION WHEN FND_API.G_EXC_ERROR THEN gpr_return_status := FND_API.G_RET_STS_ERROR; --Get message count and data --dbms_output.put_line('err msg 1 is : ' || gpr_msg_data); Rollback; WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN gpr_return_status := FND_API.G_RET_STS_UNEXP_ERROR ; --dbms_output.put_line(' msg count 2 is : ' || gpr_msg_count); for k in 1 .. gpr_msg_count loop gpr_msg_data := oe_msg_pub.get( p_msg_index => k, p_encoded => 'F' ); /* oe_msg_pub.Count_And_Get ( p_countgpr_msg_count , p_data => gpr_msg_data ); */ --Get message count and data --dbms_output.put_line('err msg ' || k ||'is: ' || gpr_msg_data); null; end loop; Rollback; WHEN OTHERS THEN gpr_return_status := FND_API.G_RET_STS_UNEXP_ERROR ; --Get message count and data --dbms_output.put_line('err msg 3 is : ' || gpr_msg_data); Rollback; end; / Commit;
Copyright 2000-2005 ConfluentMinds Pvt Ltd. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of ConfluentMinds Pvt Ltd. Use is subject to license terms. Prev Home A Techno-functional Guide to Oracle Applications - Supply Chain Management.Your feedback please. Next
www.confluentminds.com/Trainings/SCM/Topic3.7_Ch3_Part3.html
4/4