Skip to Content
Technical Articles

Using Document Management as a Content Repository with SAP S/4 HANA


The purpose of this blog is to describe the essential configuration steps required to manually set up the SAP S/4HANA attachment service working with Document Management as a content server within the system landscape that has been already installed.


The following scenario is applicable for SAP S/4 HANA on-premise 1809, 1909, and 2020 releases.



  1. You must read and execute the following SAP Notes:-
    1. SAP Note – 2361898
    2. SAP Note – 3003350
    3. SAP Note – 3003412
    4. SAP Note – 3008650
  2. Ensure CA certificate of the SAP Cloud Foundry server is uploaded to “SSL client <client> SAP Default”. This certificate has to be uploaded to the ABAP backend system using STRUST transaction.

Section 1. Repository Onboarding

In this section, you need to onboard the Document Management Repository.

The following steps must be executed to onboard a repository. You can ignore the steps if some of them have been already performed.

  1. You’ve created a subaccount and space. See Creating a Subaccount and Space.
  2. You’ve created a service instance and service key. See Creating a Service Instance.
  3. You’ve connected your own repository to Document Management, integration option instance.
    • To add your repository using a REST API, you must generate a JSON Web Token (JWT). Use the JWT as your authorization to make the onboarding REST API calls. See Generate a JSON Web Token.
    • Execute an onboarding repository API to onboard your repository into Document Management. See Add Your Repository Using the Onboarding API.
      • The displayName and externalId should start with ‘Z’ and it should be in upper case. This name would be used as a content repository name in the SAP S/4 HANA backend system. The externalId and isContentBridgeEnabled are mandatory during repository onboarding.


Section 2. Enabling User Propagation

User information from SAP S/4 HANA can be propagated to Document Management to persist the information in the document metadata. For e.g. if you would like to have the user information in the “createdBy” and “modifiedBy” metadata field of the document then you need to enable user propagation.

To enable, create an incident under the component BC-CP-CF-SDM-INT and you can use the following template:-

Hello Colleagues,

We are configuring Attachment Services and we would like to enable the flag ‘EnableReadExternalHeader’ for our service instance. Please find below the xsappname for our instance:

<copy xsappname from the service key you created in the above steps and also mention the region. For example,  xsappname and region ( EU-10, EU-20, AWS, etc.,)>

Your Name.


Section 3. SAP S/4HANA Backend Configuration

In this section, you learn the backend system configurations by following the steps.

  1. Create an OAuth Client Profile

    1. Start the object navigator (transaction SE80).
    2. Choose Development Object in the dropdown list.
    3. To create a development object in the SAP namespace, choose to Create OAuth 2.0 Client Profile in the context menu of the object name.
    4. Enter the object name in the Client Profile field.
    5. Choose the type of service provider as HANA_CLOUD_PLATFORM.
    6. Save your changes.
  2. Create an OAuth Client Configuration

    SAP Document Management uses OAuth Authentication. Hence, OAuth client configuration must be done in the SAP S/4HANA backend system.

    1. Go to transaction OA2C_CONFIG.
    2. Click ‘Create’.
    3. Choose OAuth Profile created in section 3.1.
    4. Enter the configuration name of your choice.
    5. Enter ‘Client Id’ from the service key created in section 1.
    6. Click ‘OK’.
    7. Enter ‘Client Secret’ from the service key created in section 1.2.
    8. Choose Selected Grant Type as Client Credentials.
    9. Enter Authentication Endpoint. It is the url’ parameter in the service key created in section 1.2 without ‘https’.
    10. Enter Token Endpoint. It is the ‘url’ parameter in the service key with ‘/oauth/token’ prefix without ‘https’.
    11. Click ‘Save’.
  3. Create an RFC destination to Document Management

    1. Go to the transaction, SM59, and create a Type G destination.
    2. Enter host:  “ecmservice”:”url” copied from service key created in section 1.2 without ‘https’.
    3. Enter path prefix as ‘/browser’.
    4. In the Port b field, enter the “HTTPS” port of the ABAP system.ABAP%20System
    5. Go to Logon & Security Tab.
    6. Select ‘Do not use a user’ in Logon Procedure.Logon%20Procedure
    7. In Security Options, choose SSL Active radio button and select the certificate from the dropdown.Security%20Options
    8. Save the RFC destination.
  4. Create Content Repository in OAC0

    1. Go to transaction OAC0.
    2. Click on ‘Create’.
    3. Give the content repository name the same as the value of ‘externalId’ parameter given during onboarding repository in Section 1.3 (#2).
    4. Enter Document Area.
    5. Select Storage Type as ‘CMIS Content Server’.
    6. Enter the RFC destination created in the previous Part.
    7. Select the ‘Is OAuth’ checkbox.
    8. Save the configuration
    9. Enter the OAuth Profile name.
    10. Save the configuration.
    11. Do the connection test and check if the connection test is successful in the repository.
  5. Create Secondary Types and Folders

    1. Execute Transaction SE38
    2. Enter Report Name ‘CMIS_REPOSITORY_SETUP’
    3. Execute report

      RFC_DEST = RFC destination of the repository created in SM59CMIS_REP = Content Repository Name created in OAC0
  6. Create Storage Category in OACT

    1. Go to transaction OACT.
    2. Click ‘New Entry‘.
    3. Enter a Category Name.
    4. Enter Document Area.
    5. Enter Content Repository Name created in the previous Part.
    6. Save Storage Category.
  7. Activate Storage Category

    1. Go to transaction SPRO.
    2. Click on SAP Reference IMG to display the IMG Activities.
    3. Go to Cross Application Components → Document Management → Additional Settings- Simplification → Attachment Service- Storage Repository Activation
    4. Choose to ‘Create New Entries’.
    5. Enter the Storage Category created in OACT in the previous part and mark it as active by selecting the checkbox.
    6. Save the configuration.

Congratulations. You have successfully completed the Attachment Service integration with Document Management.


I hope, you can benefit from the steps presented in this blog post. In case of questions or feedback, please feel free to comment on this blog.

















You must be Logged on to comment or reply to a post.
  • Hello Vikram,

    Thanks a lot for your blog, it's really clear. I follow the exact steps and everything seems OK. Now it's not clear for me, how can I test if documents are sent from my S/4HANA system to my Cloud repository ?

    Thanks for your help.

    Best regards,

  • Hi Vikram,

    while onboarding, I am getting below error. Could you please suggest.

    message": "Error in OnBoarding Repository: Error reading Admin Credentials from destination: Doc_service

    I am using Document Management repositiry available on my Neo Account.


    • Hello Yogendra,

      The above mentioned scenario would work only with a Cloud Foundry based "Document Management" solution, where you could use this storage instead of SAP Content Server.

      Please do not connect to the repository from your Neo account.

      Best Regards,



      • Hi Asma,

        Since repository from Neo Environment is also CMIS, I was wondering why this is not supported.

        Also, can we use any other open source storage which is CMIS, instead of SAP Content server?





  • Hi Vikram,

    First of all, great blog, very informative.

    Is there an option for other way around ? Would that be possible to use SCP DM Integration option and use S4HANA for repository ?

    I came up with this document, but honestly couldn't find any technical document explaining how.

    Best regards,


    • Hello Gokhan,

      Yes, this option is possible. You could use Document Management integration option and connect to S/4 HANA DMS repository.

      You could take a look at this help documentation.

      Best Regards,


      • Hello Asma,

        Thank you for sharing the details. The help documentation lacks some of the information like; how the destination should be created  (any specific property to add etc.) or what are the activities we need to carry out on ERP side. Is there any technical document that gives more details that you aware of ?

        Best Regards,