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: 

String Start With

Former Member
0 Kudos

Dear all,

I'm looking for a way to check the string that have a prefix 'abc'. How can i do this kind of checking in ABAP?? Please advise.

Regards,

Kit

1 ACCEPTED SOLUTION

Former Member
0 Kudos

if it is in IF condition checking (or any other condition checking)

If itab-str cp 'ABC*'.

endif.

but if it is in select query where clause

then

select * from dbtab into corresponding fields of table itab where str like 'ABC%'.

regards

shiba dutta

4 REPLIES 4

Former Member
0 Kudos

if a+0(3) = 'abc'.

*--a is string

endif.

Former Member
0 Kudos

say ur variable name is str

then u can check str+0(3) = 'abc'

Former Member
0 Kudos

Hi,

Take the first three letters of the string and compare the same with abc using string operation CO . this will solve your problem

Regards

Shiva

Former Member
0 Kudos

if it is in IF condition checking (or any other condition checking)

If itab-str cp 'ABC*'.

endif.

but if it is in select query where clause

then

select * from dbtab into corresponding fields of table itab where str like 'ABC%'.

regards

shiba dutta