Skip to Content

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:

/wp-content/uploads/2015/12/pic_839893.png

/wp-content/uploads/2015/12/pic_839893.png

The CMIS connection from Mobile Documents to the ABAP System is done via RFC.

/wp-content/uploads/2015/12/pic_839893.png

For my system I chose to connect without load balancing.

/wp-content/uploads/2015/12/pic_839893.png

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.

/wp-content/uploads/2015/12/pic_839893.png

Just confirm the settings on this screen.

/wp-content/uploads/2015/12/pic_839893.png

/wp-content/uploads/2015/12/pic_839893.png

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.

/wp-content/uploads/2015/12/pic_839893.png

The function modules that are used for the CMIS connection to ABAP use the prefix FM_CMIS:

/wp-content/uploads/2015/12/pic_839893.png

Now you are done with the basic settings in the Cloud Connector.

/wp-content/uploads/2015/12/pic_839893.png

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

/wp-content/uploads/2015/12/pic_839893.png

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.

/wp-content/uploads/2015/12/pic_839893.png

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.

/wp-content/uploads/2015/12/pic_839893.png

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!

/wp-content/uploads/2015/12/pic_839893.png

If you now want to configure the connection to use the named user, check out part 2!

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Christoph Lienhard

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

    {
      "exception" : "CmisObjectNotFoundException",
      "message" : "Exception: CmisObjectNotFoundException Error ID: d9e97c8c-5ad8-4742-8743-a3310b0b0222",
      "id" : "d9e97c8c-5ad8-4742-8743-a3310b0b0222"
    }

    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

    (0) 
    1. 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.

      (0) 
  2. A. Badam

    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!

    (0) 
  3. Jurjen Heeck

    Select a repository (if you get an error, something went wrong in the previous configuration steps :)).

    So, I got an error and I can’t figure out how to fix it. When I try to add a repository I get:

    Error fetching repository data
    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?

    (0) 
    1. Jurjen Heeck

      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.

      (0) 

Leave a Reply