zl程序教程

您现在的位置是:首页 >  其他

当前栏目

如何创建SAP C4C Product list并用OData服务消费

SAPList服务 如何 创建 消费 OData product
2023-09-14 09:02:59 时间

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?KaTeX parse error: Expected 'EOF', got '&' at position 19: …ter=ID eq '161'&̲expand=ProductBusinessPartnerRelationProduct
我在C4C系统里添加的三个产品,包含在OData响应结构的ProductBusinessPartnerRelationProduct节点里:

展开这个子节点下面的三个对象,分别对应着product list里的三个产品:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":