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

AlphaNumeric and Numeric Strings

Former Member
0 Likes
1,039

HI all,

IS there a easy way to test for an alpha Numberic characters in a String.

In my Report, i have to check if the Company Code is Numeric or Alpha Numeric.

Thanks in Advance.

Ravi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
931

IF BUKRS CO '0123456789'.

*-- it has numbers only

ELSE.

*-- alpha numeric

ENDIF.

4 REPLIES 4
Read only

Former Member
0 Likes
932

IF BUKRS CO '0123456789'.

*-- it has numbers only

ELSE.

*-- alpha numeric

ENDIF.

Read only

Former Member
0 Likes
931

Hi Ravi;

If wf_string co '0123456789'.

...do something.

else.

...do something else.

endif.

Cheers,

John

Read only

0 Likes
931
report zrich_0001.

parameters: p_bukrs type t001-bukrs.


start-of-selection.


  if p_bukrs <b>ca sy-abcde.</b>
    write:/ 'The company code contains at less one alpha character'.
  endif.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
931

A check can be made by using the statement string CO '0123456789' for numeric. if not it is alpha numeric. If you need a conversion then you can use the FM conversion_exit_alpha_input (external -->internal)or conversion_exit_alpha_output(Internal --> to external)