Ansicht
Dokumentation

ABENCDS_CLIENT_HANDL_V1_ABEXA - CDS CLIENT HANDL V1 ABEXA

ABENCDS_CLIENT_HANDL_V1_ABEXA - CDS CLIENT HANDL V1 ABEXA

BAL_S_LOG - Application Log: Log header data   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

, Client Handling

This example demonstrates how client-dependent are handled.

Source Code

Execute

Description

The program accesses the following CDS views:

The view DEMO_CDS_SPFLI_CLIENT_0 is a regular client-dependent in which the client column is not specified in the SELECT list. The DEMO_CDS_SPFLI_CLIENT_1 is used to demonstrate the behavior in rare cases where the client column is specified in the SELECT list of a client-dependent CDS view.

RTTI is used to read the components of the associated data types:

  • The structure of the client-dependent CDS entity without client column in the SELECT list does not have a client column.
  • The CDS-managed DDIC view of the client-dependent without client column in the SELECT list has a client column.
  • Nevertheless, the structure of the client-dependent CDS entity with client column in the SELECT list does not have a client column.
  • The CDS-managed DDIC view of the client-dependent with client column in the SELECT list has a client column.

The statement SELECT is used to make the following accesses:

  • Regular access to a client-dependent CDS entity without client column in the SELECT list. The data from the current client is read. The result set does not have a client column.
  • Regular access to a CDS-managed DDIC view of the client-dependent CDS entity without client column in the SELECT list. The data from the current client is read. The result set has a client column.
  • Access to a client-dependent CDS entity without client column in the SELECT list using the obsolete addition CLIENT SPECIFIED. The data of the client specified in the WHERE condition is read. A name myclient must be defined for this. The result set has a client column with this name.
  • Regular access to a CDS-managed DDIC view of the client-dependent CDS entity with client column in the SELECT list. The data from the current client is read. The result set does not have a client column.

The similar program DEMO_CDS_CLIENT_HANDLING_SV accesses CDS views in which the annotation @ClientHandling.algorithm: #SESSION_VARIABLE is used instead of @ClientHandling.algorithm: #AUTOMATED. The results are shown in exactly the same way as here, however access using the obsolete addition CLIENT SPECIFIED is not possible since the session variable $session.client is evaluated implicitly in the views.

Note

The accesses to the CDS-managed DDIC views of shown here are for demonstration purposes only. This way of accessing is obsolete and only the CDS entities should now be accessed.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 4579 Date: 20240329 Time: 121806     sap01-206 ( 66 ms )