如何根据产品代码和购买者获得订单?

2020-09-28 11:53发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)我需要根据所购买产品的代码值和用...

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

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


我需要根据所购买产品的代码值和用户的PK检索订单,但是我不知道如何通过FlexibleSearch查询订单中的条目。

我试图检查是否可以像下面这样获取订单的条目:

 从{订购为o}中选择{o:entries}

  

但是我收到错误消息

 无法搜索类型Order中的未知字段'TableField(name ='entries',langPK ='null',type = Order)',除非您禁用检查,infoMap = TypeInfoMap的type = 8796094169170 code = Order superType =  8796093382738 itemTable =订单UPTable =订单up LTableName = orderslp PropsTable = orderprops核心字段=所有者= [owner,OwnerPkString,class de.hybris.platform.util.ItemPropertyValue] modifiedtime = [modifiedtime,modifiedTS,class java.util.Date] itemtype =  [itemtype,TypePkString,class de.hybris.platform.util.ItemPropertyValue] creationtime = [creationtime,createdTS,class java.util.Date] pk = [pk,PK,class.hybris.platform.core.PK]未本地化的字段 =日期= [日期,创建的TS,类java.util.Date]代码= [代码,p_code,类java.lang.String] expirationtime = [expirationTime,p_expirationtime,类java.util.Date] totaltaxvaluesinternal = [totalTaxValuesInternal,p_totaltaxvaluesinternal,  class java.lang.String] description = [description,p_description,class java.lang.String] d  iscountsincludepaymentcost = [discountsIncludePaymentCost,p_discountsincludepaymentcost,类java.lang.Boolean]语言= [language,p_language,class de.hybris.platform.util.ItemPropertyValue] quotereference = [quoteReference,p_quotereference,class de.hybris.platform.util.ItemPropertyValue  paymentinfo = [paymentInfo,p_paymentinfo,de.hybris.platform.util.ItemPropertyValue类] discountsincludedeliverycost = [discountsIncludeDeliveryCost,p_discountsincludeddeliverycost类,java.lang.Boolean] europe1pricefactory_udg = [Europe1PriceFactory_UDG,p_europe1ValueProperty.perfactor。  versionid = [versionID,p_versionid,类java.lang.String] paymentmode = [paymentMode,p_paymentmode,类de.hybris.platform.util.ItemPropertyValue] exportstatus = [exportStatus,p_exportstatus,类de.hybris.platform.util.ItemPropertyValue]  paymentstatus = [paymentStatus,p_paymentstatus,类de.hybris.platform.util.ItemPropertyValue] salesapplication = [salesApplication  ,p_salesapplication,类别de.hybris.platform.util.ItemPropertyValue] placedby = [placedBy,p_placedby,类别de.hybris.platform.util.ItemPropertyValue] currency = [currency,p_currency,类别de.hybris.platform.util.ItemPropertyValue]  net = [net,p_net,类java.lang.Boolean]已计算= [calculated,p_calculated,类java.lang.Boolean]欺诈= [欺诈,p_fraudulent,类java.lang.Boolean] europe1pricefactory_utg = [Europe1PriceFactory_UTG,p_europe1pricefactory_utg,class  de.hybris.platform.util.ItemPropertyValue]潜在欺诈= = [potentiallyFraudulent,p_potentially欺诈,类java.lang.Boolean] europe1pricefactory_upg = [Europe1PriceFactory_UPG,p_europe1pricefactory_upg,class de.hybris.platformsValueInternaldis全局值 java.lang.String] paymentcost = [paymentCost,p_paymentcost,类java.lang.Double] deliverymode = [deliveryMode,p_deliverymode,类de.hybris.platform.uti  l.ItemPropertyValue] totalprice = [totalPrice,p_totalprice,类java.lang.Double]条目组= [entryGroups,p_entrygroups,类java.lang.Object] previousdeliverymode = [previousDeliveryMode,p_previousdeliverymode,class de.hybris.platform.util.ItemPropertyValue]  paymentaddress = [paymentAddress,p_paymentaddress,de.hybris.platform.util.ItemPropertyValue类] applycouponcodes = [appliedCouponCodes,p_appliedcouponcodes,java.lang.Object类] store = [store,p_store,de.hybris.platform.util.ItemPropertyValue]  deliverycost = [deliveryCost,p_deliverycost,class java.lang.Double] totaltax = [totalTax,p_totaltax,class java.lang.Double] statusinfo = [statusInfo,p_statusinfo,class java.lang.String] site = [site,p_site,class  de.hybris.platform.util.ItemPropertyValue] quotediscountvaluesinternal = [quoteDiscountValuesInternal,p_quotediscountvaluesinternal,类java.lang.String] deliverystatus = [deliveryStatus,p_deliverystatus,class de.hybris.platform.util.ItemPropertyValue]小计=  [小计,p_subtotal,类java.lang.Double]名称= [名称,p_name,类java.lang.String] totaldiscounts = [totalDiscounts,p_totaldiscounts,类java.lang.Double] guid = [guid,p_guid,java类。  lang.String] originalversion = [originalVersion,p_originalversion,类de.hybris.platform.util.ItemPropertyValue] deliveryaddress = [deliveryAddress,p_deliveryaddress,类de.hybris.platform.util.ItemPropertyValue] user = [user,p_user,class de。  hybris.platform.util.ItemPropertyValue]状态= [状态,p_status,类de.hybris.platform.util.ItemPropertyValue]本地化字段= [])

  

在我们的业务逻辑中,一个订单将仅包含一个产品,因此假设我知道用户的PK和产品的代码,如何基于这两个值来检索订单代码? 我先在HAC上测试此查询,然后再在Java上使用它,因此,如果有其他方法可以根据我想知道的这两个参数来检索订单。

1条回答
宇峰科技
2020-09-28 12:42

嗨,阿古斯丁(Agustín),请尝试以下从{OrderEntry AS ent加入JOIN或{{.pk} = {ent:order}}在{ent:product} =?product AND { or:User} =?user;

一周热门 更多>