查询在采购价格规范中不起作用

2020-08-23 15:57发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)专家们, 我想使用absl覆...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


专家们,

我想使用absl覆盖采购订单的价格来获取产品组合的标价数据。

我认为标价的BO是" ProcurementPriceSpecification"。

在报告中,我通过使用查询" QueryByTypeCodeAndPropertyIDAndPropertyValue"执行数据。

尽管我添加了正确的参数,但结果为零。

我使用一些代码来查询" ProcurementPriceSpecification" BO。

结果也为零。 所以,我跟踪我的代码,我得到了错误

"(PRC_PROCUREMENT_PS,ROOT)发生技术错误(无业务配置要处理请求):PRC_ESF_CND_MAINT109。报告事件。"

我还参考了"按产品ID查询采购价格规格"的讨论。

我尝试使用以下代码执行此操作:

导入ABSL;

导入AP.FO.PriceAndTax.Global;

////////////////

if(this.ItemProduct.IsSet()){

var prodID = this.ItemProduct.ProductKey.ProductID.content;

if(!prodID.IsInitial()){

var TestDate = Date.ParseFromString(" 20160605");

var provider = 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",供应商);

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){

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;

}

}

}

}

最好的问候

Phyo