Skip to Content
author's profile photo Former Member
Former Member

Length

Hi experts!!

Do you if theres a way on how to get the lenght of a variable.

example::

wa_itab-field1

i need to get watever length it will have..

somewhat dynamic..please help me..

more points!!!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 13, 2007 at 03:30 AM

    first of all you have to take the variable value in a character variable...

    declare like this

    data : vchar(50) ,

    len type i.

    vchar = wa_itab-field1.

    len = strlen( vchar ).

    write : / len.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 13, 2007 at 03:28 AM

    Data l_len type i.

    l_len = strlen(wa_itab-field1).

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 13, 2007 at 03:29 AM
    PARAMETER : p_c(20) TYPE c.
    DATA : len TYPE i.
    DATA : str TYPE string.
    str = p_c.
    len = strlen( str ).
    WRITE : len, str.

    Check this code

    Regards

    Gopi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 13, 2007 at 03:30 AM

    Aswlkm,

    DATA: salma(5),

    LEN TYPE I.

    DESCRIBE FIELD SALMA LENGTH LEN IN CHARACTER MODE.

    RESULT:- LEN = 5.

    K.Kiran.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.