SAP NEWS-610-SQL



Get Example source ABAP code based on a different SAP table
  


NO •

SQL and Updates in ABAP Release 6.10
ITOC

ABAP_MODIFICATION_NN 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 that makes the local update, and this raises an uncatchable exception (a runtime error)

ABAP_MODIFICATION_NN Additional Syntax Checks

Additional syntax checks were introduced for the following constructs:
Subqueries in WHERE conditions are only allowed if the source table is transparent.
The addition GROUP BY 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_NN Type Check in the Addition VERSION

In the case of the statements MODIFY , DELETE, READ TABLE, and LOOP AT only fields of types C, N, D, T, and flat structures of the same types are allowed for the addition VERSION.

ABAP_MODIFICATION_NN Dynamic SQL

Dynamic specifications are now possible for the following language constructs:
ABAP variables in WHERE, HAVING, FROM, and SET.
Lowercase spelling when specifying table names dynamically.
Dynamic WHERE in DELETE and UPDATE
Dynamic SET in UPDATE.
Dynamic aggregate expressions in the HAVING clause
Dynamic FROM in 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_NN Implicit Client Handling

The client is now specified 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_NN Use of DISTINCT in Pooled Tables and Cluster Tables

If DISTINCT is used in the SELECT clause with pooled tables and cluster tables, this always produces (statically) a syntax error if individual columns are accessed. This combination was not detected dynamically and the addition DISTINCT was simply not executed. In dynamic cases, the catchable exception CX_SY_DYNAMIC_OSQL_SEMANTICS is now raised.

ABAP_MODIFICATION_NN Database Changes Using Read-Only Views

Previously, an attempt to change database tables using read-only views simply caused a runtime error. If this is known statically, a syntax error is now produced.

ABAP_MODIFICATION_NN Catchable Exceptions in AB_SQL and Native SQL

In AB_SQL , exceptions that occur when the source code is being parsed can now be handled using TRY ... ENDTRY. As before, various runtime errors were assigned exception classes.
In statically embedded Native SQL, all runtime errors of the database interface are now 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.
• TRDIR MODIFY

ABAP_MODIFICATION_NN INSERT, UPDATE, and MODIFY of the System Table TRDIR

Previously, INSERT TRDIR and UPDATE TRDIR were valid ABAP SQL statements. In the case of UPDATE TRDIR, program properties could be changed by the runtime synchronization without registration. Both statements now cause a syntax error. Only MODIFY TRDIR is still allowed, because there the runtime synchronization is switched on. The statement is for internal usage only and not documented.

ABAP_MODIFICATION_NN Selection Table and Target Table in 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 makes the form SELECT ... INTO itab FOR ALL ENTRIES IN itab possible.

ABAP_MODIFICATION_NN 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 CX_SY_DYNAMIC_OSQL_SEMANTICS.

ABAP_MODIFICATION_NN Strings on the Database

It is now possible to process character strings and binary data saved to database columns as strings in AB_SQL .

ABAP_MODIFICATION_NN WHERE Condition Optional in DELETE Statement

In the statement DELETE FROM dbtab , the WHERE condition is no longer required. A DELETE statement without a WHERE condition deletes all rows of a table.