SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.




Install SAP Free


ATC Check: The database feature "TABLE_LEN_MAX1" is used here


ABAP Test Cockpit (ATC) checks control ABAP code developments regarding database queries for the data platform compability and displays if a database feature like TABLE_LEN_MAX1 is used to provide information to the developer that this feature is not supported by all data platforms. So in case a data platform change like moving from SQL Server to Oracle, or just in the opposite way or among from other vendors, etc some errors might occur due to unsupported database features by the new provider.

S/4HANA: Search for S/4 related syntax errors
Priority 2
Syntax check warning.
The database feature "TABLE_LEN_MAX1" is used here (read the long text).
Internal message code: SELECT 529

When I checked the documentation, I realized that I can resolve the issue by checking the database properties for TABLE_LEN_MAX1 feature before I execute the ABAP Open SQL query.

By the way, TABLE_LEN_MAX1 is pointing to database feature that a table row can have up to 16293 bytes

Here is a section from the Help documentation on the error.

Database features are functional enhancements in Open SQL that are no longer implemented on all databases. This is why this warning is produced.
The class CL_ABAP_DBFEATURES makes it possible to query (at runtime) whether the database of the system supports this feature. The name of the database feature specified in the warning is defined as a constant in the class CL_ABAP_DBFEATURES. These constants and the method USE_FEATURES of the class CL_ABAP_DBFEATURES can be used to query whether the Open SQL command can be executed.

So to check if data platform supports TABLE_LEN_MAX1 feature, ABAP class cl_abap_dbfeatures should be called to read the TABLE_LEN_MAX1 feature of the database that the code is running on.

if cl_abap_dbfeatures=>use_features(
 exporting
  requested_features =
   value #( ( cl_abap_dbfeatures=>table_len_max1 ) )
).

* Open SQL Select command

endif.

Additionally, following pseudo-comment ##DB_FEATURE_MODE[TABLE_LEN_MAX1] could be used right after the database table in SQL SELECT query.

SELECT vbeln, posnr
FROM vbrp ##DB_FEATURE_MODE[TABLE_LEN_MAX1]
INTO TABLE @DATA(lt_vbrp)
FOR ALL ENTRIES IN @lt_vbrk
WHERE vbrp~vbeln = @lt_vbrk-vbeln.

This pseudo-comment informs that you are acknowledged about the issue and possible problems that might occur on a data platform change.


Database Feature TABLE_LEN_MAX1 used with VBPA Table

I got this "The database feature "TABLE_LEN_MAX1" is used here" ATC error on a SELECT command where I use VBPA Sales Document Partner table.
Instead of using VBPA in FROM clause of a SQL SELECT statement in my ABAP program, I preferred using ZCBS1_V_VBPA view as the datasource. Because all the fields I need were already in the ZCBS1_V_VBPA view and the view had far more less fields than VBPA table.
This improvement in code, limiting the selected fields at the data source, is enough to solve the ATC error for VBPA table use.






SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table


Meetup Sunumu 1 meetup






Copyright © 2004 - 2019 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems