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: 

In Where clause String comparison

Former Member
0 Kudos

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

former_member223537
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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.

0 Kudos

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.