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 BTP Document Management Service (I will use SAP BTP DMS in short) topic, since more and more customers are showing interest. It is not an easy thing, if you know nothing about SAP BTP 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?

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

NOTE: some options in the above are one time configuration, e.g. if you want to encrypt the repository please specify the following field when creating the repository, otherwise you have to recreate a new one.

"isEncryptionEnabled": "true"

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 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.

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.

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.

Assigned Tags

      25 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 basis basis
      basis basis

      Hi Alex,

       

      You are right.

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

       

      Thanks very much.

      BR

      Sean

      Author's profile photo basis basis
      basis basis

      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!

      Author's profile photo Sivakumar Palaniswamy
      Sivakumar Palaniswamy

      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!

       

      Siva

      Author's profile photo Bharathan Narendran Nair
      Bharathan Narendran Nair

      Hi Alex,

      Do we have a conversion procedure of SAP Content server (Maxdb onprem)  to BTP .  Do you have any links on this topic?

       

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

      Hi Sorry I don't have now.

      Author's profile photo Harish Subramanian
      Harish Subramanian

      Hi Alex

      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

       

      thanks

       

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

      Hi Harish,

      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.

      Best regards,

      Alex

      Author's profile photo Marco Menozzi
      Marco Menozzi

      Hi Alex,
      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?

       

      Best regards,

      Marco

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

      Hi Marco,

      As far as I know it should be supported.

      But it should be at first a DMS repository following CMIS standard.

      Best regards,

      Alex

      Author's profile photo Keerthana Jayathran
      Keerthana Jayathran

      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...) .

      Regards,
      Keerthana

      Author's profile photo Jahir Diaz
      Jahir Diaz

      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.

      Fiori Standard

       

       

      APP GUI ME22N
      Create purchase order folder but do not host the files inside the repository


      Regards,
      Jahir Diaz P.

       

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

      Hi Jahir,

      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...

      Regards,

      Alex

      Author's profile photo Jahir Diaz
      Jahir Diaz

      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.

       

      Regards,
      Jahir.

      Author's profile photo Darryl Griffiths
      Darryl Griffiths

      Hi Alex,

      Is that internal repo encrypted?

       

      Thanks

      Darryl

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

      hi Darry,

      When creating, there is an option you can specify whether or not encrypted and which algorithm you want to choose. Please check https://help.sap.com/docs/document-management-service/sap-document-management-service/connecting-to-document-management-service-repository-option-using-api?q=hashAlgorithms for more details. E.g.

      POST https://<"endpoints" : "ecmservice" : "url">/rest/v2/repositories
      
      {
        "repository": {
      		"displayName": "Name of the repository",
      		"description": "Description for the repository",
      		"repositoryType": "internal",
      		"isVersionEnabled":"true",
      		"isVirusScanEnabled":"true",
      		"skipVirusScanForLargeFile": "false",
      		"hashAlgorithms":"SHA-256"
        }
      }
      
      Author's profile photo Darryl Griffiths
      Darryl Griffiths

      Thanks ALex.  That's what I thought.

      By default it is not encrypted.

      I would recommend adding a comment in the blog post just before the onboarding of the repo, just incase someone wants encryption.  Otherwise they will need to delete and re-create the whole DMS service, or create and onboard a separate repo using the DMS Repository Option.

      "Enabling encryption is a one-time operation and you can't toggle between true or false for the parameter isEncryptionEnabled."

      You're missing the all important "isEncryptionEnabled" parameter in the above.
      It should be:

      	{
      	  "repository": {
      	    "displayName": "Name of the repository",
      	    "description": "Description for the repository",
      	    "repositoryType": "internal",
      	    "isVersionEnabled": "true",
      	    "isVirusScanEnabled": "true",
      	    "skipVirusScanForLargeFile": "false",
      	    "isThumbnailEnabled": "false",
      	    "hashAlgorithms": "SHA-256",
      	    "isEncryptionEnabled": "true"
      	  }
      	}

      Based on:  https://help.sap.com/docs/document-management-service/sap-document-management-service/enable-customer-managed-key-cmk

      Not sure what that "isThumbnailEnabled" param is, must be new, do you know?  Docs don't say.

       

      Darryl

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

      Cool. Thanks Darry!

      I searched inside the help document and should be for the thumnail image purpose

      Enable Thumbnail

      Optional

      Displays thumbnail images for files (PDFs, images, and text files) you've uploaded.

       

      Author's profile photo Alessio Scaglione
      Alessio Scaglione

      Hi Alex,

      I have a problem with my dms application bound with Integration Option.

      I created a DMS repository and some files inside of it, but when i try to open a docx file, the preview

      doesn't start and in debug console, in the network section, i have these errors :

       

      Do you have any idea how to resolve this problem?

      Best Regards,

      Alessio.

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

      Hi Alessio,

      Thanks reaching out to me.

      I suggest you create ticket under BC-CP-CF-SDM.

      Best regards,

      Alex

      Author's profile photo Jason Thomas
      Jason Thomas

      Followed all of the steps for configuring the consume re-use application using a standalone MTA approuter, and everything is working as expected. Thank you for the instructions for that. My question would be if you could provide details for two aspects of using the SAPUI5 application with DMS:

      1. Is it possible to set up the access to the application for users without an SAP Universal ID? Currently only users with an ID can access the application with the roles assigned to them in the BTP subaccount for DMS.If it is possible, could you provide instructions on how to set that up?
      2. If multiple repositories are onboarded, can you provide details on how to set up the application properties to allow for navigation to different repositories in the UI?