Skip to end of metadata
Go to start of metadata


This functionality is only available in SAP UI Extensions 6.0 SP04 (NW SAP_UI 7.54 SP04) and subsequent releases.


This functionality is designed to give applications the opportunity to change the SAP Visual Business Map Stacks (AKA Maps) that are available to end users of an application by providing an optional 'Context' value. 
Normally, an application is configured with a set of maps that are available to all users of the system. However, in certain scenarios, it is necessary to obscure options when a user is interacting with an application in certain countries or jurisdictions. For example: A map provider license might prohibit the consumption of their content in certain countries. 


This functionality enhances the INITIALIZE method of the Visual Business Application Base Class (CL_VBI_APPLICATION) with an optional parameter of type VBI_CONTEXT (Char 3). 
If provided, logic used to decide what Map Layer Stack (VBIC_MAP_STACK) to select for a given application (VBI_APP_ID) branches to check if there is an entry for the provided VBI_CONTEXT in the new VBIC_CXT_MS_ASGN table. 
If no entry exists, then the logic reverts to the standard VBIC_APP_MS_ASGN table lookup. 

Code changes required to consume:

Support for this functionality in an application is completely optional. If the following code changes are not made, the application will continue to follow the existing logic and context specific table entries (VBIC_CXT_MS_ASGN) will be ignored. 

To support this functionality in code: 

Prerequisite: The application must decide what Char 3 'context identifiers' will be used to filter map selection and how context changes will be propagated to the SAP Visual Business components.  

Code: Where 'Context' is to be considered in the program flow, the application needs to enhance calls to the CL_VBI_APPLICATION.INITIALIZE method (or its derivatives where an extension of the class has been consumed) with the optional context parameter.

For example:
In the sample applications for SAP Visual Business, the sample program VBI_GUI_TEST initialises the Visual Business application via the extension method INITIALIZE_GEO in the following way: 

In a modified version of this call, the code would look something like: 

LS_ADDRESS-COUNTRY is an example where the developer has chosen to simply look up the current user's address country value, but the consuming application could select any value for context e.g. Contract employee versus permanent employee. 

To configure context values:

Once code changes are in place, the new functionality is activated by creating valid entries in the new VBIC_CXT_MS_ASGN table.
This can be done using the SAP Visual Business View Cluster (VBIVC_APPDEF). 


  1. In the View Cluster Dialog Structure, select Applications => Contextual Map Layer Stack Assignments
  2. Choose a target 'Application' for this assignment 
  3. In edit mode, create new Entries in the table.
    Context: The 'Context' column accepts unrestricted values up to 3 characters in length.
    Map Layer Stack: The Map Layer Stack can be entered as the ID of a known layer, or simply selected from the list of configured values. 
    Default: an entry for the 'Default' Map Layer Stack should be selected for each Context=>Map Layer Stack group. 

  4. Save

Regarding the 'Default' column:

Some applications offer users the opportunity to change the displayed map from a context menu of Map Layer Stacks assigned to the application. When a 'Context' is active for an application, only the Map Layer Stacks assigned to the in-scope context for the specified application will be shown. Administrators of an application should take care to ensure that there are Contextual Map Layer Stack Assignments for each of the valid options for a context and that one of these assignements is set as default per context.

For example: 

  • No labels