cancel
Showing results for 
Search instead for 
Did you mean: 

is there a ¿ is number function ? in the link editor

Former Member
0 Kudos

Good afternoon all,

I would like to test if a character is a number or a string .  ¿ How can I do it ? .  I can not find any function in the link editor .

Thanks in advance,

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Yes, the number function exists, and will error if it is a string (non-number):  http://help.sap.com/saphelp_mii150sp00/helpdata/en/4c/c8a0fc8e9b60c5e10000000a15822d/content.htm?fra...

former_member196557
Active Contributor
0 Kudos

If you use the number() function here are the results you will get:

number("300") returns 300

number("abcde") returns error

number("301abcde100") returns 301

number("abde300") returns error

a better way to test for a number only vs an alphanumeric string is to use the format function like this:

format(300,"#") returns 300

format("300","#") returns 300

format("abcde","#") returns error

format("301abcde100") returns error

format("abde300") returns error

regards, Steve

Former Member
0 Kudos

thanks,

I want the outcome to be like yes or not .  Is it possible ¡?

Best regards,

Former Member
0 Kudos

thanks,

I want the outcome to be like yes or not .  Is it possible ¡?

Best regards,

former_member196557
Active Contributor
0 Kudos

If you want a yes/no result, you will need t build an MII transaction that you can call with the required inputs and outputs for your needs. Withiin the transaction, perform an  assignment to a local variable and catch any exception and handle as appropriate.

Regards, Steve

Former Member
0 Kudos

Hi

You can also use match function.

match( stringValue, matchString)

in match string you can provide valid regex (regular expression).

this will return value as true or false.

Regards

Anshul

Answers (0)