Application Development and Automation 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: 
Read only

Function Module

Former Member
0 Likes
1,277

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

thanx in advance,

regards,

altaf.

1 ACCEPTED SOLUTION
Read only

andreas_mann3
Active Contributor
0 Likes
961

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
Read only

Former Member
0 Likes
961

Use function module NUMERIC_CHECK

Read only

Former Member
0 Likes
961

Hi,

you can also use describe.

DESCRIBE FIELD l_filed type l_type.

Read only

andreas_mann3
Active Contributor
0 Likes
962

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

Read only

Former Member
Read only

Former Member
0 Likes
961

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.

Read only

Former Member
0 Likes
961

I would recommend using the Describe statement.

That seems more straight forward.

Read only

Former Member
0 Likes
961

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

Read only

0 Likes
961

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

Read only

0 Likes
961

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.