SAP CDS SESSION VARIABLE V2



Get Example source ABAP code based on a different SAP table
  


• $session. ABAP_CDS_SELECT

ABAP_CDS_DDL - CDS View Entity, session_variable

ABAP_SYNTAX
... $session.vname ...

What does it do?
Specifies a session variable vname in an operand position in a SELECT statement of a CDS view entity. The variable must be prefixed by $session.. The prefix and the variable are case-sensitive. $session.vname, $Session.Vname, and $SESSION.VNAME can all be used. No other spellings are allowed.
There are two types of session variables available:
Built-in session variables: Built-in session variables are set to their value when a CDS view entity is used in AB-SQL . They cannot be set or changed from ABAP programs. The following built-in session variables are currently available: user , client, system_language, system_date, user_timezone, user_date.
Application session variables : Application session variables are required for specific applications and they are set by dedicated system programs. The following application session variables are currently available: bs_instance_id, bs_zone_id .



Latest notes:

From a technical perspective, session variables indicate global variables of the current database and can be compared to ABAP system fields. Although application session variables can be changed from ABAP programs, outside of system programs they should only be used for reads.
NON_V5_HINTS
ABAP_HINT_END