While several blogs cover all aspects of creating, connecting, and setting up BTP DMS service with/for S/4HANA, this write-up will not repeat those. Instead, I will share the challenges I faced and the steps I took to configure and integrate the service. If you do not read the linked blogs, this article may not make sense.
SAP BTP DMS for S/4 HANA
-
Start with SAP BTP Document Management Service (DMS)
- Start config – Set up your SAP BTP account and subscribe to SAP BTP DMS.
- Until – Navigate to “Users” and select yourself or the user you want to grant access to DMS. Then, assign Role Collection “DMS_ADMIN”.
- I received 401 and 415 errors. In addition, I could not use the JWT token properly and repeatedly got an ‘Unsupported media’ error. However, following the blog from #2, I did not receive any errors.
-
-
In POSTMAN, unchecked the default ‘Content-Type: text/plan’ and created my own ‘Content-Type: application/json’.
-
You could also do this by changing the content type under the Body tab.
-
I did not create a repository with authorization ‘bearer’ of ‘JWT’ from https://*cf.authentication.us10.hana.ondemand.com/oauth/token?grant_type=client_credentials but instead used ‘OAuth 2.0’ and ‘Get New Access Token’ at https://*.cfapps.us10.hana.ondemand.com/rest/v2/repositories.
-
However, later, I successfully changed the authorization of the /browser GET call to bearer token with JWT token.
-
Using OAuth 2.0 would require me to generate/get a new access token.
-
I accidentally created the repository twice. DMS will create a repository with the same name but with different IDs.
- My request to POST /rest/v2/repositories.
{ "repository": { "displayName": "ZDMSTEST", "externalId": "ZDMSTEST", "isContentBridgeEnabled":"true", "description": "Repository", "repositoryType": "internal", "isVersionEnabled": "true", "isVirusScanEnabled": "false", "skipVirusScanForLargeFile": "true", "hashAlgorithms": "None" } }
-
My response
{ "cmisRepositoryId": "cmisRepositoryId", "createdTime": "2023-03-23T14:45:17.199Z", "description": "Repository", "externalId": "ZDMSTEST", "id": "2his-is the-repo-sitory-idthatyouwillneed", "lastUpdatedTime": "2023-03-23T14:45:17.199Z", "name": "ZDMSTEST", "repositoryCategory": "Instant", "repositoryParams": [ { "paramName": "isVersionEnabled", "paramValue": true }, { "paramName": "isThumbnailEnabled", "paramValue": false }, { "paramName": "isVirusScanEnabled", "paramValue": false }, { "paramName": "hashAlgorithms", "paramValue": "None" }, { "paramName": "isContentBridgeEnabled", "paramValue": true }, { "paramName": "skipVirusScanForLargeFile", "paramValue": false }, { "paramName": "isCMKEnabled", "paramValue": false } ], "repositorySubType": "SAP Document Management Service", "repositoryType": "internal" }
- Didn’t build the Basic MTA Fiori Application
- While trying to retrieve the repositories, use /browser URL. By mistake, adding ‘/’ after “/browser” threw a “permission denied” error.
-
- Utilizing CMIS Workbench together with BTP DMS
- SapMachine URL is case sensitive.
- CMIS Workbench is not working, throwing a Proxy error. After analysis, I found out that because of the script, it was appending the path incorrectly. The path was long and had spaces. I could troubleshoot by turning on ‘echo’. Below is the correction.
- Original
for /F "delims=/" %%x in ('"java -classpath .;%~dp0lib* org.apache.chemistry.opencmis.workbench.ProxyDetector -j -s"') do set "JAVA_PROXY_CONF=%%x"
- Corrected
for /F "delims=/" %%x in ('"java -classpath "%~dp0lib*"apache.chemistry.opencmis.workbench.ProxyDetector -j -s"') do set "JAVA_PROXY_CONF=%%x"
- Original
- Leverage SAP BTP DMS as the external content server.
- As mentioned in the blog, we also received the NIECONN error. Since SAP ECS hosts our systems, they gave us the proxy settings. We maintained them in SICF as per instructions, and things started working.
- We received a connection error again. Understanding the error made it clear that we needed to import SSL certificates from the “ushana” URL.
- Using Document Management as a Content Repository with SAP S/4 HANA
- OAC0 T-Code stopped working after implementing the Notes. As a result, we had to correctly implement the manual steps from one of the notes again.
- OAC0 started working but threw an error on the connection check related to the set authentication check.
- We initially implemented only the first four SAP Notes because we misread one and thought it didn’t apply to our version. We then re-implemented all the notes, carefully checking pre-requisite notes and manual steps required. After that, we found that SM59 was throwing a different error. Checking SM59, it started throwing a connection error. Strangely, we had imported all the needed certificates, and it was working. Nonetheless, we downloaded new certificates from the browser URLs (they had different validity dates) – both root and SSL certificates – and it started working again. Now OAC0 was also working fine. The following is for SAP BASIS version 7.54. Please choose the notes appropriate for your version.
SAP Note Prerequisite Note Prerequisite Note Manual activities Performed/Required Implementation status Comments 2361898 NA Yes Implemented 3003350 Cannot be Implemented Implement 3008650 and 3003412 3008650 NA NA Implemented 3003412 Yes Implemented 2876294 NA Implemented 3126655 NA 2361898 Yes Implemented Implemented earlier(1st Note) 3023475 NA Implemented Prerequisite 2361898 3084606 NA Implemented Prerequisites 2361898 and 3023475 3120902 Yes Implemented 3120902 Yes Implemented implement 3120024 3113055 NA Cannot be Implemented 3113055 NA Cannot be Implemented 3104738 NA Cannot be Implemented 3120024 Yes Implemented 3041322 NA Cannot be Implemented 3120902 Yes Implemented 2820414 NA Cannot be Implemented 2952190 Yes Implemented 3105486 Yes Implemented - SM59 connection test prompts for a user ID password, but SAP mentioned that it’s not required as long as the connection test is successful.
I have already shared the blog links in order. As I mentioned at the start this is just about the deviations about the configurations blogs that are out there and you can easily follow.