2018 Aug 29 8:51 AM
Hello together,
I am trying to validate a character value.
I have two character fields and I would like to check if field c2 contains the value of c1. The problem is, that c2 can contain more characters than c1.
For example:
C1 has the value: edit_row_example
C2 has the value: hello.test_th edit_row_example
I would like to check if the pattern in C1 exists in C2. I tried to use CO CP operaters. However it doesnt work really. Does anyone has an idea? Thanks!
2018 Aug 29 9:45 AM
Hello Zeynep,
You would need to use CS (Contains String) here.. check for IF C2 CS C1...
hope this helps!
Regards,
Kiran
2018 Aug 29 9:32 AM
"doesn't work really" isn't a very specific issue.
What have you tried, what were the results? Why were they not what you expected?
Do you know the CP isn't case sensitive (except in OpenSQL)? https://blogs.sap.com/2018/08/17/in-case-of-a-sensitive-range-apply-this-solution/
2018 Aug 29 9:45 AM
Hello Zeynep,
You would need to use CS (Contains String) here.. check for IF C2 CS C1...
hope this helps!
Regards,
Kiran
2018 Aug 29 9:52 AM
2018 Aug 29 12:52 PM
2018 Aug 29 2:28 PM
Well I searched with CP to see if C1 fits in C2. CS was the solution