INTRODUCTION
In today’s digital landscape,efficient document management is crucial for businesses aiming to streamline operations and enhance productivity.The SAP Business Technology Platform (BTP) Document Management Service offers a robust solution for managing documents seamlessly within SAP Fiori applications.
In this blog series we will explore different scenarios and find suitable solutions to integrate DMS into SAP Fiori Applications. This will help consultants to
Blog # 1: Embed SAP BTP Attachment Reuse UI in a Custom Fiori App
Blog # 2: Embed SAP BTP Attachment Reuse UI in an SAP Fiori Elements application
Blog # 3: Using SAP BTP DMS in an SAP Business Process Automation and integrate to a Task UI application
Blog # 4: Using SAP BTP DMS API for Custom requirements
In the first part of the blog series, we’ll touch base on the features of SAP BTP DMS service, the Reusable UI component and its integration with a Fiori application.
Understanding SAP BTP Document Management Service
The SAP BTP Document Management Service provides organizations with a centralized repository for storing, managing, and retrieving documents. It’s based on the OASIS (Organization for the Advancement of Structured Information Standards) industry standard CMIS (Content Management Interoperability Services)
Key features include:
•Version Control: Manage document versions to ensure users access the most current information.
•Access Control: Set permissions to safeguard sensitive documents and ensure only authorized personnel can view or edit them.
•Integration Capabilities: Easily connect with various SAP and non-SAP applications, allowing for a holistic document management approach.
You can consume the SAP Document Management Service in different ways:
•SAP Document Management service, integration option lets you build document management capabilities for your business applications.
•SAP Document Management service, application option is a stand-alone, ready-to-use web application that provides document management capabilities for your enterprise content.
Key Benefits of Using Document Management Service in Fiori
Integrating the Document Management Service into Fiori applications can yield significant advantages:
•Enhanced User Experience: Fiori’s intuitive design combined with the Document Management Service allows users to access and manage documents effortlessly within their workflow.
•Increased Collaboration: Teams can share and collaborate on documents in real time, improving communication and decision-making processes.
•Streamlined Processes: Automating document-related tasks reduces manual effort, allowing employees to focus on higher-value activities.
Prerequisite
1.Set up a Dev Space in Business Application Studio
2.Add Entitlement for following services in your subavcount
a.SAP BTP Document Management Service, Integration Option – Standard (Instance)
b.SAP BTP Document Management Service, Application Option – Standard (Subscription)
3.Cloud Foundry
Setting Up Document Management Service
SAP BTP Document Management Service set up is covered in multiple blogs and SAP Help. Hence, we are not getting in details.
https://help.sap.com/docs/document-management-service/sap-document-management-service/initial-setup-for-document-management-service-integration-option
https://help.sap.com/docs/document-management-service/sap-document-management-service/consume-reuse-ui-for-document-management-service
For this blog series, we used “SAP BTP Document Management Services, Application option”.
1.Access Manage Repository app
2.Add a new Repository
3.Once the Repository is created use “View and Manage Repository Documents” app to add the folders we need for different scenarios in our series.
Note down the Repository ID and Folder ID (Object ID) for the “General” folder. This will be used in the current blog. If you are using DMS Application option, the Root ID and Folder ID can be retrieved form directly the url. It will be in format of
https://<sub-account-url>/cp.portal/site#user-display?sap-ui-app-id-hint=com.sap.ecm.sdm.user&/documents/v1/open/rep=<RepositoryID>&obj=<ObjectID>
You may also use DMS API to retrieve the details. Please check the link shared earlier.
Scenario # 1:
We start with a simple scenario. We need to provide user to be able to access “General/Scenario 1” folder in a custom Fiori App to manage the attachments.
Step 1:
Create a new custom Fiori Application “dmsreuseuicustomapp” using SAP Fiori Generator wizard in Business Application Studio.
Step 2:
Update Manifest file to use the Reuse UI.
Add the Component usage following under “sap.ui5” section.
“componentUsages”: {
“documentTable”: {
“name”: “com.sap.ecm.reuse.documentTable”,
“settings”: {
“destinationPath”: “/comsapecmreuse.comsapecmreusedocumentTable/api”, “repositoryId”: <RepositoryId>
“objectId”: <ObjectID>
}
}
},
After Component Usage, add the resource roots attributes
“resourceRoots”: {
“com.sap.ecm.reuse.documentTable”: “./../../comsapecmreuse.comsapecmreusedocumentTable/”,
“com.sap.ecm.reuse.admin”: “./../comsapecmreuse.comsapecmreuseadmin/”
}
The standard Reuse UI comes in 2 variants “documentTable” and “admin”. We are going to use “documentTable” variant for this blog series.
The Repository ID and Object ID can be bound to a property in model or can be assigned through controller also. We will look into these options in subsequent blogs.
Step 3:
Update View file to include the Reuse Component using sap.ui.core.ComponentContainer control.
<mvc:View controllerName=”com.sap.demo.dmsreuseuicustomapp.controller.View1″
xmlns:mvc=”sap.ui.core.mvc” xmlns:core=”sap.ui.core” displayBlock=”true”
xmlns=”sap.m”>
<Page id=”page” title=”{i18n>title}”>
<content>
<VBox id=”vbox1″>
<Title id=”title1″ text=”Scenario #1: Embedding Reuse UI in Custom App”></Title> <core:ComponentContainer id=”sdi-document” usage=”documentTable” async=”false” manifest=”true”/>
</VBox>
</content>
</Page>
</mvc:View>
Step 4:
Update xs-app.json file to include route for DMS Integration API.
{ “source”: “^/comsapecmreuse.comsapecmreusedocumentTable/api(.*)$”, “target”: “$1”, “authenticationType”: “xsuaa”, “service”:”com.sap.ecm.reuse”, “endpoint”: “ecmservice” }
Step 5:
Update MTA file to enable authentication and authorization using client credential between Fiori Application and DMS service.Add Document Management Service, Integration option as a module.
– name: test-dms parameters: service-key: name: sdm-key
Add destination configuration for DMS instance using the client credentials.
– Name: test-dms Authentication: OAuth2UserTokenExchange ServiceInstanceName: test-dms ServiceKeyName: sdm-key
Finally, add the DMS instance under resources section
– name: test-dms type: org.cloudfoundry.managed-service parameters: service: sdm service-name: test-dms service-plan: standard
Step 6:
Deploy your app in cloud Foundry environment. You may choose to use context menu in project or use terminal commands (mbt build & cf deploy)
Step 7:
Log-in to SAP BTP Cockpit and find the deployed application under „HTML Applications“ section.
Click on the application to launch it in a new tab.
The application has the Reuse UI embedded and the „General“ folder is launched as Root folder.
Step 8:
Create a new folder named „Scenario 1“ and upload a new file in the folder.
Go back to the SAP BTP DMS, Application option service and check the standard application to verify the files are uploaded.
Conclusion
We learned how to embed the standard SAP BTP DMS Reuse UI in a custom Fiori App using few simple steps.
In the next blog of the series we will try to embed the Reuse UI into Fiori Element apps.
INTRODUCTIONIn today’s digital landscape,efficient document management is crucial for businesses aiming to streamline operations and enhance productivity.The SAP Business Technology Platform (BTP) Document Management Service offers a robust solution for managing documents seamlessly within SAP Fiori applications.In this blog series we will explore different scenarios and find suitable solutions to integrate DMS into SAP Fiori Applications. This will help consultants toBlog # 1: Embed SAP BTP Attachment Reuse UI in a Custom Fiori AppBlog # 2: Embed SAP BTP Attachment Reuse UI in an SAP Fiori Elements applicationBlog # 3: Using SAP BTP DMS in an SAP Business Process Automation and integrate to a Task UI applicationBlog # 4: Using SAP BTP DMS API for Custom requirementsIn the first part of the blog series, we’ll touch base on the features of SAP BTP DMS service, the Reusable UI component and its integration with a Fiori application.Understanding SAP BTP Document Management ServiceThe SAP BTP Document Management Service provides organizations with a centralized repository for storing, managing, and retrieving documents. It’s based on the OASIS (Organization for the Advancement of Structured Information Standards) industry standard CMIS (Content Management Interoperability Services)Key features include:•Version Control: Manage document versions to ensure users access the most current information.•Access Control: Set permissions to safeguard sensitive documents and ensure only authorized personnel can view or edit them.•Integration Capabilities: Easily connect with various SAP and non-SAP applications, allowing for a holistic document management approach.You can consume the SAP Document Management Service in different ways:•SAP Document Management service, integration option lets you build document management capabilities for your business applications.•SAP Document Management service, application option is a stand-alone, ready-to-use web application that provides document management capabilities for your enterprise content.Key Benefits of Using Document Management Service in FioriIntegrating the Document Management Service into Fiori applications can yield significant advantages:•Enhanced User Experience: Fiori’s intuitive design combined with the Document Management Service allows users to access and manage documents effortlessly within their workflow.•Increased Collaboration: Teams can share and collaborate on documents in real time, improving communication and decision-making processes.•Streamlined Processes: Automating document-related tasks reduces manual effort, allowing employees to focus on higher-value activities.Prerequisite1.Set up a Dev Space in Business Application Studio2.Add Entitlement for following services in your subavcounta.SAP BTP Document Management Service, Integration Option – Standard (Instance)b.SAP BTP Document Management Service, Application Option – Standard (Subscription)3.Cloud FoundrySetting Up Document Management ServiceSAP BTP Document Management Service set up is covered in multiple blogs and SAP Help. Hence, we are not getting in details.https://help.sap.com/docs/document-management-service/sap-document-management-service/initial-setup-for-document-management-service-integration-option https://help.sap.com/docs/document-management-service/sap-document-management-service/consume-reuse-ui-for-document-management-service For this blog series, we used “SAP BTP Document Management Services, Application option”.1.Access Manage Repository app2.Add a new Repository3.Once the Repository is created use “View and Manage Repository Documents” app to add the folders we need for different scenarios in our series.Note down the Repository ID and Folder ID (Object ID) for the “General” folder. This will be used in the current blog. If you are using DMS Application option, the Root ID and Folder ID can be retrieved form directly the url. It will be in format of https://<sub-account-url>/cp.portal/site#user-display?sap-ui-app-id-hint=com.sap.ecm.sdm.user&/documents/v1/open/rep=<RepositoryID>&obj=<ObjectID>You may also use DMS API to retrieve the details. Please check the link shared earlier.Scenario # 1:We start with a simple scenario. We need to provide user to be able to access “General/Scenario 1” folder in a custom Fiori App to manage the attachments.Step 1:Create a new custom Fiori Application “dmsreuseuicustomapp” using SAP Fiori Generator wizard in Business Application Studio.Step 2:Update Manifest file to use the Reuse UI.Add the Component usage following under “sap.ui5” section. “componentUsages”: {
“documentTable”: {
“name”: “com.sap.ecm.reuse.documentTable”,
“settings”: {
“destinationPath”: “/comsapecmreuse.comsapecmreusedocumentTable/api”, “repositoryId”: <RepositoryId>
“objectId”: <ObjectID>
}
}
}, After Component Usage, add the resource roots attributes “resourceRoots”: {
“com.sap.ecm.reuse.documentTable”: “./../../comsapecmreuse.comsapecmreusedocumentTable/”,
“com.sap.ecm.reuse.admin”: “./../comsapecmreuse.comsapecmreuseadmin/”
} The standard Reuse UI comes in 2 variants “documentTable” and “admin”. We are going to use “documentTable” variant for this blog series.The Repository ID and Object ID can be bound to a property in model or can be assigned through controller also. We will look into these options in subsequent blogs.Step 3: Update View file to include the Reuse Component using sap.ui.core.ComponentContainer control. <mvc:View controllerName=”com.sap.demo.dmsreuseuicustomapp.controller.View1″
xmlns:mvc=”sap.ui.core.mvc” xmlns:core=”sap.ui.core” displayBlock=”true”
xmlns=”sap.m”>
<Page id=”page” title=”{i18n>title}”>
<content>
<VBox id=”vbox1″>
<Title id=”title1″ text=”Scenario #1: Embedding Reuse UI in Custom App”></Title> <core:ComponentContainer id=”sdi-document” usage=”documentTable” async=”false” manifest=”true”/>
</VBox>
</content>
</Page>
</mvc:View> Step 4: Update xs-app.json file to include route for DMS Integration API. { “source”: “^/comsapecmreuse.comsapecmreusedocumentTable/api(.*)$”, “target”: “$1”, “authenticationType”: “xsuaa”, “service”:”com.sap.ecm.reuse”, “endpoint”: “ecmservice” } Step 5:Update MTA file to enable authentication and authorization using client credential between Fiori Application and DMS service.Add Document Management Service, Integration option as a module. – name: test-dms parameters: service-key: name: sdm-key Add destination configuration for DMS instance using the client credentials. – Name: test-dms Authentication: OAuth2UserTokenExchange ServiceInstanceName: test-dms ServiceKeyName: sdm-key Finally, add the DMS instance under resources section – name: test-dms type: org.cloudfoundry.managed-service parameters: service: sdm service-name: test-dms service-plan: standard Step 6:Deploy your app in cloud Foundry environment. You may choose to use context menu in project or use terminal commands (mbt build & cf deploy) Step 7:Log-in to SAP BTP Cockpit and find the deployed application under „HTML Applications“ section.Click on the application to launch it in a new tab.The application has the Reuse UI embedded and the „General“ folder is launched as Root folder. Step 8:Create a new folder named „Scenario 1“ and upload a new file in the folder.Go back to the SAP BTP DMS, Application option service and check the standard application to verify the files are uploaded.ConclusionWe learned how to embed the standard SAP BTP DMS Reuse UI in a custom Fiori App using few simple steps.In the next blog of the series we will try to embed the Reuse UI into Fiori Element apps. Read More Technology Blogs by SAP articles
#SAP
#SAPTechnologyblog