使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息
我在系統(tǒng)里創(chuàng)建了一個(gè)product,id為I043416, 描述信息為Mini Cooper:
圖片信息在Attachment區(qū)域:
使用一個(gè)OData服務(wù)讀取該產(chǎn)品的明細(xì)包括圖片信息。因?yàn)閷?duì)數(shù)據(jù)是只讀操作,故不需要額外的請(qǐng)求去獲取csrf token.
請(qǐng)求url:https://xxx/sap/c4c/odata/v1/c4codata/ProductCollection?filter=IDfilter=ID%20eq%20%27I043416%27&filter=IDexpand=ProductAttachment
其中$filter=ID和&expand之間的值,實(shí)際是 eq ‘I043416’ 進(jìn)行url encode后的值。
其中產(chǎn)品圖片的二進(jìn)制內(nèi)容,以Base64的格式存儲(chǔ)在節(jié)點(diǎn)ProductAttachment->Binary里。
要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":
總結(jié)
以上是生活随笔為你收集整理的使用SAP Cloud for Customer Product OData服务读取产品主数据和其图片信息的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 如何使用SAP Cloud for Cu
- 下一篇: 将某个网站嵌入到iframe的测试