Ansicht
Dokumentation
ABAPINSERT_TARGET - INSERT TARGET
rdisp/max_wprun_time - Maximum work process run time Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
INSERT dbtab - target
Syntax
... {dbtab|(dbtab_syntax)} [CLIENT SPECIFIED]
[CONNECTION {con|(con_syntax)}] ... .
Alternatives:
1. ... dbtab
2. ... (dbtab_syntax)
Addition:
Effect
The entries in target determine, statically or dynamically, which
database table or which
view is accessed, and control
client handling.
Alternative 1
... dbtab
Effect:
For dbtab, a database table defined in the ABAP Dictionary or a view defined in the ABAP Dictionary can be specified.
Only views that refer to a single database table, and whose maintenance status in the ABAP Dictionary permits change access can be specified.
Alternative 2
... (dbtab_syntax)
Effect:
Instead of static specification, a bracketed data object dbtab_syntax can be specified, which must contain the name of the database table or the view when the statement is executed. A character-like data object or a
standard table without
secondary
table keys and with a character-like line type can be specified for the data object dbtab_syntax. The syntax in dbtab_syntax is, as in the ABAP Editor, not case-sensitve.
Addition
... CLIENT SPECIFIED
Effect:
This addition deactivates the automatic client handling of Open SQL. If the addition CLIENT SPECIFIED is used, the client identifier specified in source is taken into account. Without the addition CLIENT SPECIFIED, the ABAP runtime environment does not transfer the client identifier specified in source to the database system, but transfers the identifier of the current client instead.
Note
Since each client represents a self-contained unit, automatic client handling should never be turned off in application programs. In systems that support multitenancy, this is ensured by the ABAP runtime environment.
-
The addition CLIENT SPECIFIED cannot be used if a subquery is used as the data source.
Example
The following two INSERT statements produce the same result. The first statement uses the addition USING CLIENT to show the variant recommended for accessing a particular client. The second statement, on the other hand, uses CLIENT SPECIFIED to disable automatic client handling. This means it must fill the client field with the required client in the work area passed.
DELETE FROM demo_expressions USING CLIENT '800'.
INSERT demo_expressions USING CLIENT '800'
FROM @( VALUE #( id = 'X' num1 = '555' ) ).
DELETE FROM demo_expressions CLIENT SPECIFIED WHERE mandt = '800'.
INSERT demo_expressions CLIENT SPECIFIED
FROM @( VALUE #( mandt = '800' id = 'X' num1 = '555' ) ).
Example
The addition USING CLIENT after INSERT fills two columns of a database table with three rows for the client 100. This rows are then copied to the current client in a subquery by specifying USING CLIENT.
DELETE FROM demo_expressions.
DELETE FROM demo_expressions USING CLIENT '100'.
INSERT demo_expressions USING CLIENT '100'
FROM TABLE @( VALUE #( ( id = 'X' num1 = 1 )
( id = 'Y' num1 = 2 )
( id = 'Z' num1 = 3 ) ) ).
INSERT demo_expressions FROM
( SELECT * FROM demo_expressions USING CLIENT '100' ) ##NULL_VALUES.
SELECT id, num1
FROM demo_expressions
INTO TABLE @DATA(itab).
SELECT id, num1
FROM demo_expressions USING CLIENT '100'
INTO TABLE @DATA(itab_100).
ASSERT itab = itab_100.
BAL Application Log Documentation CL_GUI_FRONTEND_SERVICES - Frontend Services
This documentation is copyright by SAP AG.
Length: 6521 Date: 20240424 Time: 163450 sap01-206 ( 84 ms )