‎2008 Aug 12 3:27 PM
For a certain field COMM1, I have to check if it contains a certain pattern 40050/####
where # = numeric characters.
For example:
COMM1 = AB40050/1234CD is valid,
COMM2 = 40050/12ABCD is not valid, since C and D are not numeric characters.
Is this possible via a range ?
Thanks for your feedback
‎2008 Aug 12 3:31 PM
Hello Kris,
Use the wildcard characters in SELECT statement
e.g.:
SELECT ............ WHERE comm1 LIKE '%40050/%' AND comm1 NOT IN (<f 1>, ......, <f n>).
Regards
Indu
‎2008 Aug 12 3:35 PM
Don't think this is possible in just one go. You'll probably have to select the '40050/++++' pattern first and loop through the result set, using the known CO or CN '0123456789' operation on the relevant part to toss out unwanted results.
I'm curious if somebody has a better idea.
Thomas
‎2008 Aug 12 3:40 PM
Hi,
You could try checking the pattern through regex (regulatory expressions).
The abap statement is FIND REGEX followed by the expression. It is a bit complicated but once you understand it it's quit helpful for validating input.
regards,
Bert
‎2008 Aug 12 4:09 PM
Thanks, but as I understood from the presentation REGEX is only available as of release 7.0 ?
Guess i will need to proceed as Thomas suggested, will let u know the outcome...
cheers
‎2008 Aug 14 10:18 AM