且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SAP CRM OData模型里的addressable为true的含义

更新时间:2022-08-28 10:21:45

Sent: Wednesday, December 3, 2014 6:35 PM

Subject: what does addressable = true mean


Opportunity Odata model里有三个entity set mark成address = true:


SAP CRM OData模型里的addressable为true的含义


SAP help里的解释是mark成address = true的entity set能够直接通过url访问,比如如下两个例子:document history和maxhit.


SAP CRM OData模型里的addressable为true的含义SAP CRM OData模型里的addressable为true的含义


而对于其他通过$expand访问的entity set, 比如Attachments,product等等,虽然表面上也是通过url直接访问:


SAP CRM OData模型里的addressable为true的含义


但是根据SAP help里的定义,framework在访问这些entity set时,总是先拿到root entity set,即Oppportunity,再执行expand操作。


下面的例子是Framework处理documentHistory的读操作:框架直接call GET_ENTITYSET method直接根据传入的guid将history返回:


SAP CRM OData模型里的addressable为true的含义


但是对于这个expand的url而言:

https://wdciw01.wdf.sap.corp:7080/sap/opu/odata/sap/CRM_OPPORTUNITY/Opportunities(guid’3440B5B1-73AE-1ED4-9ED9-F49FBCEA5CC2’)?$expand=Products,ChangeDocs,Competitors,OpportunityLogSet&sap-client=001

框架的处理是先从Opportunity出发:

SAP CRM OData模型里的addressable为true的含义SAP CRM OData模型里的addressable为true的含义




line 28先读取Opp header,再call line 41的read function 读取需要expand的sub entity set信息。