SAP MDK:无法返回partnerPath

2020-08-18 00:19发布

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

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


大家好,

我已经使用Mobile Development Kit呆了一段时间,并尝试基于SAP Cloud Platform移动服务中的示例服务" com.sap.edm.sampleservice.v2"开发一个粗糙的示例应用程序。 到目前为止,一切正常,但是现在我遇到了以下问题。 我想通过以下操作创建一个实体类型为" SalesOrderItem"的实体:

{" ActionResult":{" _Name":" result"}," CreateLinks":[{" Property":" Header"," Target":{" EntitySet":" SalesOrderHeaders"," ReadLink":" /SalesOrdersOnline/Rules/Common/ChangeSet/ChangeSetSwitchReadLink.js"}},{" Property":" ProductDetails"," Target":{" EntitySet":" Products"," QueryOptions":" $ filter = ProductId eq'{ {#Control:ObjectCellListPickerProductId/#Value/#First/#Property:ReturnValue}}'"}}]," OnFailure":"/SalesOrdersOnline/Actions/CreateUpdateDelete/CreateEntityFailure.action"," OnSuccess":"//SalesOrdersOnline/Rules /Common/ChangeSet/CreateEntitySuccess.js","属性":{" CurrencyCode":"#ClientData/#Property:Product/#Property:CurrencyCode"," DeliveryDate":" #Control:DatePickerDeliveryDate/#Value"," GrossAmount ":"/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/GrossAmount.js"、"ItemNumber":"/img/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateItemNumber.js"、"NetAmount":"/img/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/NetAmount。 js"," ProductId":" #Con trol:ObjectCellListPickerProductId/#Value/#First/#Property:ReturnValue"," Quantity":"#Control:SimplePropertyQuantity/#Value"," QuantityUnit":"#Control:SimplePropertyQuantityUnit/#Value"," SalesOrderId":"/img/SalesOrdersOnline/Rules/SalesOrder/GetSalesOrderId.js"," TaxAmount":"/img/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/TaxAmount.js"},"目标":{" EntitySet":" SalesOrderItems"," Service":"/img/SalesOrdersOnline/Services/SampleSrv.service"}," ValidationRule":"/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/Validation.js"," _Type":" Action.Type.ODataService.CreateEntity"}

如果我仅对" Header"导航属性包括CreateLink,则工作正常,但是当我对" ProductDetails"导航属性也使用CreateLink时,就会遇到以下错误:

"名称为ProductDetails的属性不参与任何OData关联。无法返回partnerPath。"

有人知道这可能是什么原因吗?

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

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


大家好,

我已经使用Mobile Development Kit呆了一段时间,并尝试基于SAP Cloud Platform移动服务中的示例服务" com.sap.edm.sampleservice.v2"开发一个粗糙的示例应用程序。 到目前为止,一切正常,但是现在我遇到了以下问题。 我想通过以下操作创建一个实体类型为" SalesOrderItem"的实体:

{" ActionResult":{" _Name":" result"}," CreateLinks":[{" Property":" Header"," Target":{" EntitySet":" SalesOrderHeaders"," ReadLink":" /SalesOrdersOnline/Rules/Common/ChangeSet/ChangeSetSwitchReadLink.js"}},{" Property":" ProductDetails"," Target":{" EntitySet":" Products"," QueryOptions":" $ filter = ProductId eq'{ {#Control:ObjectCellListPickerProductId/#Value/#First/#Property:ReturnValue}}'"}}]," OnFailure":"/SalesOrdersOnline/Actions/CreateUpdateDelete/CreateEntityFailure.action"," OnSuccess":"//SalesOrdersOnline/Rules /Common/ChangeSet/CreateEntitySuccess.js","属性":{" CurrencyCode":"#ClientData/#Property:Product/#Property:CurrencyCode"," DeliveryDate":" #Control:DatePickerDeliveryDate/#Value"," GrossAmount ":"/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/GrossAmount.js"、"ItemNumber":"/img/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateItemNumber.js"、"NetAmount":"/img/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/NetAmount。 js"," ProductId":" #Con trol:ObjectCellListPickerProductId/#Value/#First/#Property:ReturnValue"," Quantity":"#Control:SimplePropertyQuantity/#Value"," QuantityUnit":"#Control:SimplePropertyQuantityUnit/#Value"," SalesOrderId":"/img/SalesOrdersOnline/Rules/SalesOrder/GetSalesOrderId.js"," TaxAmount":"/img/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/TaxAmount.js"},"目标":{" EntitySet":" SalesOrderItems"," Service":"/img/SalesOrdersOnline/Services/SampleSrv.service"}," ValidationRule":"/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/Validation.js"," _Type":" Action.Type.ODataService.CreateEntity"}

如果我仅对" Header"导航属性包括CreateLink,则工作正常,但是当我对" ProductDetails"导航属性也使用CreateLink时,就会遇到以下错误:

"名称为ProductDetails的属性不参与任何OData关联。无法返回partnerPath。"

有人知道这可能是什么原因吗?

付费偷看设置
发送
1条回答
哎,真难
1楼-- · 2020-08-18 00:42

Christoph Kinzig

您能够解决自己的问题吗? 问题? 如果是这样,请发布答案,以便其他人可以从您的发现中受益。

一周热门 更多>