SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Add Scopes and Create Role Collection Mapping

Add scopes for filtering apps and create role collection mapping with SAP Cloud Platform ABAP environment.

Overview

🎓 intermediate 45 min. SAP BTP ABAP EnvironmentIntermediateABAP DevelopmentSAP Business Technology Platform

You will learn

  • How to add scopes for filtering apps
  • How to create roles and role collections
  • How to create role collection mappings
  • How to assign users to role collections
Merve Temel M Merve Temel March 21, 2023
Created by March 9, 2023
Contributors

Prerequisites

Prerequisites

  • Create a developer user in a SAP Cloud Platform ABAP Environment system.
  • Download Eclipse Photon or Oxygen and install ABAP Development Tools (ADT). See https://tools.hana.ondemand.com/#abap.

Steps

Step 1 Add Scope for filtering apps

  1. Open SAP Web IDE and your project ROOM_MTA_XXX and add scope to xs-security.json.

    JSON
         {  
    
             "name": "$XSAPPNAME.Room-maintain",
             "description": "View data"
    
         }          
  2. Add role template to xs-security.json

```JSON
      {
            "name": "RoomTemplate",
            "description": "Role for viewing data",
            "scope-references": ["$XSAPPNAME.Room-maintain"]
      }   
```
  1. Add required scope to webapp/manifest.json.
```JSON
      {
          "sap.platform.cf":
                            {		
                              "oAuthScopes": ["$XSAPPNAME.Room-maintain"]
                            }
      }   
```
Step 2 Deploy UI to Cloud Foundry
+
Step 3 Create role & role collection
+
Step 4 Create role collection mapping
+
Step 5 Assign user to role collection
+
Step 6 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Add Scope for filtering apps 2. Deploy UI to Cloud Foundry 3. Create role & role collection 4. Create role collection mapping 5. Assign user to role collection 6. Test yourself

Learn more →