Application Development and Automation 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: 
Read only

Long String in Select-Where condition

Former Member
0 Likes
2,557

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
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,169

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]

Read only

0 Likes
1,169

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?

Read only

Former Member
0 Likes
1,169

Checked condition using primary key external id