Skip to Content
Technical Articles

Connect SAP Document Management, Application Option to DMS

In this blog post, I will describe the steps required to connect SAP Document Management, Application Option running on cloud foundry to on-premise DMS repository.

Before proceeding, if you do not already have DMS setup, follow the steps mentioned in this blog post by Jens Koster to configure DMS.

PART I : Setting up Cloud Connector

For information on installing cloud connector, see this documentation .

Once your cloud connector is up and running, follow the below steps.

Step 1: Connect Cloud Connector with cloud foundry subaccount

  1. Go to your cloud foundry subaccount and click on the “information” icon on subaccount tile. Copy the subaccount id.
  2. Now, use this subaccount id in cloud connector subaccount configuration. Go to cloud connector administration UI and click on “Add Subaccount”.
  3. Enter Region Host. CF regions host are the cf.<region>.hana.ondemand.com ones. Example: cf.eu10.hana.ondemand.com for Europe (Frankfurt) – AWS.
  4. Enter your Cloud Platform Email Id and password and save the configuration. Optionally, enter location id..

Step 2: Connect Cloud Connector with ABAP system

  1. Go To Cloud To On-Premise in cloud connector UI under your subaccount and click on plus ( + ) sign.
  2. Choose ABAP System as backend type and click on Next.
  3. Choose HTTPS as protocol and click on Next.
  4. Enter the internal Host and Port of your ABAP system. To find out the internal host and port of your ABAP system, Go To transaction SMICM in backend ABAP system -> Click on services -> Copy the Host and Port for HTTPS protocol.
  5. Enter the virtual host and port. Click on Next.NOTE: For SAP Document Management, the internal host and virtual host should be same in order for the integration to work.
  6. Choose Principal Type as None. Click on Next.
  7. Choose Virtual host in request. Click on Next.
  8. Click on Finish

Step 3: Allow access to ABAP resources

  1. In the Access Control tab of Cloud Connector, under the Resources section, click on plus (+) sign.
  2. Provide the URL path /sap/bc/mcm/json.
  3. Select Access Policy as path and all sub paths.
  4. Click on Save.

 

PART II : Connecting Repository to Associated ABAP class

  1. Go to backend ABAP system.
  2. Use transaction SM30.
  3. Enter CMISD_SERVICE in the Table/View.
  4. Choose Maintain.
  5. Choose New Entries.
  6. Edit the fields as described in the following table:
    REPOSITORY_ID CLASS_NAME

     

    Enter a name for the repository

     

    Enter CL_CV_DC_SERVER_FACTORY

  7. Save your changes.

 

PART III : Setting up Destination

  1. Go to your Cloud Foundry subaccount -> Destinations.
  2. Click on New Destination.
  3. Provide a destination name.
  4. In URL, Enter http://<host>:<port>/sap/bc/mcm/json/<repositoryId> . Here host and port are the same as configured in cloud connector in previous steps. The repositoryId is the name configured in PART II.
  5. Select Proxy Type as OnPremise.
  6. Select Authentication as BasicAuthentication and Enter your ABAP system user and password.
  7. Click on Save.

 

Your DMS repository is now ready to be consumed in SAP Document Management.

 

PART IV : Onboarding DMS repository via SAP Document Management, Application Option

Pre-requisite : Follow the steps mentioned in this documentation to do initial configuration of SAP Document Management, Application Option.

Steps to onboard DMS repository:

  1. Go to Admin url, https://<your-document_management-endpoint>/admin.html
  2. Click on Plus sign(+) to add repository.
  3. Provide any Display Name.
  4. Provide repository Id used in PART II, Step 5.
  5. Provide the name of destination created in PART III.
  6. Click on Add. After successful onboard, you should see a message ‘Repository Added’.

 

Now, you can access your repository at https://<your-document_management-endpoint>/web.html

 

Basic Troubleshooting:

  • Getting Access denied error while accessing application at endpoint, /web.htmlResolution : Check your Role Collection that you created in PART III during the initial configuration of Application Option. Make sure you have the following roles added to your role collection:SDM_AdminSDMWeb_AdminSDM_User

    SDMWeb_User

    Token_Exchange

  • Getting 403 Forbidden error while accessing repositoryResolution: After you have onboarded the repository, if trying to access the repository by clicking on the repository tile gives you 403 forbidden error, this means that the cloud connector host is not configured properly.Check the ABAP system host for HTTPS protocol as described in PART I, Step 2 ( 4 ) from SMICM transaction.Now check the host configured in your Cloud Connector. Both hosts should be same.
11 Comments
You must be Logged on to comment or reply to a post.
  • Thank you Rupali for the such detailed document!

    Are there any system requirements for the back-end? I found out that on our system CL_CV_DC_SERVER_FACTORY does not exist. That’s why probably the final step was not successful.

    Thank you!

    Yulia.

    •  

      Hi Yulia,

      This class is present in S/4HANA on-premise 1809 release onwards( SAP_BASIS 753 release onwards ). What is the release of your system? You can also try with class CL_MDOC_CMIS_DMS_INT which is an older implementation but there are some features of SAP Document Management which won’t work with this implementation.

      Thanks,

      Rupali

      • Thank you, Rupali!

        SAP_BASIS 752 and S/4HANA on-premise 1709.

        I tried to use CL_MDOC_CMIS_DMS_INT but getting a message “Failed to add a repository”. Does it matter if it’s a trial account, not a real one? Cloud connector looks good, but I cant check the destination, getting a message “Could not check at the moment. Please try again later”

        I was able to connect a real (not trial) account Document center (not Document management) to the same system using CL_MDOC_CMIS_DMS_INT. But can’t make it work with the trial one. So I believe the problem is on the cloud side.

        Thank you!

        Yulia.

         

        • Hi Yulia,

          It looks your system doesn’t have SCMIS_HTTP package and /sap/bc/mcm/json SICF service.

          Currently this package is present in S/4HANA on-premis 1709 SP06 onwards. Please check your SP release. If you are on lower SP, consider upgrading the SP.

          If the package is present and it’s only SICF service that is missing, you can create it manually in transaction SICF by following below steps:

          STEP 1: Go to transaction SICF. SICf Services window will open.

          STEP 2: In Service Name, enter ‘SAP’ and click on ‘Execute’ button at the bottom right corner of the screen.

          STEP 3: Select ‘bc’ node under default_host/sap

          STEP 4: Right click on bc node and select ‘New Subelement’. Enter ‘mcm’ in the ‘Name of New Service Element’ text box. Click on Input button at the bottom right corner of window.

          STEP 5: Enter some description for the service and click on ‘Store’ button at the bottom of the screen. Save it as a local object. Now an ‘mcm’ node would have been created under default_host/sap.

          STEP 6: Right click on mcm node and select ‘New Subelement’. Give the name of new service element as ‘json’ and click on ‘Input’ button.

          STEP 7: Go to ‘Handler List’ tab and enter class ‘CL_CMIS_REST’ in the Handler List.

          STEP 8(Optional) : Optionally, you can enter Client Id in Logon Data tab to override the default client. If Client Id is specified, the requests will go to that particular client.

          STEP 9: Click on Store button.
          STEP 10: Now Right click on the json node and select ‘Activate Service’.

           

          Thanks,

          Rupali

  • Hi Rupali,

    Thanks a lot for your detailed document!

    I faced the “Failed to add a repository” issue too, in my case I followed your instructions exactly. I’m using CF trial and my on-premise system is S4HANA 2020.

    I can see the dms service details in browser via URL

    https://<host&gt;:<port>/sap/bc/mcm/json/<my_dms_id>, and in my cloud connector monitor page I can see resource request on /sap/bc/mcm/json/<my_dms_id>, which means the cloud connector works fine.

    Any idea what is wrong?

    Thanks a lot!

    Chunyang

    • Update:

      network response shows “unauthorized”. The request reached Clould Connector but not trigger the breakpoint I set in class CL_CV_DC_SERVER_FACTORY.

      • Hi Chunyang,

        Are you getting 401 unauthorized or 403 forbidden error? unauthorized would mean that the credentials configured in destinations in cloud foundry are not valid.

        Forbidden error could be because of missing Role, SDM_Admin or incorrect cloud connector configuration. Check the role first.

        If that is correct, try putting breakpoint in class cl_cmi_rest_get~handle_request() and onboard repository. If the request doesn’t come here, that means there is some problem in cloud connector configuration and the request is not even reaching backend system.

        In cloud connector, please make sure that the virtual host and internal host are same. Also, once cross check the host name with https host name in transaction smicm->services. The same host name should be configured in cloud connector.

        Thanks,

        Rupali

        • Hi Rupali,

          Thanks for your reply!

          SDM_Admin-> OK. / Cloud connector -> host name ok.

           

          It is strange that I’m getting a 500 server error, however the message is Unauthorized.

          Today I did a SMICM trace in my on-premise system and  find out that on-premise gives a 401 unauthorized error to my request.  Not sure why in Document management application the response is 500 instead of 401. But at least the request reached On-premise but rejected.

          I’m not an expert in reading the SMICM trace but the following looks like the root cause?

          [Thr 139914449528576] HttpCertIsReverseProxyTrustworthy: client did not sent any cert ->intermediate not trustworthy

          However, I have already uploaded global root CA to my destination. Will keep investigating, if you have any idea please let me know thanks a lot!!

          Chunyang

          • My issue is resolved after adding client ID to the mcm->json->logon tab. As described by Rupali in her reply to Yulia Sidorova:

            STEP 8(Optional) : Optionally, you can enter Client Id in Logon Data tab to override the default client. If Client Id is specified, the requests will go to that particular client.