cancel
Showing results for 
Search instead for 
Did you mean: 

The query does not reference any table when attempting to build the WHERE clause. (IES 00022)

0 Kudos

The query does not reference any table when attempting to build the WHERE clause. (IES 00022)

I use the date function in the select clause (Current_date - 1). what are the solutions for this? should i select a random table ?

View Entire Topic
Joe_Peters
Active Contributor

If you select a table, that table will be included in any queries that the object is used in. That may be ok if you do expect the table to be used whenever the object is used, but it can create unexpected results otherwise.

You don't have to associated a table. Leaving it unassociated will result in the parse error you got, but queries will run successfully, as long as at least one other object is included that is associated with a table.

I submitted a request years ago to more formally support unassociated objects: Improvement Request Details - Customer Influence (sap.com)

drs_macgyver
Explorer
0 Kudos

I complete agree with leaving them unassociated and suggest you add a suffix such as LIT (for literal) to these objects. Just remember going forward that LIT objects will produce this integrity error message that you can ignore. We use LIT because we also have objects with hard-coded literal values in addition to the various calculated dates.