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
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

ATC Check: No WHERE condition


ABAP developers periodically execute ABAP Test Cockopit Tool to review ATC check results. When I executed ATC checks on an ABAP program recently, I got Analysis of WHERE Condition for SELECT Table ...: No WHERE condition in the ATC results.

ATC Check No WHERE condition

When I clicked on the object name (ABAP program name) the editor directly opened the ABAP code line where the ATC error or warning is triggered.

select * from ztable into table gt_data.
Code

Since I want to fetch all the data in the database table, there is actually no filtering condition or WHERE condition to add into this ABAP SELECT command.

So first way to resolve this item in the ATC check is using pseudo command as written in ATC listing details which is displayed when ABAP developer double-clicks on the item line.

Finding can be suppressed with pseudo comment "#EC CI_NOWHERE

So I converted the original ABAP SELECT command as follows by adding "#EC CI_NOWHERE after the command

select * from ztable into table gt_data. "#EC CI_NOWHERE
Code

Or if you avoid using pseudo comments although it is not necessary ABAP programmer can add a WHERE clause on one of the key fields similar to as shown below.

select * from ztable into table gt_data where keyfield1 is not null.
Code

Both modifications enables ATC results to be fulfilled for Analysis of WHERE Condition for SELECT Table ...: No WHERE condition



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.