Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert


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.


  1. For this scenario to be successfully implemented, SAP Document Management Service, Integration Option is recommended. There is no support for SAP Document Management Service, Application Option, at this time. SAP S/4 HANA will always be the front end, and we do not support the SAP Document Management Service, Application option for onboarding the repository or allowing you to view any files.
  2. The free tier subscription will not work for this scenario. If you wish to try it out, please opt for the standard plan.
  3. The following scenario is applicable for SAP S/4 HANA on-premise releases of 1809, 1909, and 2020 onwards.
  4. There could be some issues in your client applications due to changes in the certificate. Please refer to this blog post Changing the SAP BTP Cloud Foundry Environment Root Certificate Authority and SAP Note 3327214 - Root Certificate Replacement in the SAP BTP, Cloud Foundry Environment.



  1. You must read and execute the following SAP Notes:-
    1. SAP Note - 2361898
    2. SAP Note - 3035517
    3. SAP Note - 3003350
    4. SAP Note - 3003412
    5. SAP Note - 3008650
    6. SAP Note - 3126655
    7. SAP Note - 3168437
    8. SAP Note - 3334586

  2. You've downloaded the SSL certificate of SAP BTP. For more information about the steps, refer to this knowledge base article KBA-2853519.

  3. Ensure the Root 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 back-end system using STRUST transactions.

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 Service, Integration Option instance.
    1. 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.
    2. Execute an onboarding repository API to onboard your repository into Document Management Service. See Add Your Repository Using the Onboarding API.
    3. The displayName and externalId should start with ‘Z’ and it should be in upper case.
    4. This name and externalId would be used as a content repository name in the SAP S/4HANA backend system.
    5. You must pass the parameter isContentBridgeEnabled as true in your payload.
    6. The externalId and isContentBridgeEnabled are mandatory during repository onboarding.

Sample Payload


"repository": {

"displayName": "<OAC0 repository name>",

"externalId":"<OAC0 repository name>",


<You can add other parameters for onboarding the repository, like repositoryType, Description, etc.,>




Section 2. SAP S/4HANA Back-end Configuration

In this section, you learn the back-end 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 drop-down 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 "uaa": "url" parameter in the service key created in section 1.2 without ‘https’.

    10. Enter Token Endpoint. It is the "uaa": "url" parameter in the service key with ‘/oauth/token’ as a suffix without ‘https’.

    11. Enter the Proxy Host: and Proxy Port: if applicable.

    12. Click 'Save'.

  3. Create an RFC destination for 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.


    5. Enter the Proxy Host: and Proxy Service: if applicable.

    6. Go to Logon & Security Tab.

    7. Select ‘Do not use a user’ in Logon Procedure.VikramKulkarni_4-1706616988471.png
    8. In Security Options, choose SSL Active radio button and select the certificate from the dropdown.


    9. 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 the ‘externalId’ parameter given during the 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.

    12. Click the Send RFC info button and it should display “Certificate was sent”.

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