Skip to Content
Personal Insights
Author's profile photo Alex Dong

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, two questions coming into our mind are, what is SAP DMS?

Let’s forget SAP BTP DMS for a while and take a look at SAP S/4 HANA side. Here is another thing called Document Management System (also called DMS). It is not SAP’s invention, but SAP has its own DMS solution in E.g. SAP S/4 HANA system. It is a cross application component of SAP that provides robust document and e-asset management capabilities. SAP DMS is a major component of SAP PLM solution. It is mainly used to manage business Documents, which are very important for day to day business. Companies needs to access these documents and make it available for every authorized person. SAP DMS provides us to store all important documents need to accessible by every one in the organization. So it’s possible to upload some e.g. Office documents and attach it to a sales order or procument order.

KPRO22.jpg.png

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.

Architecture%20view

Architecture view

How to start with SAP BTP DMS?

This will probably include two main use cases from requirement perspetive.

  1. Connect SAP S/4 HANA repository and leverage SAP BTP DMS as a frontend layer
  2. 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.

I have premumed you have a SAP BTP account and SAP BTP DMS in your entitlements e.g. in your free tier account. I will give some screenshots and it should not be hard for this step.

Log on to your SAP BTP account and create SAP BTP DMS instance

Click the instance created in the last step. Create a service key.

Navigate to “Role Collections”. Click “+” on the top right corner and give a name e.g.”DMS_ADMIN” to new role collection.

Click the role collection created in the last step.

Click “Edit” and add corresponding roles.

Navigate to “Users” and select yourself or the user you want to grant access to DMS. Assign Role Collection “DMS_ADMIN” created in previous step.

Navigate to “Instances and Subscriptions”. Click SAP BTP DMS instance you created. Click “View Credentials”. Important: write down the ecmservice url, client id, client secret, uaa.url. You will need them when accessing SAP BTP DMS API as authorization.

Now you can access SAP BTP Document Management Service API, e.g. create repository, onboard repostory, etc..

You%20can%20test%20from%20Postman%20using%20the%20credentials

You can test from Postman using the credentials: client id, client secret and access token url

You can test from Postman e.g. creating a repository

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
  • Classification

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.

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.

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://xxx.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 xxx 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.

Summary

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.

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.

I will contribute to this topic continuously. It is just a start for the massive usage from our customers.

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo WEN-JR Wu
      WEN-JR Wu

      Hello Alex,

      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 ?

      BR

      Sean

      Author's profile photo Alex Dong
      Alex Dong
      Blog Post Author

      Hi Sean,

      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.

      Good luck.

      Best regards,

      Alex

      Author's profile photo Sean Wu
      Sean Wu

      Hi Alex,

       

      You are right.

      After trigger "Get New Access Token", it works fine.

       

      Thanks very much.

      BR

      Sean

      Author's profile photo Sean Wu
      Sean Wu

      Hi Alex,

       

      Solved.

      After trigger "Get New Access Token", it works fine.

      Now i can go ahead.

      Thank you very much.

       

      BR

      Sean

      Author's profile photo Mauricio Miao
      Mauricio Miao

      Hi Alex,

      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?

      Regards

      Mauricio

      Author's profile photo Alex Dong
      Alex Dong
      Blog Post Author

      Hi Mauricio,

      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&region=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.

      Best regards,

      Alex

       

       

      Author's profile photo Mauricio Miao
      Mauricio Miao

      Thanks Alex!