SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG. All rights reserved.ABAP - Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses →
System Class for Database Features
The method USE_FEATURES of the class CL_ABAP_DBFEATURES can be used to detect whether the current database or a database specified using a database connection supports particular features and whether these can be used at runtime in ABAP. One or more features can be queried and then passed to the method in an internal table. The potential row content of the internal table is determined using constants of the class CL_ABAP_DBFEATURES. Other values raise an exception from the class CX_ABAP_INVALID_PARAM_VALUE.
|Constant||Database Feature||Use in ABAP|
|AMDP_TABLE_FUNCTION||Table Functions||Access to CDS table functions in Open SQL.|
|EXTERNAL_VIEWS||SAP HANA views||Access to external views in Open SQL.|
|CALL_AMDP_METHOD||Supports AMDP||Method call of AMDP procedure implementations.|
|CALL_DATABASE_PROCEDURE||Database Procedures||Call of database procedures using CALL DATABASE PROCEDURE.|
|ITABS_IN_FROM_CLAUSE||Local temporary tables||Use of internal tables as a data source of queries in Open SQL, if these are evaluated by the database.|
|LIMIT_IN_SUBSELECT_OR_CTE||Sortings or limiters in subqueries||Use of the ORDER BY clause or the additions UP TO, OFFSET in subqueries.|
|TABLE_KEYCNT_MAX1||Up to 120 key fields||A table can contain more key fields than is permitted as a cross-platform table.|
|TABLE_KEYLEN_MAX1||Keys can have up to 2000 bytes||The key of a table can contain more bytes than is permitted as a cross-platform table.|
|TABLE_LEN_MAX1||A table row can have up to 16293 bytes||A table row can contain more bytes than is permitted as a cross-platform table.|
The method USE_FEATURES returns the value of abap_true if the feature is supported by the database and the specified use in ABAP is possible.
For the current database, checks whether specific additional features can be accessed using Open SQL.
VALUE #( ( cl_abap_dbfeatures=>amdp_table_function )
( cl_abap_dbfeatures=>external_views ) ) ).
The program DEMO_DBFEATURES checks all possible database features for the current database.