我在系统里创建了一个product,id为I043416, 描述信息为Mini Cooper:

使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息

图片信息在Attachment区域:

使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息
使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息

使用一个OData服务读取该产品的明细包括图片信息。因为对数据是只读操作,故不需要额外的请求去获取csrf token.

请求url:https://xxx/sap/c4c/odata/v1/c4codata/ProductCollection?filter=IDfilter=ID%20eq%20%27I043416%27&expand=ProductAttachment

其中$filter=ID和&expand之间的值,实际是 eq ‘I043416’ 进行url encode后的值。

其中产品图片的二进制内容,以Base64的格式存储在节点ProductAttachment->Binary里。

使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息

相关文章:

  • 2021-10-31
  • 2022-01-08
  • 2021-09-12
  • 2021-10-02
  • 2022-12-23
  • 2022-01-17
  • 2021-09-13
  • 2021-07-11
猜你喜欢
  • 2021-11-27
  • 2021-04-10
  • 2021-10-09
  • 2021-08-08
  • 2021-11-02
  • 2021-09-24
  • 2021-08-19
相关资源
相似解决方案