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.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacky_Liu
Product and Topic Expert
Product and Topic Expert
1,387
In the blog Create Automatic UI using Custom Secondary Types using Document Management Service by tapishnu.sengupta, the method of creating secondary type for Document Management Integration Option has been stated . One of our customers want to use this method to tags  folders by function like Sales, Finance, Purchase, etc  and then query the folders base on Secondary Type.  In this blog , I will demo the steps in this blog and hope it will help :

Prerequisite:


1, You have created service instance and service key for BTP Document Management Service integration Option(BTP SDM) in BTP cockpit subaccount .

2,You have installed postman and Apache Chemistry CMIS Workbench .

 

Step 1, Get service key information from BTP cockpit .



 



Step 2 get access token by using service key Oauth2 information in Postman





Step 3, connect to BTP SDM repositary  with Chemistry CMIS Work Bench .



 

Step 4 , Create  Secondary type with Json file .


Prepare json file
{ 

"id": "functiongroup",

"localName": "Function Group",

"localNamespace": null,

"displayName": "Function Group",

"queryName": "functiongroup",

"description": "Function Group",

"baseId": "cmis:secondary",

"parentId": "cmis:secondary",

"creatable": true,

"fileable": true,

"queryable": true,

"fulltextIndexed": false,

"includedInSupertypeQuery": true,

"controllablePolicy": false,

"controllableACL": false,

"typeMutability": {

"create": true,

"update": true,

"delete": true

},

"propertyDefinitions": {

"function": {

"id": "functiongroup",

"localName": "Function Group",

"displayName": "Function Group",

"queryName": "functiongroup",

"description": "Function Group",

"propertyType": "string",

"cardinality": "single",

"updatability": "readwrite",

"inherited": true,

"required": false,

"queryable": true,

"orderable": true,

"openChoice": true

}

}

}

create secondary type by using the json file


Created secondary type



Step 5, Assign secondary type for folder




 

Step 6, Maintain function group for folder




Step 7, query folders base on function group



The following is the query statement :

SELECT * FROM cmis:folder JOIN functiongroup on cmis:folder.cmis:objectId = functiongroup.cmis:objectId WHERE functiongroup.functiongroup = 'sales'

 

The Ends

 

Best Regards!

 

Jacky Liu

 

 

 

 
1 Comment