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: 

Find if a char field contains non numeric values or vice-versa.

Former Member
0 Kudos

Good Morning,

I have a field defined as:

data: x_swenr type swenr.

swenr being a char(8).

The field x_swenr can contain non numeric values (alfanumeric).

What i need is a function or piece of code that can tell me if this field contains only numeric values, or both (alfanumeric and numeric).

Regards,

Pedro Gaspar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
3 REPLIES 3

Former Member
0 Kudos

Former Member
0 Kudos

Hi pedro,

1. simple - use the FM NUMERIC_CHECK

2. it will give parameter

HTYPE = CHAR (in case of alphanumeric)

= NUMC (in case of numbers)

= CHAR (in case of numbers with DECIMAL DOT)

regards,

amit m.

Former Member
0 Kudos

Check for numeric


if x_swenr CA '1234567890'.

Check for Alpha


if x_swenr CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.