on 08-12-2016 3:27 AM
Hi experts ,
I want to get the data of List Price of Product Portfolio using absl to overwrite the price of purchase order .
I thinks the BO of List Price is "ProcurementPriceSpecification" .
In reporsitory , I execute the data by using query "QueryByTypeCodeAndPropertyIDAndPropertyValue" .
Although I add right paramter , the result was zero .
I use some code to query "ProcurementPriceSpecification" BO.
The result also zero . So, I trace my code , I am getting the error
" (PRC_PROCUREMENT_PS, ROOT) A technical error (No business configuration to process request) occurred: PRC_ESF_CND_MAINT 109. Report an incident."
I also reference the discussion "Query Procurement Price Specification by Product ID".
I tried to do this with this code:
import ABSL;
import AP.FO.PriceAndTax.Global;
////////////////
if(this.ItemProduct.IsSet()){
var prodID = this.ItemProduct.ProductKey.ProductID.content;
if(!prodID.IsInitial()){
var TestDate = Date.ParseFromString("20160605");
var supplier = this.ToParent.SellerParty.Party.Key.PartyID.content;
var prd_cat = this.ItemProduct.ProductCategory.InternalID;
if(!TestDate.IsInitial()){
var priceSpecQuery = ProcurementPriceSpecification.QueryByTypeCodeAndPropertyIDAndPropertyValue;
var params = priceSpecQuery.CreateSelectionParams();
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation1.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", prodID);
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation2.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", supplier);
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation3.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ",prd_cat);
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation1.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRODUCT_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation2.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_SUPPL_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation3.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRD_CAT_ID");
params.Add(priceSpecQuery.Status.ConsistencyStatusCode, "I", "EQ", "3");
params.Add(priceSpecQuery.Status.ReleaseStatusCode , "I", "EQ", "3");
var result = priceSpecQuery.Execute(params);
foreach(var inst in result){
this.ListUnitPrice.Amount.content = inst.Amount.content;
this.ListUnitPrice.Amount.currencyCode = inst.Amount.currencyCode;
this.ListUnitPrice.BaseQuantity.content = inst.BaseQuantity.content;
this.ListUnitPrice.BaseQuantityTypeCode.content = inst.BaseQuantityTypeCode.content;
}
}
}
}
Best Regards,
Phyo
Hi there,
var priceList : BusinessObject::ProcurementPriceSpecification;
var propertyValuation : BusinessObject::ProcurementPriceSpecification.PropertyValuation;
/*
//Bin mir nicht sicher ob dise Init Query benötigt wird
// Initialization query to define Workcenter subview, e.g. PriceList
var initQuery = ProcurementPriceSpecification.QueryByGroupCode;
var initSelParams = initQuery.CreateSelectionParams();
initSelParams.Add(initQuery.GroupCode.content, "I", "EQ", "SRM_PPS");
var initQueryResult = initQuery.Execute(initSelParams);
*/
//Fetch Purchase Price from Procuremend price List
var priceSpecQuery = ProcurementPriceSpecification.QueryByTypeCodeAndPropertyIDAndPropertyValue;
var params = priceSpecQuery.CreateSelectionParams();
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation1.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRODUCT_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation1.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", productID); //INSERT PRODUCT NUMBER
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation2.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_SUPPL_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation2.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", supplierId); //INSERT supplier ID
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation3.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRODUCT_TYPE_CODE");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation3.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", "1"); //mandatory technical field ( 1 represents Material )
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation4.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRODUCT_ID_TYPE_CODE");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation4.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", "1"); //mandatory technical field
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation5.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRD_CAT_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation6.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRD_CAT_HIER_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation7.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_COMPANY_ID");
//search for current validity date
params.Add(priceSpecQuery.ValidityPeriod.StartTimePoint.Date, "I", "LE", Context.GetCurrentUserDate()); // Current Date
params.Add(priceSpecQuery.ValidityPeriod.StartTimePoint.TypeCode, "I", "EQ", "1"); //mandatory technical field
params.Add(priceSpecQuery.ValidityPeriod.EndTimePoint.Date, "I", "GE", Context.GetCurrentUserDate()); // Current Date
params.Add(priceSpecQuery.ValidityPeriod.EndTimePoint.TypeCode, "I", "EQ", "1"); //mandatory technical field
params.Add(priceSpecQuery.Status.ConsistencyStatusCode, "I", "EQ", "3");
params.Add(priceSpecQuery.Status.ReleaseStatusCode, "I", "EQ", "3");
//01PP => List Price
params.Add(priceSpecQuery.TypeCode.content, "I", "EQ", "01PP");
var result = priceSpecQuery.Execute(params);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This code works perfectly.
Thanks!
Hi Charm,
The list price BO is Procurement Price Specification.
You can use webservice - NameManageProcurementPriceSpecificationIn to update the list prices.
You can find the sample payload in Application and User Management -> Service Explorer view -> List Price -> Click on the link button.
Best Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am having the exact same issue. PriceMasterDataManagement is definitely in scope. I even get data if I execute the query without selection paramerters. Only with selection parameters I am not getting any result. Any idea what I am missing?
My query looks pretty much the same as the one stated earlier.
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pole,
You might be getting the error because PriceMasterDataManagement might not be scoped.
might
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pole,
Try to use the SalesPriceList.bo. If you click over it in the repository, there're examples explaining how to perform the query.
Best regards,
Alexandre.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Horst ,
I had a look at Query Procurement Price Specification by Product ID .
I also try the step of it but I can't .
Best Regards,
Pole
Hello Alexandre ,
I tried to do this with this code that similar with SalesPriceList.bo :
But I can't
var prodID = this.ProductKey.ProductID.content;
if(!prodID.IsInitial()){
var supplier = this.ToRoot.SellerParty.Party.Key.PartyID.content;
var prd_cat = this.ProductCategory.InternalID;
var priceSpecQuery = ProcurementPriceSpecification.QueryByTypeCodeAndPropertyIDAndPropertyValue;
var params = priceSpecQuery.CreateSelectionParams();
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation1.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRODUCT_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation1.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", prodID);
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation2.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_SUPPL_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation2.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ", supplier);
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation3.PriceSpecificationElementPropertyReference.PriceSpecificationElementPropertyID.content, "I", "EQ", "CND_PRD_CAT_ID");
params.Add(priceSpecQuery.PropertyValuationPriceSpecificationElementPropertyValuation3.PriceSpecificationElementPropertyValue.ID.content, "I", "EQ",prd_cat);
//params.Add(priceSpecQuery.Status.ConsistencyStatusCode, "I", "EQ", "3");
//params.Add(priceSpecQuery.Status.ReleaseStatusCode , "I", "EQ", "3");
var result = priceSpecQuery.Execute(params);
foreach(var inst in result){
this.ToParent.ListUnitPrice.Amount.content = inst.Amount.content;
this.ToParent.ListUnitPrice.Amount.currencyCode = inst.Amount.currencyCode;
this.ToParent.ListUnitPrice.BaseQuantity.content = inst.BaseQuantity.content;
this.ToParent.ListUnitPrice.BaseQuantityTypeCode.content = inst.BaseQuantityTypeCode.content;
}
}
User | Count |
---|---|
82 | |
9 | |
9 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.