SAP NEWS-773-ABAP SQL Get Example source ABAP code based on a different SAP table
SAP Help
AB_SQL in ABAP Release 7.73 ITOC
ABAP_MODIFICATION_NN Open SQL Renamed as AB_SQL > The existing name
Open SQL> was changed to AB_SQL >. This renaming reflects that some parts of AB_SQL now only support certain database platforms, specifically SAP HANA database>, and hence that it is no longer fully platform-independent. ABAP_MODIFICATION_NN Access to Hierarchy Data> In queries, both hierarchies> and hierarchy node navigators> can be specified as data sources>. Accessing hierarchy data triggers the ABAP_STRICT_773 strict mode from ABAP_RELEASE ABAP_773 / . ABAP_MODIFICATION_NN Secondary Connections> On an AS ABAP with a SAP HANA database> as its standard database>, only those secondary connections> should be used from the database table DBCON >> whose secondary database> is also a SAP HANA database. Alongside the CONNECTION> addition in AB_SQL , this also applies to Native SQL (ADBC and EXEC SQL>). SAP HANA Smart Data Access (SDA)> should be used instead. In SDA, secondary databases are addressed from the SAP HANA database using special qualified names or by using virtual tables. If a SAP HANA database is used as a standard AS ABAP database, ABAP programs can use these names across the standard connection. This is only possible in AMDP and Native SQL. Database Shared Libraries (DBSL) are no longer required here. ABAP_MODIFICATION_NN Client Handling in Subquery of the Statement INSERT>> The addition USING CLIENT>> of the statement INSERT>> can now be specified in a subquery>. This means that the client specified for the target table of the insert operation can be different from the client specified for the data source of the subquery. If USING CLIENT> is not specified in the subquery, the current client ID is now always applied to implicit client handling>. Before ABAP_RELEASE ABAP_773 , the client ID specified after INSERT> using USING CLIENT>> was also used in the subquery. The FROM> clause of the subquery can now access the database table or DDIC table view filled using the INSERT> statement. This makes it possible to copy the data from one client to another. In the subquery, using USING CLIENT> or accessing the database table or DDIC view filled by the INSERT> statement enables ABAP_STRICT_773 strict mode from ABAP_RELEASE ABAP_773 / . ABAP_MODIFICATION_NN Subquery as Data Source of MODIFY>> In the AB-SQL write statement MODIFY> >, a parenthesized subquery SELECT subquery_clauses>> can now be specified as a data source after FROM>. The rows of the result set of the subquery are modified or inserted in the target table directly on the database. No data transport is required between the database and AS ABAP. When used in MODIFY> , a subquery demands ABAP_STRICT_773 strict mode from ABAP_RELEASE ABAP_773 / . ABAP_MODIFICATION_NN USING CLIENT> and Session Variable client>> In an AB-SQL read in which multiple queries> access client-dependent CDS views> and the client handling method is defined using the annotation @ClientHandling.algorithm:#SESSION_VARIABLE>>, the session variable> client> (which corresponds to the ABAP-specific session variable> CDS_CLIENT> on the SAP HANA database) must be set to the same value in all of these queries. The runtime error SAPSQL_DIFFERENT_CLIENT_VALUES> occurs if USING CLIENT>> is used to specify a different client ID in one of these queries. This situation can occur in the statement WITH>> or when using UNION> >. ABAP_MODIFICATION_NN GROUP BY> Addition GROUPING SETS >> In a SELECT>> statement, the GROUP BY>> addition GROUPING SETS>> can now be used. The addition GROUPING SETS> makes it possible to group multiple grouping sets under one GROUP BY> clause. This is the same as specifying UNION ALL>> with different GROUP BY> clauses. The addition GROUPING SETS> has an advantage over a UNION> clause grouping because the SELECT> clause only needs to be specified once. Using GROUPING SETS> triggers ABAP_STRICT_773 strict mode from ABAP_RELEASE ABAP_773 / . ABAP_MODIFICATION_NN Aggregate Function GROUPING>> The aggregate function GROUPING>> can now be used in a SELECT>> statement. The grouping function GROUPING> can be used to verify whether a specific column is part of the aggregation>. The grouping function can be used only if the GROUP BY> > clause contains the addition GROUPING SETS>>. ABAP_MODIFICATION_NN Stricter Checks on Syntax Rules> A violation of the following rules now always produces a syntax error. In the strict modes> of the syntax check, these violations already produced a syntax error. Outside the strict modes, they produced a syntax check warning and in most cases a runtime error when the program was executed. When a view is accessed, its key fields must be located together at the start. The additions USING CLIENT>> and CLIENT SPECIFIED>> cannot be used when a CDS entity> is accessed that is linked with a CDS role>. Even when using path expressions>, the addition CLIENT SPECIFIED>> can only be used for client-dependent data sources. When a column is specified>, the actual names of the components must be used for a database table containing an