SAP CRM content management
SAP CRM uses the Attachments UI to provide content management functionality to users. Upload local document to CRM system by new button:
This content management supports simple version management functions. Users can click Check Out to export a document to the local computer, and then import the modified version to CRM through the Check In button after editing.
Each Check Out/Check In generates a new version.
Technically, each file uploaded to CRM automatically generates a Logical Info Object(LOIO) and a Physical Info Object(PHIO). Just from the name of the pair of concepts you can guess their purpose: LOIO is a logical concept that describes the objective existence of a file. PHIO bears the specific content of a file. After each Check In, the user sees a new version generated on the UI, while the background corresponds to a new PHIO instance generated. This is why if you look at the CL_CRM_DOCUMENTS API corresponding to Content Management, you will find LOIO/PHIO in many method arguments.
Content storage implementation of CRM content management system
Content management system to achieve an important function is content storage. I uploaded a text file to a product in the CRM system.
Click the hyperlink in the file name “Jerry” to open the text file in your browser.
So how is this text file stored on the CRM server? Take a closer look at this browser link:
/sap/bc/contentserver/001/jerry? get&pVersion=0045&contRep=BDS_DB22&docId=FA163EE56C3A1EE8908EFBAA20D4FC6C&compId=jerry.txt
- / SAP/BC/contentServer: transaction code SICF, Service Name enter contentServer, you can find this Service corresponding to the ABAP processing class CL_HTTP_EXT_CSIF.
To debug, set a breakpoint in its method HANDLE_REQUEST.
- ContRep =BDS_DB22: My blog How is Attachment Physically stored in database table in CM Framework
Explains how to find the corresponding background database table name by the number BDS_DB22. Follow the steps in this article to locate the database table BDSCONT22.
docId=FA163EE56C3A1EE8908EFBAA20D4FC6C
Put the docId in the BDS_DB22 table and run PHIO_ID to find the contents of the jerry. TXT file in the above example.
In addition to text files, the content management system also needs to support other storage such as PDF or video files, so the database table corresponding fields adopt special data types INDX_CLSTR and INDX_CLUST, so the specific content of the file cannot be directly viewed by looking up the table in the transaction code SE16.
Instead, use function module SCMS_R3DB_IMPORT. If you look at the code, you’ll see that this function uses the ABAP keyword IMPORT to manipulate these two special table fields to read the actual contents of the file.
As a module of enterprise management software, the support of virus scanning is essential. SAP implements the virus scanning framework in CRM content management system, and the specific engine to perform virus scanning is customized by the customer:
In my official account article SAP S4CRM VS C4C, Zhuge Liang and Zhou Yu? The user can click the “With Template” button in Figure 1 below to develop a word Template file locally and bind the fields in it to the CRM standard BO model fields, as shown in Figure 2 below. The word file rendered at runtime displays the corresponding data from the subordinate business document, as shown in Figure Step 3.
The technology behind this runtime Rendering implementation of Word files is described in my blog Manipulate Docx Document with ABAP.
For more information on SAP CRM content management, please refer to my collection of blogs:
A collection of technical details about Content Management
C4C content management
As a cloud product, users cannot easily view their server-side storage details from the browser as they can in SAP CRM. Seeing a hyperlink to a file in Chrome Developer Tools is a simple “#”.
In fact, every time a hyperlink is clicked, C4C’s ABAP background dynamically calculates the url of the file for the user to download or preview:
https://xxxxx.crm.ondemand.com/sap(cz1TSUQlM2FBTk9OJTNhdmFhaTAza3ZjX0tWQ18wMCUzYXpkMUFiM1FIQ1VfR2pUU2NWbEZBUzk5NWtydVBna F9GWXNBaXhBWUMtQVRU)/ap/ds/wd/doc/00163E11A66C1ED8909167D838730A19/clipboard1.png?sap-client=331&Ctxt=QlVTSU5FU1NfUEFSVE 5FUl9UTVBMOkFUVEFDSE1FTlRfRk9MREVS&Shm=00163E11A66C1ED8909167D838730A19
Because the background of C4C is not visible to customers and partners, the calculation logic of this URL is not easy to reveal.
C4C, like CRM, has a built-in virus scanning engine for uploaded files and sent emails to ensure the security of the C4C solution.
In addition, you can configure which MIME types of files are allowed to be uploaded to the C4C system through the Business Configuration workcenter.
You can also support file uploads with simple steps for Custom BO created in Cloud Application Studio. For details, see my blog:
Step by step to enable your custom BO with attachment upload functionality
If the uploaded file is an image, you can even do some simple development in Cloud Application Studio to merge the image with the Custom BO data and render it into a PDF file.
For details, see my blog:
How to render PDF which displays picture from the image attachment of your custom BO
For more of Jerry’s original technical articles, please follow the public account “Wang Zixi” or scan the following QR code: