How to connect SAP Mobile Documents (HCP edition) to an ABAP System – Part I
In this blog I describe how I connected my trial instance of SAP Mobile Documents running on SAP HANA Cloud Platform (HCP) to an on-premise ABAP installation. The explanation is not meant to be a best practice implementation in terms of scalability or security!
There are different ways on how you can configure your connection to the backend:
Option one is to use a service user connection. That means that all requests done by the HCP application to the backend will be done with one and the same user.
The second option is to use the same user for the backend connection that is logged on in the HCP (SAP Mobile Documents). This means that the authorizations for this user apply in the backend.
In the first part I describe how to first set up a connection with a service user, so you know that the connection works in general.
This makes troubleshooting much easier.
In the second part, I describe how to change the service user connection to a named-user connection.
Part I: How to connect SAP Mobile Documents to an on-premise ABAP System using a service user connection
These are the ingredients of the cake:
My own Mobile Documents Trial Account (based on HCP)
Windows-based ABAP System (with enabled CMIS connectivity)
Some Windows-based system used to install the HANA Cloud Connector
Installation of SAP HANA Cloud Connector
First of all I started with the installation of the SAP HANA Cloud Connector on the Windows machine, on which the ABAP system is installed (but it should not make a difference if both are installed on two different boxes).
For the installation I used this tutorial by Timo Lakner and Markus Tolksdorf:
https://hcp.sap.com/developers/TutorialCatalog/con100_1_setting_up_cloud_connector.html
After I installed the Cloud Connector and connected it to the HCP instance (as described in the tutorial), this is how I added the connection to the ABAP system:
The CMIS connection from Mobile Documents to the ABAP System is done via RFC.
For my system I chose to connect without load balancing.
Enter the name of the server. I recommend to use the full qualified name. I just used the server name as everything is installed on one machine.
Just confirm the settings on this screen.
Now you have set up the connection to the host. In the next step you add a resource to allow the connection through the Cloud Connector.
The function modules that are used for the CMIS connection to ABAP use the prefix FM_CMIS:
Now you are done with the basic settings in the Cloud Connector.
Create a Destination in HCP Cockpit
Go to http://hcp.sap.com –> Launch HCP
Log on with your trial account user and password.
Go to Destinations and click New Destination
Create a Connection in Mobile Documents Admin UI
You need to create a connection in the Admin UI of SAP Mobile Documents.
Go to the Admin UI (in case you are using the Mobile Documents trial, it will look like https://mdocs-<your-trial-account-name>trial.hanatrial.ondemand.com/mcm/admin – replace the part <your-trial-account-name> with – guess what – your trial account name!)
In the Connections area, create a connection that has the same Destination value as the name of your HCP destination you have created in the previous step.
Create a Corporate Repository
In the Admin UI of SAP Mobile Documents, go to Repositories – Corporate Content
Click Create
Select the Connection you have created in the previous step
Select a repository (if you get an error, something went wrong in the previous configuration steps :)).
If you are able to select a repository – Congratulations!!!
You need to set the Document Classification.
Save your entry.
After this you can check out how this looks for the end user.
Log on to the Web UI
Exchange the “admin” part of the URL with “browser”
In the Corporate Section, you now see the connected ABAP system!
If you now want to configure the connection to use the named user, check out part 2!
Nice work!
Hi,
I'm currently trying to connect an S/4Hana on-Premise AS ABAP System with an SAP Document Center installed on my HCP trial account with this tutorial. The connection between the HCP and the On-Premise System via the SAP Hana Cloud Connector works fine but the creation of a Corporate Repository in the Document Center admin user interface doesn't work. When I select the configured Connection only nonsense is selectable in the Repository dropdown (see screenshot).

If I just enter some Repository like "DMS_MDOC" in the input field nothing happens when I press on save. My browser console outputs some error on POST https://mdocs-p1942045661trial.hanatrial.ondemand.com/mcm/admin/v1/repositories (404):
Does anybody know what the cause of this missbehavior could be?
Do I have to configure something special in the AS ABAP? I only checked that the function modules FM_CMIS* are available.
Best regards,
Christoph Lienhard
I've found the missing piece. I had to register the ABAP CMIS Implementation (CL_MDOC_CMIS_DMS_INT) via an entry in the CMISD_SERVICE table.
Afterwards the repository was selectable in the admin interface.
Hi Lienhard,
Can you please guide me how you have created the entry on ABAP side?what is the configuration?I am using S/4 HANA as backend on premise system and i have got the same issue,the repositories is not visible.
Regards,
Aamrin
Hi, after getting the DMS repository, would I be able to search for any document that have been previously created within SAP DMS?
Hi Jens,
Thank you for sharing.Set up of HCC and Document Center works fine. I tested RFC destination from HCP and its works fine. I get the following error when I select the connection as “ABAP”. Do you the cause of the issue ?
Error fetching repository data
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Function FM_CMIS_GET_REP_INFO not found!
So, I got an error and I can’t figure out how to fix it. When I try to add a repository I get:
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Cannot get function FM_CMIS_GET_REP_INFO: com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Initialization of repository destination destination failed: Opening connection to backend failed: No tunnels subscribed for tunnelId account:///s#########trial/account
I have already de- and re-connected the cloud connector, even tried one from a different system but never got past this error. All available connection tests (on the connector and destination) turn out fine.
Maybe someone can give a pointer in the right direction?
Got it.
I thought I needed to put the cloud connector ID into the "Location ID:" field of the destination.
Deleted that and now I am one step further. Next one: the CMIS configuration on the ABAP side.
Hi there,
Will this only work on Windows-based ABAP systems?
Regards,
Jesse Leal
Hi,
if i use your configuration, the backend handling is provided by CL_MDOC_CMIS_DMS_INT, right? But in this class, there is a global attribute named GV_CONTENT_DELIVERY_URI and set to 'X' by default. There is also no method to change this value. But in this case the Document Center deals only with url pointing to the content server. If so, it is not possible to upload, share, .. corporate documents, because the connecting from outside to the internally content server is not possible.
Only if i set the global variable GV_CONTENT_DELIVERY_URI to abap_false, i.e. ' ', upload, download, share, etc. works fine. Seems to be a bug?
Hi Stefan!
Did you solve this? I'm experiencing same issue
Yulia.