Skip to Content
avatar image
Former Member

problem with ABS function

Hello Everyone,

i have a serial number which has been defined in global defination of smartforms as STRING .

The serial number can be numeric , alphabet or alphanumeric .

when it is numeric , then it displays numbers as 000000000011112345 .

so what i have done is i used the function 'ABS' .

This function works fine when the serial number is numeric but it gives a short dump when the serial number is alphabet or alphanumeric .

any suggestions gurus .

sumit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 26, 2010 at 10:43 AM

    Hi

    Store all characters in a string say

    and check the following condition.

    c1 = 'abcdefghijklmnopqrstuvwxyz'
    if var1 ca c1.
    <do nothing>
    else
    var2 = abs(var1).
    endif.
    

    Hope this helps

    Thanks

    Mani

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 26, 2010 at 10:35 AM

    Hi

    try to use the TRY CATCH statment.

    Best regards

    Marco

    Add comment
    10|10000 characters needed characters exceeded