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

In Where clause String comparison

Former Member
0 Likes
941

Request for help in regard to the select statement where clause Ex:(Select single name into v_name from XYZ where text = string).

String and text data types are same.

String will have only 3 char and text will have 40 char of length.

Out of 40 char I would like the where clause to search any of the 3 char and fetch the record.

Hope my question is clear and can expect help on this regards,

Thanks,

Azhar.

Request for help in regard to the select statement where clause Ex:(Select single name into v_name from XYZ where text = string).

String and text data types are same.

String will have only 3 char and text will have 40 char of length.

Out of 40 char I would like the where clause to search any of the 3 char and fetch the record.

Hope my question is clear and can expect help on this regards,

Thanks,

Azhar.

4 REPLIES 4
Read only

Former Member
0 Likes
656

Select single name into v_name from XYZ where text LIKE string.

Read only

Former Member
0 Likes
656

I have tried with like in where clause, it does not work my scenario.

I will not be comparing the complete string, only single char...in the table field.

Read only

0 Likes
656

Hello Azhar,

you can use % with the like in the where condition.

example: string = 'chandra' vendor name.

select * from lfa1 into table it_lfa1 where name1 like cha% .

i think this help you.

reward if useful,

Regards,

Phani.

Read only

0 Likes
656

Hi Phani,

The string which will be in where clause will be dynamic.

I have tried %string%, String, +String, +String_.

For ABAP we should use *, +, _ only.

I have gone through the SAP Help to get the above info...

But my requirement will not fit with this options.

Regards,

Azhar.