Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module

Former Member
0 Kudos

is there any function module to check whether a field is of numeric data type.

thanx in advance,

regards,

altaf.

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos

Hi,

or try with command catch (F1)

CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
  MOVE text TO amount.
ENDCATCH.
IF sy-subrc EQ 1.
*not numeric

...

Andreas

9 REPLIES 9

Former Member
0 Kudos

Use function module NUMERIC_CHECK

Former Member
0 Kudos

Hi,

you can also use describe.

DESCRIBE FIELD l_filed type l_type.

andreas_mann3
Active Contributor
0 Kudos

Hi,

or try with command catch (F1)

CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
  MOVE text TO amount.
ENDCATCH.
IF sy-subrc EQ 1.
*not numeric

...

Andreas

former_member214131
Active Contributor

Former Member
0 Kudos

Hi, a simple way is

IF FIELD CN '0123456789'.

  • if go here, it include a no-digital char

ENDIF.

But this solition is too simple, maybe can't be useful for many case.

Former Member
0 Kudos

I would recommend using the Describe statement.

That seems more straight forward.

Former Member
0 Kudos

Did the answers posted here help you solve your problem? If so, please reward them and close the post. The incentive for the people answering these posts is your recognition of their time and effort put into answering these questions. If you don't respond back with a thank you or further questions(if it is not solved), then that incentive is lost and the forum will be dead.

Please reward the posts that helped and close the thread.

Srinivas

0 Kudos

how do i give points, by checking the radio buttons, for the concerned person?

0 Kudos

yes , give max point to person whose answer solved your problem, i.e. 10 and it can be given to only one person.

and very helpful and helpful accordingly .

just click the radio buttons

but not mine one.

regards.