‎2006 Feb 02 1:55 PM
Hi,
is it possible to configure a data type to avoid non corresponding entries?
For example a field like CCNN.NNNN-NN.NNNN
C should be a Character, N a number. All differences should be rejected.
Regards,
Udo
‎2006 Feb 02 4:19 PM
Hi,
If you want to configure such a data type in dictionay then you can attach conversion routine to that field in domain. Sample code provided by rich may help you in writing routine. You can flash messages when there is any error in input to that filed through conversion routine.
Regards,
Ramesh
‎2006 Feb 02 2:13 PM
You can't set up a datatype like that, but you can do this with a little coding.
report zrich_0002 .
data: s type string.
data: length type i.
s = 'A11234A6789'.
length = strlen( s ).
if s+0(2) ca '1234567890'.
write:/ 'first two characters are not characters'.
endif.
length = length - 2.
if s+2(length) ca sy-abcde.
write:/ 'other characters are not numbers'.
endif.
Regards,
Rich Heilman
‎2006 Feb 02 2:18 PM
Hi,
Create a number range object using SNRO transaction
for table field.
Regards
Amole
‎2006 Feb 02 4:19 PM
Hi,
If you want to configure such a data type in dictionay then you can attach conversion routine to that field in domain. Sample code provided by rich may help you in writing routine. You can flash messages when there is any error in input to that filed through conversion routine.
Regards,
Ramesh