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: 

Long String in Select-Where condition

Former Member
0 Kudos

Hello Guys,

I am new to ABAP. I want fetch some data from table DPR_OBJLINK. but when I write a following query,

 select external_id into lv_external_id from dpr_objlink
where object_key = lv_object_key

I got following error.

The Field Object_key is long string, so it can not be used in where, on and having conditions.

Any pointers??

Thanks & regards,

Prashant

3 REPLIES 3

SuhaSaha
Advisor
Advisor
0 Kudos

You cannot use table fields of type STRING in the WHERE clause. Read SAP documentation, it is documented there: [http://help.sap.com/abapdocu_70/en/ABAPWHERE.htm]

0 Kudos

This kind of is what the author of the question said. It is the problem.

ABAP Help:

Except for columns of type STRING, RAWSTRING, or GEOM_EWKB, or LCHR and LRAW, all columns of the data sources specified after FROM can usually be evaluated in the WHERE condition of a query.

But what is/are the way(s) to solve that?

Do we have to retrieve the field completely and process it in ABAP?

Do we have to use native SQL?

Former Member
0 Kudos

Checked condition using primary key external id