SQL and Updates in Release 6.10
1 COMMIT WORK in local updates
2 Additional syntax checks
3 Type check with the addition VERSION
4 Dynamic SQL
5 Automatic client handling
6 Use of DISTINCT in pooled tables and cluster tables
7 Database changes using read-only views
8 Handleable exceptions in Open and Native SQL
9 INSERT and UPDATE of the system table TRDIR
10 Selection table and target table with FOR ALL ENTRIES
11 New exception for pooled tables and cluster tables
12 Strings in the database
13 WHERE condition optional in DELETE statement
ABAP_MODIFICATION_1 COMMIT WORK in local updates
As in the asynchronous update, the system now also sets the system
field SY-ONCOM = V in the local update. Therefore the system
recognizes a COMMIT WORK in the function
module, which carries out the local update, and this leads to an
exception that cannot be handled (runtime error)
ABAP_MODIFICATION_2 Additional syntax checks
Additional syntax checks have been introduced for the following
constructs:
Subqueries in WHERE conditions
are only permitted if the source table is transparent.
The GROUP BY addition is now also only
possible with transparent tables.
INTO CORRESPONDING is now only possible
when moving data to structured work areas or internal tables.
ESCAPE in WHERE conditions
for SELECT , DELETE , and UPDATE of pooled tables
ABAP_MODIFICATION_3 Type check with the addition VERSION
In the case of the additions MODIFY ,
DELETE ,
READ TABLE , and LOOP AT only
fields of types C, N, D, T, and flat structures
of the same types are permitted for the VERSION addition. In
Unicode there will be a syntax error or a
warning.
ABAP_MODIFICATION_4 Dynamic SQL
Dynamic specifications are now possible for the following language
constructions:
ABAP variables in WHERE ,
HAVING , FROM
, and SET .
Lowercase spelling when specifying table names dynamically.
Dynamic WHERE for DELETE and
UPDATE
Dynamic SET for UPDATE .
Dynamic aggregate functions in the
HAVING clause
Dynamic FROM for SELECT ... FROM
for joins, ON conditions , and
table aliases
Strings, tables of strings, and C fields for all operand positions for
which statements could previously be specified dynamically in an
internal table.
ABAP_MODIFICATION_5 Automatic client handling
The client specification is now carried out in the database interface.
Previously the system changed the client field in an internal table or
work area, as soon as the user carried out an
INSERT or UPDATE on the database table.
Now the system enters the current client in the database table, while
the client in the work area or internal table remains unchanged.
ABAP_MODIFICATION_6 Use of DISTINCT in pooled tables and
cluster tables
If you use DISTINCT in the SELECT
clause with pooled tables and cluster tables this always statically
causes a syntax error if you are accessing individual columns. This
combination was not recognized dynamically and the DISTINCT
addition was simply not executed. Now the handleable exception
CX_SY_DYNAMIC_OSQL_SEMANTICS is raised, if you use the statement
dynamically.
ABAP_MODIFICATION_7 Database changes using read-only views
Previously, an attempt to change database tables using read-only
views simply caused a runtime error. In the case of static
recognition, a syntax error is now triggered.
ABAP_MODIFICATION_8 Exceptions that can be handled in Native
and Open SQL
In statically embedded Native SQL
, all runtime errors of the database interface have now been assigned
exception classes, so that the exceptions between TRY
... ENDTRY can be handled.In addition, the opening of too many
cursors and connections can be caught.
In Open SQL , exceptions that
occur when the source code is being parsed can now be handled using
TRY ... ENDTRY . In addition, the runtime errors
DUPLICATE KEY , SQL ERROR , STATEMENT TOO LARGE ,
LOBLENGTH EXCEEDED , CONVERSION ERROR, , and INVALID CURSOR
have been assigned exception classes.
ABAP_MODIFICATION_9 INSERT and UPDATE of the system
table TRDIR
Previously, the instructions INSERT
TRDIR and UPDATE TRDIR were
valid. In the case of UPDATE TRDIR , the attributes could be
changed by the runtime synchronization without registration. Both
statements now cause a syntax error. Only
MODIFY TRDIR and MODIFY TRDIR FROM wa are still
permitted, because there the runtime synchronization is switched on.
ABAP_MODIFICATION_10 Selection table and target table with FOR
ALL ENTRIES
The table of selection conditions for FOR ALL
ENTRIES and the target table of the
SELECT statement can be the same. This allows you to use
statements in the form SELECT ... INTO itab FOR ALL ENTRIES IN itab
.
ABAP_MODIFICATION_11 New exception for pooled tables and cluster
tables
If pooled tables or cluster tables are used in subqueries, joins,
aggregate functions , or with
GROUP BY , this raises the exception Ausnahme
CX_SY_DYNAMIC_OSQL_SEMANTICS .
ABAP_MODIFICATION_12 Strings in the database
With Open SQL you can now store character strings and binary
data in database columns as strings .
ABAP_MODIFICATION_13 WHERE condition optional in DELETE
statement
In the DELETE FROM dbtab statement,
the WHERE condition is no longer required. A DELETE
statement without a WHERE condition deletes all rows of a table.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved