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

checking Character and numeric value problem

Former Member
0 Likes
955

Hi all,

Actully in my development system i am having the data of PO number like '1234test stk'

But actually my requiremnt is if that number is numeric means i have to display that value other wise if that is a character or numeric character i dont want to display that value in my output.that field should be empty.if it is numeric value means i have to display that total numeric value i have to display in my output.How to check that numeric and character value.pls if u know the solution PLs write code for me.pls this is urgent requiremnet for me.

Regards,

lokesh goud.

7 REPLIES 7
Read only

Former Member
0 Likes
911

hI..

DATA:

W_NUMC(10) TYPE N.

<b>IF W_PO CA '0123456789'.

W_NUMC = W_PO.

WRITE : W_NUMC.

ENDIF.</b>

This prints the PO value if it contains any numeric value..

if u want to print when PO only contains numerals..

use CO instead of CA in above code..

Read only

amit_khare
Active Contributor
0 Likes
911

Use FM - NUMERIC_CHECK

Regards,

Amit

Read only

Former Member
0 Likes
911

check this

if PO<b> CS</b> '0123456789' then

display the result

u can see abapdocu to know more abt CS

Read only

Former Member
0 Likes
911

use this

if V_VALUE CO '0123456789'.

  • do the total

endif

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
911

You can check if PO CN '0123456789'. dont display else. display. endif.

Sandeep

Reward if helpful

Read only

Former Member
0 Likes
911

hi,

use string comparison operator 'CO'.

if PO_NUMBER CO '0123456789'.

  • Display in the output

else

  • Don't display in the output

endif.

Read only

Former Member
0 Likes
911

hi.

If po co '0123456789 '.

do

endif.

regards,

ananth.