Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

[CDS] Short dump on CDS with parameters on DB2

0 Kudos

Hello there Gurus,

I've recently started practicing some CDS views with parameters and stumbled upon an odd SQL error in one of them.

Basically it inputs two parameters, Language and Employee Nr and uses language in select list and Employee Nr in Where clause.

[code]

(...)

substring( text[1: spras = $parameters.lang ].butxt, 1, 10 ) as comp_name }

where v1.pernr = $parameters.p_pernr

[/code]

If I data preview this version, I get an SQL error "-99999", "[IBM][CLI Driver] CLI0108E Communication link failure. SQLSTATE=40003, DBIF_REPO_SQL_ERROR" exception.

Seems like it's something related to connection failure, but if I replace my $parameter in the WHERE clause by a hardcoded value, it works just fine. Furthermore, if I refer to my path expression after "FROM", as an inner join, it also works.

I've also confirmed that the error is not due to lack of support from the database, since CL_ABAPDB_FEATURES works without error before performing the CDS SQL query.

Has anyone faced this?

Thanks!

Lauro

3 REPLIES 3

horst_keller
Product and Topic Expert
Product and Topic Expert

Do you get the same error using Open SQL in an ABAP program?

The only thing, I can think about is that your DB version is not sufficient. There are SAP notes that describe which DB version must be used with which ABAP release.

0 Kudos

Hi Horst,

Thanks for answering! No, I don't get any errors while using Open SQL in ABAP programs. I will try to do a research on these Notes and update the post if I find anything.

0 Kudos

So, just to record what I discovered as a final conclusion:

The issue really seems to be related to adding parameters to the CDS View along with a database version (in my case, DB2 v11.1.5 and Abap 7.40 SP16). The short dump ("Query failed" message in Eclipse's data preview functionality) will occur if more than one association is used.

To be able to determine this I used one of the EPM standard CDS Views in a brand new custom one, passing along multiple path expressions in the select list. Without parameters it works perfectly, but fails after adding them. I'm only able to preview data if I leave exactly one path expression in the select list - I can use multiple parameters without a problem in this case.

Thanks!