Get Example source ABAP code based on a different SAP table
UPDATE>, USING CLIENT>, CLIENTS> This example demonstrates client handling in the AB-SQL statement UPDATE>>.
ABAP_SOURCE_CODE DEMO CL_DEMO_CLIENT_HANDLING
ABAP_DESCRIPTION The example demonstrates how the additions USING CLIENT>> and USING CLIENTS>> are used in the statement UPDATE>> and in other AB-SQL statements.
First, the addition USING ALL CLIENTS>> of the statement DELETE>> is used to delete all data in all clients from the client-dependent table DEMO_UPDATE >.
The addition CLIENT SPECIFIED>> of the statement INSERT>> is used to write data with five different client IDs from a table constructed in a host expression into this DDIC database table.
The statement UPDATE>> with different variants of the USING>> addition is applied to the filled table:
USING CLIENT> modifies the content of the column COL1 > for the client 100>.
USING CLIENTS IN @( ... )> modifies the content of the column COL2> for the clients 200> and 300> that meet the conditions of a ranges table constructed in a host expression.
USING CLIENTS IN T000> modifies the content of the column COL3> for all clients that also exist in the system table T000>>.
USING ALL CLIENTS> modifies the content of the column COL4> for all clients. In this example, the additions USING CLIENTS IN T000> and USING ALL CLIENTS> can select different clients, since the validity of the client IDs is not checked when data is inserted. In real application tables, however, only client IDs from the table T000> should occur.
Finally, the addition USING ALL CLIENTS> > of the statement SELECT>> is used to read and display the data from all clients.