天天看點

如何建立SAP C4C Product list并用OData服務消費

SAP Cloud for Customer裡的product list建立:

我建立一個ID為161的product list,維護三個product進去:

三個product ID如下:

找到該product list對應的UI:COD_ProductList_OWL

這個UI對應的背景BO為ProductBusinessPartnerRelation:

建立一個C4C OData服務,取名productListOData:

BO選擇剛才在UI designer裡找到的ProductBusinessPartnerRelation:

選中BO之後,接下來選擇BO節點,從Root出發:

對于該OData的權限控制,選擇Produt Lists視圖:

使用OData服務通過一次http調用,同時傳回該product list包含的三個product:

https://my592.c4c.saphybriscloud.cn/sap/c4c/odata/cust/v1/productlistodata/ProductBusinessPartnerRelationCollection?

$filter=ID eq '161'&$expand=ProductBusinessPartnerRelationProduct

我在C4C系統裡添加的三個産品,包含在OData響應結構的ProductBusinessPartnerRelationProduct節點裡:

展開這個子節點下面的三個對象,分别對應着product list裡的三個産品:

本文來自雲栖社群合作夥伴“汪子熙”,了解相關資訊可以關注微信公衆号"汪子熙"。

繼續閱讀