2009 Aug 17 9:45 PM
All,
I have a string of characters and I need check if the Characters from 5th position to the 17th position should be all numeric.
Any ideas.
Meghna
2009 Aug 17 9:58 PM
Here's the sample code...
DATA: LS_STRING TYPE STRING.
DATA: LS_CHAR TYPE C LENGTH 12.
CONSTANTS: LS_VALUE(10) TYPE C VALUE '01234567890'.
ls_char = ls_string+5(12).
if ls_char CA ls_value ---> Checks if 5-17 characters have any numerics in them.
your code.
else.
your code.
endif.Edited by: Karthik on Aug 17, 2009 10:58 PM
All,
I have a string of characters and I need check if the Characters from 5th position to the 17th position should be all numeric.
Any ideas.
Meghna
2009 Aug 17 9:52 PM
Try this way
call function 'NUMERIC_CHECK'
exporting
string_in = v_text+5(12)
importing
string_out = v_text
htype = type.
if type ne 'NUMC'.
message e999 with ' Number is NOT numberic'.
endif.
Please search before posting
a®
2009 Aug 17 9:58 PM
Here's the sample code...
DATA: LS_STRING TYPE STRING.
DATA: LS_CHAR TYPE C LENGTH 12.
CONSTANTS: LS_VALUE(10) TYPE C VALUE '01234567890'.
ls_char = ls_string+5(12).
if ls_char CA ls_value ---> Checks if 5-17 characters have any numerics in them.
your code.
else.
your code.
endif.Edited by: Karthik on Aug 17, 2009 10:58 PM
2009 Aug 17 10:04 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |