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: 

AlphaNumeric and Numeric Strings

Former Member
0 Kudos

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

Former Member
0 Kudos

IF BUKRS CO '0123456789'.

*-- it has numbers only

ELSE.

*-- alpha numeric

ENDIF.

4 REPLIES 4

Former Member
0 Kudos

IF BUKRS CO '0123456789'.

*-- it has numbers only

ELSE.

*-- alpha numeric

ENDIF.

Former Member
0 Kudos

Hi Ravi;

If wf_string co '0123456789'.

...do something.

else.

...do something else.

endif.

Cheers,

John

0 Kudos
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

Former Member
0 Kudos

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)