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

OPEN SQL WHERE CLAUSE

Former Member
0 Likes
537

Hello everybody,

I have to do a select to the EDIDC table as follows:

CONCATENATE '%' wa_idocs-idocfuente '%' INTO idockey.

SELECT SINGLE docnum status

INTO (wa_idocs-idocdestino,wa_idocs-statusdest)

FROM edidc

WHERE arckey LIKE idockey.

now this is very poor performance query, now the problem is that the arckey field is a string field, now does anyone nows a more efficient way to do this, we are evaluating an Index but that would mean more space, thanks for any suggestions.

Regards,

Julio

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
443

use selopt std. structure and build a range table and use that....

selopt-sign = 'E'.
selopt-option = 'CP'.
concatenate '*' wa_itab-value '*' into selopt-low.

append selopt.

select......where value in selopt.

Read only

Former Member
0 Likes
443

thanks for you answer