Skip to Content
avatar image
Former Member

HOW TO FIND LENTH OF NUMERIC FIELDS

HOW TO FIND LENTH OF NUMERIC FIELDS

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Aug 22, 2007 at 06:44 AM

    pass it to string field and use STRLEN function.

    <b>data: v_str type string,

    v_len type i.

    v_str = v_num.

    v_len = STRLEN( v_str ).</b>

    Regards,

    Amit

    Reward all helpful replies.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 06:48 AM

    Hi

    check this code :

    data: len type i.

    DATA : a type string.

    a = '23232323'.

    len = strlen( a ).

    write : len.

    or use DESCRIBE Statement

    DATA: FLD(8),

    LEN TYPE P.

    DESCRIBE FIELD FLD LENGTH LEN.

    -charitha

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 22, 2007 at 06:49 AM

    Hi..

    You can Use the command DESCRIBE FIELD .

    Eg:

    data : var1 type i.

    DATA : V_LEN TYPE I.

    DESCRIBE FIELD VAR1 LENGTH V_LEN.

    WRITE: 'length of var1 = ' , v_len.

    <b>Reward if Helpful</b>

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 22, 2007 at 06:49 AM

    Hi,

    DATA: len type i.

    Use DESCRIBE FIELD num_val LENGTH len.

    Regards,

    Sesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 07:06 AM

    Check the below code:

    data: vCHAR type STRING,

    VLEN TYPE I,

    XLEN TYPE I.

    XLEN = 12345.

    vCHAR = XLEN.

    vlen = strlen( VCHAR ).

    write:/ vLEN.

    with regards,

    Kishore

    Add comment
    10|10000 characters needed characters exceeded