Abap program sample collection, function module explanation, BAPI List, BDC Recording, Smart Form, SAP Scripts and etc.
Thursday, December 6, 2012
Abap Identify Number and Characters
The following sample shows how to identify number and characters in a string.
report z_identify.
data: test(10) type c value 'ABC123456'.
data: length type i.
length = strlen( test ).
if test(length) co '1234567890'.
write:/ 'This is a number'.
else.
write:/ 'This is not a number'.
endif.
No comments:
Post a Comment