2014 Oct 31 5:47 AM
Hello ABAPers,
I have a requirement in my task.
1. The input string is something like : " Thoesis Industries Labs"
2 The requirement is , if the enduser enters " Theosis Labs industries" or any other combination of the inputted words , it has to check in the database and throw an error if it already exists.
I have tried using CS. But it is not working.
Need help.
Regards,
Swapna V
2014 Oct 31 5:59 AM
Hello swapna,
you can find all occurrences of statement.
FIND ALL OCCURRENCES OF 'String' in table 'your table' match offset off.
Regards.
Sridhar.A
2014 Oct 31 5:59 AM
Hello swapna,
you can find all occurrences of statement.
FIND ALL OCCURRENCES OF 'String' in table 'your table' match offset off.
Regards.
Sridhar.A
2014 Oct 31 9:05 AM
Hi Sridhar
Thanku for the reply.
But will the same hold good for a dynamic input I mean any kind of input that user enters
2014 Oct 31 9:24 AM
Hi Swapna lalitha,
it works for dynamic entry.
Are you checking the entry in database table or internal table.
please post the exact requirement.
Regards.
Sridhar.A
2014 Oct 31 6:21 AM
try using CA (contains any) as below
if p_input ca 'Thoesis, Labs, Industries'.
MESSAGE 'Already exists' type 'E'.
else.
WRITE: /'Sucess'.
endif.
Regards,
Satish
2014 Oct 31 9:05 AM
Hi Satish,
Thanku for the reply.
But will the same hold good for a dynamic input I mean any kind of input that user enters
2014 Oct 31 10:11 AM
So, you're requirement is that the user enters a sequence of words. You then want to check whether those words are already in some internal table.
Now, given "Theosis Labs industries" do you want a match when the user enters any combination of
Theosis , Labs and industries?
I.e. Should "Labs" give a match or is it only a combination of all three words, like "Labs industries Theosis"?
Is the search case sensitive? Is punctuation to be ignored? What exactly are you checking the user entry against?