‎2008 May 04 3:05 PM
hi experts
i have a string how can i check if the string contain numbers or letters
thanks
amit
‎2008 May 04 3:29 PM
declare a constant that has number
gc_spl(20) type c value '0123456789'
if string CA gc_spl.
flag = 1.
exit.
endif.
if flag = 1.
write: string 'has numbers'.
endif.
Reward if helpful.
Thanks.
Imran.
‎2008 May 04 3:18 PM
Hi Amit,
Try using String relational operators like CA (contains any).
ex: String1 CA String2.
Check out the following link.it will be useful.
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm
Regards,
Satya,
‎2008 May 04 3:29 PM
declare a constant that has number
gc_spl(20) type c value '0123456789'
if string CA gc_spl.
flag = 1.
exit.
endif.
if flag = 1.
write: string 'has numbers'.
endif.
Reward if helpful.
Thanks.
Imran.