cancel
Showing results for 
Search instead for 
Did you mean: 

Custom UI using document management integration option

parab_neha
Explorer
0 Kudos
1,773

Hello,

In sap cloud platform, I am currently using SCP Document service to upload documents in fiori application. As this service is retiring soon, I have to use its successor document management integration option and document management repository option. I am able to integrate document management integration and repository option in my fiori application using Reuse UI by following link.

https://help.sap.com/viewer/f6e70dd4bffa4b65965b43feed4c9429/Cloud/en-US/2c99a03a2b7e42d5be44a7ef07c...

End result is

However, in my scenario instead of Reuse UI , I need create custom UI which will have fileuploader which uploads the documents to repository.

I am looking for way to send documents to repository on upload .(URL(API) to post documents)

Please guide how can I achieve this ?

Please let me know if any other inputs needed.

Regards,

Neha

AbhijeetK
Active Participant
0 Kudos

Hi Neha,

Hope you are able to use DMS now in CF.

In client side all FIORI apps are hosted using portal services of Neo(till the time they are using as there are huge applications and not able to migrate to CF) and for any new development they are using both CF and Neo.

I am able to develop the DMS app in CF but same app is required in Neo( Which is not possible so I just embeded the app in iFrame of portal in Neo) not sure if there is better solution available.

Now the requirement is to give DVR(Document visibility rule) per user on different types of document and folder. Role like display, edit based on user and document/folders.

I am not sure how to give access to particular user on different documents. I found blogs but not sure how to implement this functionality,

below are the blogs -- https://answers.sap.com/questions/13154989/cloud-platform-cloud-foundry-document-management-h.html?c...

https://blogs.sap.com/2021/04/08/consumption-of-reuse-ui-from-sap-document-management-service-in-sap...And how to create widget as per user scope.
Any suggestion or comment will really help me. Regards,
Abhijeet Kankani

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member210955
Active Participant

Hi Neha,

SDM exposes APIs as per CMIS specification[1].

Please check for details here [2].

Apache Chemistry provides CMIS client side libraries in most of the languages to communicate with CMIS APIs [3].

You can obviously form the HTTP requests yourselves and can also execute them as per CMIS specification.

For javascript there is a good library called CmisJS[4] which can be used.

I have created a sample script here [5] using CmisJS to connect to SDM.

Best Regards,

Saurav

[1] http://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html

[2] https://help.sap.com/viewer/f6e70dd4bffa4b65965b43feed4c9429/Cloud/en-US/f2e91dc24832408f9c419313309...

[3] https://chemistry.apache.org/java/opencmis.html

[4] https://github.com/agea/CmisJS

[5] https://gist.github.com/saurav28/3f8e073946d7f3482ce1258264ec717c

AbhijeetK
Active Participant
0 Kudos

Hi Saurav,

I have below doubt --

In client side all FIORI apps are hosted using portal services of Neo(till the time they are using as there are huge applications and not able to migrate to CF) and for any new development they are using both CF and Neo.

I am able to develop the DMS app in CF but same app is required in Neo( Which is not possible so I just embeded the app in iFrame of portal in Neo) not sure if there is better solution available.

Now the requirement is to give DVR(Document visibility rule) per user on different types of document and folder. Role like display, edit based on user and document/folders.

I am not sure how to give access to particular user on different documents. I found blogs but not sure how to implement this functionality,

below are the blogs -- https://answers.sap.com/questions/13154989/cloud-platform-cloud-foundry-document-management-h.html?c...

https://blogs.sap.com/2021/04/08/consumption-of-reuse-ui-from-sap-document-management-service-in-sap... And how to create widget as per user scope.
Any suggestion or comment will really help me. Regards,

Abhijeet Kankani
former_member210955
Active Participant
0 Kudos

Hi Abhijeet,

Authorisations on an object (folder, document) can be modified using the CMIS ACL concept.

You can manually do this in UI or can do through APIs also.

Please check here for UI

https://help.sap.com/viewer/f6e70dd4bffa4b65965b43feed4c9429/Cloud/en-US/01fb63bce6354c8d94ce27effae...

For API please check below

http://docs.oasis-open.org/cmis/CMIS/v1.1/errata01/os/CMIS-v1.1-errata01-os-complete.html#x1-3670001

For e.g. you can keep updating the ACLs using APIs as per your Document Visibility requirements.

Best Regards,

Saurav

AbhijeetK
Active Participant
0 Kudos

Hi Sourabh,

saurav.sarkar Thanks for the ACL solution and I can able to implement the same.

I have one more doubt regarding the object id and repository id which is there in manifest file.

These id will be different in QA and Prd and I just hardcoded them in manifest. is this is any way that we can make them dynamic ?

any suggestion would be helpful for me.

Regards,

Abhijeet Kankani

former_member210955
Active Participant
0 Kudos

You can perform /browser call to fetch the repo id and folder id.

and then perform dynamic setting of ids in the component.

Please check the blog here

https://blogs.sap.com/2021/04/08/consumption-of-reuse-ui-from-sap-document-management-service-in-sap...

Check this part in the blog.

Alternative to manifest.json the settings for Component Container can also be defined in the View Controller and then by implementing event handler “onComponentCreated” you can request navigation to repositories and folders during runtime. The below code provides a reference on how this can be achieved.

Best Regards,

Saurav