2008 Jan 25 9:49 AM
... it can also contains decimal values....
Anybody can help me??
Thanks in advance.
2008 Jan 25 9:53 AM
Hi Javier,
Do the following:
IF v_string CA '0123456789.'.
ENDIF.
Regards,
Aditya
... it can also contains decimal values....
Anybody can help me??
Thanks in advance.
2008 Jan 25 9:51 AM
Hi Javier,
Good!
If you know the numeric value for which you need to search in string you could use CA string operatoin.
Like:
IF string CA '22.10'.
*****
ENDIF.
Thanks,
Sunil
2008 Jan 25 9:52 AM
2008 Jan 25 9:52 AM
If string CA '1234567890'
Your string has numbers and decimals.
Endif.
2008 Jan 25 9:53 AM
Hello,
YOu can make use of the FM NUMERIC_CHECK.
Check this sample.
PARAMETERS: CHAR(10).
DATA: TYPE LIKE DD01V-DATATYPE.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = CHAR
IMPORTING
STRING_OUT = CHAR
HTYPE = TYPE.
WRITE: CHAR , TYPE.
Cheers,
Vasanth
2008 Jan 25 9:53 AM
Hi Javier,
Do the following:
IF v_string CA '0123456789.'.
ENDIF.
Regards,
Aditya
2008 Jan 25 10:03 AM
You can check either of these following 2 methods....
DATA : l_str(10) value '345.34'.
IF NOT l_str CA sy-abcde.
"do something
ENDIF.
*
"OR
IF l_str CA '.0123456789'.
"do something
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |