Start with SAP BTP Document Management Service (DMS)
Recently as a customer success engagement role, I had to dive into SAP Document Management Service (I will use SAP DMS in short) topic, since more and more customers are showing interest. It is not an easy thing, if you know nothing about SAP DMS before. So here I want to take advantage of SAP blog posts, to summarize some resources and links, together with some my own experience, so that perhaps you can gain some “getting started” knowledge.
First of all, what is SAP BTP DMS?
SAP DMS enables the capture and management of :
- Electronic documents,
- CAD models and drawings,
- Microsoft Office files,
- Scanned images,
- Multi-media files,
- Any other electronic files that should be stored and controlled in a secure environment.
SAP DMS provides:
- Version and revision control,
- Integrated workflow capabilities,
- Full text retrieval and search functionality,
- Linkage with SAP business objects such as Bill of Materials, material masters (parts), process plans, engineering change masters, and production orders.
There is also an easier SAP solution called SAP Generic Object Service (SAP GOS) besides DMS. I won’t go deep here as I want to focus on BTP side. You can refer to this blog post for more details.
OK, now let’s go back to SAP BTP DMS. This is a cloud service provided on SAP BTP. You can connect SAP BTP DMS to SAP S/4 HANA, either serving as a fronend UI layer, or serving as the content server as the backend layer.
Then, why BTP Document Managment Service (DMS)?
The short answer is: to get a cheaper place to store documents.
While SAP DMS or SAP GOS provided benefits and nice functionalities described in the previous paragraph, you have to consider one thing, where to store so many attachments? You can of course put these to SAP S/4 HANA database directly as default solution but when the volume of your documents gets higher and higher, it will definitely influence the performance of your SAP system. You can refer to this article and get clear mindset in such “expensive” cost.
Then you can refer to some other places as the content server and SAP BTP DMS is a cloud option for this. You can check this page for the price of storages and API calls. Thus, when you upload the documents from SAP system you can now select SAP BTP DMS as content server and decouple the storage from your SAP system, once you have set up it in your BTP account and conected to your SAP system e.g. SAP S/4 HANA.
The Document Management Service helps you in the management of your business’s documents. It’s based on the OASIS (Organization for the Advancement of Structured Information Standards) industry standard CMIS (Content Management Interoperability Services) and includes features like versioning, hierarchies, access control, and document management.
For your business apps, SAP Document Management Service provides API and UI-based document management capabilities. SAP Document Management Service is available in 2 different options, including Document Management Service, Application Option, which is the SaaS offering (easier to use with a frontend UI application provided), and Document Management Service, Integration Option, which is the PaaS offering (you can utilize all kinds of SAP BTP DMS API provided). All these two options require Document Management Service, Repository Option to stand as the storage provider.
How to start with SAP BTP DMS?
This will probably include two main use cases from requirement perspetive.
- Connect SAP S/4 HANA repository and leverage SAP BTP DMS as a frontend layer
- Connect SAP S/4 HANA and leverage SAP BTP DMS as a content server
But the first step is to set up your SAP BTP account and subscribe SAP BTP DMS there.
Now you can access SAP BTP Document Management Service API, e.g. create repository, onboard repostory, etc..
Now since the SAP BTP DMS instance is already established let’s move forward. How to have a SAP Fiori UI connecting to the repository just created?
There is already a nice blog post talking about this. I will not repeat the steps. From within this blog post, you can also notice the same steps utilized for the set up of SAP BTP DMS instance.
If everything goes well (I hope so as it usually has lots of disruptions and struggling points due to my experience), you will get a SAP Fiori application showing the content of your repository. You can manage the documents there directly e.g. checkin, checout, upload etc.
Update: here maybe you want to quickly check the status of your repository in a friendly UI application without Fiori. Then I recommend you can leverage open source application DMS Workbench. You can check more details from my blog post here.
Then what comes next should be, how can I onboard a repostiory within SAP S/4 HANA to SAP BTP DMS so that I can manage documents in my SAP Fiori side just created?
From SAP BTP Document Management Service, it’s possible to onboard SAP S/4HANA DMS as an external repository and browse its contents. The following capabilities are enabled from SAP document management service with SAP S/4HANA DMS repositories:
Document management features including the ability to create, edit, and delete documents or folders.
- Creating Links
- Basic search and metadata search
- Rendition viewer
- Status management
Also there is a nice blog post talking about the process. Just follow the steps.
I want to add some more notice here and maybe during the process you will need them.
- If your system doesn’t have SCMIS_HTTP package and /sap/bc/mcm/json SICF service. Please refer to SAP Note 2856741 and implement it (including the manual activities).
- You can also check the root folder URL https://<api end point>/browser/<repositoryID>/root. If you receive a “runtime” error response please refer to https://launchpad.support.sap.com/#/notes/3053488 and https://launchpad.support.sap.com/#/notes/3083315 for more details.
- In the blog post the SAP Document Management service, application option is used. However, it is totally OK to use SAP Document Management service, integration option because the difference is only UI VS API and Application Option contains capabilites of Integration Option.
Provide the same destination within the request body. Here “destinationName” is the same one you used for the specified respository within SAP ABAP system. “repositoryId” is the same repostoriy id you created in the previous section. “repositoryType” is “external”. Give “displayName” and “description” as you wish. But please remember, you need to set different destinations for each repository you want to onboard.
- Remember to check “use all logon procedures”
The last but not least, how can I leverage SAP BTP DMS as the external content server?
This actually is perhaps the most valuable outcome from SAP BTP DMS from a real world use case perspective, as SAP Document Management service, integration option can be used as a content server from SAP S/4HANA attachment service.
Again, fortunately expert has already created a very nice blog post talking about the steps .
Via the steps I can successfully upload the attachment to the SAP BTP DMS repository. You can check the result via the SAP Fiori application created in the privious section. Here I want to add some notes in case you need them.
- Please read this note https://launchpad.support.sap.com/#/notes/2853519 if you never did this before. And please be sure you are visiting the right cockpit address. For example, if you your api is like https://…cfapps.eu10.hana.ondemand.com then you need to access the cockpit https://cockpit.eu10.hana.ondemand.com/cockpit instead of https://cockpit.ap11.hana.ondemand.com/cockpit or other data location.
- If you use SAP GOS, you need to switch SAP BTP DMS storage category within “skpr08” tcode.
- Issue: Sm59 returns error message “failed: NIECONN_REFUSED(-10)” when test connection. Solution: check and fill proxy setting in your SAP S/4 HANA side and activite it under “Global Settings”
- Issue: “Content repository ABC doesn’t exist” error when test connection under “OAC0”. Solution: Check SMICM logs if there is certificate issue (put it in right folder under STrust T-Code) and activiate “sec” service under SICF.
- Issue: when executing se38 report, you found out the following error. Solution: make sure the destination name in sm59 is upper case e.g. BTP_DMS_DEST instead of btp_dms_dest.
SAP BTP DMS is relatively a new service within SAP BTP and the product team is also marching forward. You can check more details in the roadmap. E.g. network performance improvement is definitely a nice feature in future and archiving feature is still missing. Usually people talk about some high level concepts and want to bring lots of benefits to customers. But what customers really want to know in my understanding are, 1. whether the product can satisfy my need 2. how to implement it? Is it easy or not? So specially thanks to the blog post authors mentioned within this blog post and the help of BTP DMS product team. Without all these help it is definitely not an easy thing to use it in real world.
I was also asked by customer: how much effort and how long will take to implement BTP DMS solution? Well that depends, especially on how complex you want to utilize BTP DMS or how specialized of your developer. I was a developer before but I am not an expert into S/4 HANA (I may know some T codes at least :D) . Going through all the process mentioned in this blog post took me 3 weeks (not full time as I had other responsiblities…). So if you have a full time team implementing this, it is surely less than 3 weeks.
You can find more information using respective community tag e.g. if you want to find more details regarding SAP BTP please refer to https://answers.sap.com/tags/8077228b-f0b1-4176-ad1b-61a78d61a847 and also SAP BTP DMS https://answers.sap.com/tags/73555000100800002121. BTW, to learn more about SAP BTP, see the learning journey Discover SAP Business Technology Platform, a great introduction to BTP and the Intelligent Enterprise strategy to see what it’s all about for free. Discover BTP, LCNC plus much more free learning at SAP Learning site. I like this new fashionable web site as I will now and then check something new and integrated content.
I will contribute to this topic continuously. It is just a start for the massive usage from our customers.
We are implement the BTP DMS now.
I follow your steps to create BTP DMS instance, role, service key smoothly.
But there was an message "Unauthorized" when testing the API by postman.
Could you know the reason or how to check this error ?
Usually due to my experience, most probably you need to check the client credentials (but I suppose you have already tried many times).
Also please make sure the access token url has suffix with "/oauth/token?grant_type=client_credentials".
Again please make sure trigger "Get New Access Token" first, then use the token got from this step. Otherwise you will always have a 401.
You are right.
After trigger "Get New Access Token", it works fine.
Thanks very much.
After trigger "Get New Access Token", it works fine.
Now i can go ahead.
Thank you very much.
Thanks for sharing!
I can not find the Document Management service in my trial BTP Account neither in my company BTP Account, do you have any idea why?
It is not available on Trial account but yes on Free Tier account, as you can see from here https://discovery-center.cloud.sap/serviceCatalog/document-management-service-integration-option?tab=service_plan®ion=all. (No "Trial" tab)
It will be nice using free tier (I cannot as I am in China, sad :() as it's more powerful.
You can follow this https://developers.sap.com/tutorials/btp-free-tier-account.html.
Hi Alex & Friends,
I followed this https://developers.sap.com/tutorials/btp-free-tier-account.html and able to create Free Tier account providing my credit card details. I could create subaccount and space but not seeing Document Management Service in the service market place.
Please advise if this service is still available as Free Tier account . Appreciate your help!
Do we have a conversion procedure of SAP Content server (Maxdb onprem) to BTP . Do you have any links on this topic?
Hi Sorry I don't have now.
I see in your article about using s4 Hana as the content repository and BTP dms as the front end. What about other sap products as content repositories.. we want to see if we can use sap enable now which houses our training sops and we want to serve those documents in fiori apps in BTP. Is that doable or as of now it’s only s4 as a content repository
As far as I know it is possible as long as the content repository follows CMIS standard like MS sharepoint.
You can try to establish destination in BTP with SAP Enable Now's content repository and afterwards connect it to Application Option of DMS.
But I never did this before, suggest you create ticket to DMS product team for more details BC-CP-CF-SDM-APP.
If you have answer you can tell me here :D.
thanks your blog is very useful
In your blog you do not use the application option but only the "integration option" with the reuse UI.
Can I use "application option" to manage a repository which is an external repository for s / 4HANA?
We tried to connect "application option" to a repository used by S / 4hana but we get an error.
Is it a SAP supported scenario?
As far as I know it should be supported.
But it should be at first a DMS repository following CMIS standard.
Hi Alex Dong ,
I am new to SAP BTP DMS ,Is it possible to use Amazon S3 as the repository and store data in it.Or is the service similar to the S3 or an extension of the S3.
Will the repository changes on change in the deployed platform(like AWS,Azure,GCP...) .
Hi Alex Dong
I performed all the configuration steps to be able to use the BTP BMS as a repository in S4Hana, the Fiori Standard applications work correctly but when loading documents in the GUI apps it only creates the folder but not the file.
APP GUI ME22N
Create purchase order folder but do not host the files inside the repository
Jahir Diaz P.
I don't quite catch your issue. In my understanding, you are manipulating the attachments using S/4 HANA DMS module right? I am not the expert into S/4 HANA DMS module, but I believe there should be some mapping...
Hi Alex Dong
Thank you for the information. I will continue my search for this mapping. Much appreciated for all the information posted on this blog.