Suppose we have the following product with 5 attachments:

使用代码获得一个SAP CRM Business Object的所有附件数据

First we get its guid 00163EA71FFC1ED1A5BB4940F3F30AA7 from table COMM_PRODUCT:

使用代码获得一个SAP CRM Business Object的所有附件数据

And then call CL_CRM_DOCUMENTS=>GET_INFO with the following input:

使用代码获得一个SAP CRM Business Object的所有附件数据

We get five logical object instances, which works as we expected.

The number of physical object instances is greater than the one of logical objects, which means one or more attachments have multiple versions.

使用代码获得一个SAP CRM Business Object的所有附件数据

Looking into the internal table PHIOLOIOS, we can know that the logical object 00163EA720041EE39FCB974DB07F092D has totally three versions.

使用代码获得一个SAP CRM Business Object的所有附件数据

and by looking into the exporting parameter IOS_PROPERTIES_RESULT, we can know its name by checking the respective PROPERTIES:

使用代码获得一个SAP CRM Business Object的所有附件数据
使用代码获得一个SAP CRM Business Object的所有附件数据

We can double check this in UI:

使用代码获得一个SAP CRM Business Object的所有附件数据

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
使用代码获得一个SAP CRM Business Object的所有附件数据

相关文章: