09-25-2008 8:05 PM
hye techies...
i have a field which is of string type.. it should not have only special character. Later after there is a nuemric or an alphabet, space and . can be allowed. Please help me with the code.
Thanks
Imran.
09-25-2008 8:08 PM
IF LV_STRING CA '`~!@#$%^&*()_+=-:;><,.?"\|}{[]'.
* ERROR
ENDIF.
Put as many speccial characters as possioble and make your code more safe :).
Aman
09-25-2008 8:08 PM
IF LV_STRING CA '`~!@#$%^&*()_+=-:;><,.?"\|}{[]'.
* ERROR
ENDIF.
Put as many speccial characters as possioble and make your code more safe :).
Aman
09-26-2008 2:54 AM
Hi IMRAN PASHA,
There is another way, just check whether it contains only
numeric or numbers or sapce.
CONCATENATE SY-ABCDE '0123456789' INTO V_PATTERN
SEPARATED BY SPACE.
CHECK V_STR CO V_PATTEN.
Here, the variable V_STR contains the value to be checked.
the variable V_PATTERN can be string.
Regards,
R.Nagarajan.
09-26-2008 3:15 AM
Sorry i misunderstood your question. My previous answer is not correct.
In the above reply make sure u have SY-ABCDE converted to lower case as well. By default its in Upper case.
A