Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Data Definitions →  ABAP CDS - Views →  ABAP CDS - Client Handling in CDS Views 

ABAP CDS - Obsolete Client Handling in Views

Before the annotation @ClientHandling was introduced, the client dependency of a CDS view was specified using the annotation ClientDependent with the possible values true and false.

Other versions: 7.31 | 7.40 | 7.54

Determining Client Dependency

The possible values true and false of the obsolete annotation @ClientDependent have the following effects on client dependency:

  • true
The annotation ClientDependent:true works like @ClientHandling.type:#INHERITED.
  • A view with client-specific data sources is a client-specific view.
  • A view with exclusively cross-client data sources is a cross-client view.
Unlike in @ClientHandling:#INHERITED, a view in which a cross-client data source as the left side of a LEFT OUTER JOIN is joined with a client-specific data source on the right side cannot be made client-specific using @ClientDependent:true and a syntax error occurs.
  • false
The annotation ClientDependent:false makes a view into a cross-client view. Unlike in @ClientHandling.type:#CLIENT_INDEPENDENT, this value can also be specified for view when a data source of the view is client-specific.

Only the annotation @ClientHandling.type should now be used in new CDS views. The annotations @ClientHandling and @ClientDependent cannot be used together in the definition of a CDS table function. If neither of the annotations @ClientHandling.type and @ClientDependent is specified, the default value of @ClientHandling.type applies.

Determining Client Handling

The possible values true and false of the obsolete annotation @ClientDependent have the following effects on client handling:

  • true
The annotation ClientDependent:true works like @ClientHandling.algorithm:#AUTOMATED. No cross join, however, is created here for the case (forbidden here) where a cross-client data source is joined with a client-specific data source using a LEFT OUTER JOIN.
  • false
The annotation @ClientDependent:false works like @ClientHandling.algorithm:#NONE. Client handling can be switched off here for views that contain client-specific data sources.

Properties of Cross-Client Views

Client-specific views with the annotation @ClientDependent:true have the same properties as client-specific views with the annotation @ClientHandling.type.#INHERITED or @ClientHandling.type.#CLIENT_DEPENDENT. @ClientDependent:false can be used, on the other hand, to define cross-client views, even if they contain client-specific data sources. These have the following properties:

A client column specified in the SELECT list is preserved in the results set if client dependency is switched off explicitly using the annotation @ClientDependent:false. The column is then applied like a regular view field when the CDS entity is accessed.
If client dependency is switched off explicitly using the annotation @ClientDependent:false, a CDS database view does not have a client column if it is not specified explicitly in the SELECT list. A client column specified in the SELECT list, on the other hand, dictates that the CDS database view has a client column, hence making it a client-specific view. This has consequences for obsolete access to the CDS database view using SELECT. This is then handled in accordance with classic implicit client handling.


Note

It is not usually a good idea to switch off client dependency in views with client-specific data sources. If this is still sometimes the case, only the CDS entity must be accessed, and never the CDS database view, to avoid unexpected behavior.

Executable Example

CDS Views, Obsolete Client Handling