Tiven Wang

HANA Default Client

Wang Tiven November 30, 2016
425 favorite favorites
bookmark bookmark
share share

When accessing the HANA views directly (or via analytical tools like Lumira or BOC), a proper client needs to be maintained at the HANA database user.

It can be maintained in the HANA studio (Navigator -> Systems -> -> Security -> Users -> )

HANA Session Client

Assign a default client to an calculation view and filter data at runtime based on the default client value. The table below lists the default client value types you can assign and their description.

Default Client Value Description
Session Client If you use session client as the default client value, then at run time, modeler filters the table data according to the value you specify as the session client in the user profile.
Cross Client If you use cross client as the default client value, then modeler does not filter the table data against any client and you see values relevant to all clients. But the explicit filter with input parameter MANDT=$$client$$ can filter the table data in sql from ABAP.
Fixed Client If you want to use a fixed client value, for example, 001, then modeler the table data for this client value.

ABAP-Specific Session Variables in SAP HANA

Session variables are global variables in the SAP HANA database that can be accessed there using the predefined function SESSION_CONTEXT. Session variables contain global information about the current context and are hence similar to ABAP system fields.

When a SAP HANA database is used as the central AS ABAP database, the following session variables are filled with ABAP-specific values in ABAP reads:

  • CLIENT contains the current client in accordance with the nominal value of the ABAP system field sy-mandt.
  • APPLICATIONUSER contains the current client in accordance with the nominal value of the ABAP system field sy-uname.
  • LOCALE_SAP contains the language of the current text environment in accordance with the nominal value of the ABAP system field sy-langu.
  • The ABAP-specific session variables can be used, for example, in AMDP methods and make the associated input parameters superfluous. A method of this type should only be called from ABAP programs in this cases, since it cannot otherwise be guaranteed that the variables are given the correct values.
  • In the ABAP CDS DDL, the syntax $session.vname can be used in the definition of a CDS view to access the ABAP-specific session variables. The name vname is then different from the name shown here. When a CDS view is accessed using Open SQL, the session variables are available on all supported database platforms and not just on the SAP HANA database.

Get the details of your session context

WHERE connection_id = ( SELECT
	WHERE own = 'TRUE' )


The example SAP HANA, ABAP-Specific Session Variables shows various ways of accessing the session variables specified here.

Similar Posts

  • SAP HANA Database SAP HANA is an in-memory, column-oriented, relational database management system developed and marketed by SAP SE. Its primary function as database server is to store and retrieve data as requested by the applications. In addition, it performs advanced analytics (predictive analytics, spatial data processing, text analytics, text search, streaming analytics, graph data processing) and includes ETL capabilities as well as an application server.
  • Unit Test by Spring MVC Test Framework Testing is an integral part of enterprise software development. Dependency Injection should make your code less dependent on the container than it would be with traditional Java EE development. This topic introduce how to create Unit Test by Spring MVC Test Framework for Java project on HCP
  • Apply Spring Data JPA to Java Project on HCP Spring Data’s mission is to provide a familiar and consistent, Spring-based programming model for data access while still retaining the special traits of the underlying data store. Spring Data JPA, part of the larger Spring Data family, makes it easy to easily implement JPA based repositories. This module deals with enhanced support for JPA based data access layers. It makes it easier to build Spring-powered applications that use data access technologies.
  • Apply Spring Architecture to Java Project on HCP The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBeans (EJB) model. I will show you how to apply Spring Frameworks to Java project on HANA Cloud Platform.
  • Persistence Service for Java Maven Project on HCP The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. JPA was defined as part of the EJB 3.0 specification as a replacement for the EJB 2 CMP Entity Beans specification. In this topic I will show you how to create persistence service for Java project on HCP using Java Persistence API (JPA) and it's implementation EclipseLink
  • What's CDS Core Data Services (CDS) is an infrastructure that can be used by developers to create the underlying (persistent) data model which the application services expose to UI clients. CDS is just SQL + Annotation. Annotation is just a Note / Explanation / Comment. Annotation is explained by Evaluation Runtime (Engine). Engine is one of SADL / BOPF / Analytic Manager / Enterprise Search / ABAP / HANA …


Back to Top