We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
... ${ USING ${ CLIENT clnt $}
$| ${ CLIENTS IN @client_range_tab $}
$| ${ CLIENTS IN T000 $}
$| ${ ALL CLIENTS $} $} ...
1. ... USING CLIENT clnt
2. ... USING $[ALL$] CLIENTS $[IN$] ...
The optional addition USING in the FROM clause of a query switches implicit client handling from the current client to other clients.
When a single data source is specified, the addition USING must be inserted directly after data_source in the join condition. When a join expression is specified, the addition must be inserted after the last addition ON of the join condition. Client handling can be switched exactly once for each query and is applied to all client-dependent data sources specified there. These include:
Client handling can, however, be switched in subqueries defined using WITH and in queries joined using UNION, INTERSECT, or EXCEPT. If the data source is specified statically, the addition can be specified only if at least one client-dependent data source is used. Otherwise a syntax error occurs.
The addition USING cannot be used to access a CDS entity that is linked with a CDS role and for which CDS access control is performed:
The addition USING is not allowed when accessing , because client handling is done implicitly for and cannot be manipulated. For more details, see ABAP CDS - Client Handling in CDS View Entities.
... USING CLIENT clnt
The addition USING CLIENT modifies automatic client handling in for the current query so that the client ID from clnt is used instead of the current client ID. The client specified in clnt is used in all places where, in SELECT statements, the current client is implicitly used in implicit client handling. An implicit condition is created for this client and, in joins, the client columns of the client-dependent data sources involved are compared for equality. If it is known statically that the data sources data_source are not client-dependent, the addition USING CLIENT cannot be specified.
clnt expects a data object of the type c with length 3 and containing a client ID. A literal or a host variable can be specified. If specified, the system field sy-mandt would be ignored and cannot be specified directly for clnt.
When accessing CDS entities, the session variable (CDS view entity, ) client is set to the client ID specified in clnt while the current SELECT statement is executed. The following restrictions apply:
On SAP HANA databases, USING CLIENT sets the ABAP-specific session variable CDS_CLIENT accordingly.
Reading of all customers in client "800" from a client-dependent DDIC database table.
... USING $[ALL$] CLIENTS $[IN$] ...
1. ... USING CLIENTS IN @client_range_tab
2. ... USING CLIENTS IN T000
3. ... USING ALL CLIENTS
The additions USING $[ALL$] CLIENTS $[IN$] modify implicit client handling so that the data of all clients specified by the addition is read and not just the data from the current client. The additions modify the implicit WHERE condition for the client column passed to the database when it is accessed. They do not modify the equality condition for the client columns of client-dependent data sources in joins.
When CDS entities are accessed, the additions USING $[ALL$] CLIENTS $[IN$] do not set the session variable client. They cannot be used when accessing the following CDS entities:
The additions USING $[ALL$] CLIENTS $[IN$] cannot be specified together with the following path expressions:
... USING CLIENTS IN @client_range_tab
This addition modifies implicit client handling in for the current query so that, instead of the current client, the data of all clients is selected whose client IDs meet the conditions in a ranges tables client_range_tab. If the ranges table is empty, the data of all clients is selected.
For client_range_tab, an internal table can be specified as a host variable or a host expression whose row structure matches the structure of a ranges table. The columns low and high must have the type c with length 3.
Selection of the data of all clients whose client IDs meet the conditions of ranges table constructed in a host expression with the
value operator VALUE.
... USING CLIENTS IN T000
This addition modifies implicit client handling in for the current query so that, instead of the current client, the data of all clients is selected implicitly, whose client IDs are in the column MANDT of the system table T000.
See below.
... USING ALL CLIENTS
This addition modifies implicit client handling in for the current query so that, instead of the data of the current client, all data is selected regardless of the content of the client column.
For the table SFLIGHT, this example checks whether a selection of all data without a condition for the client column has the same result as a selection of the client from the system table T000.
Leave us your contact details and we will call you back. Fields marked with * are mandatory.
We offer holistic SAP solutions from a single source to shape digital change and develop new business areas.
Switzerland
Schaffhausen
Germany
Mannheim, Düsseldorf, Munich
USA
Haverhill
Greece
Thessaloniki