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

How to read Line Type value

Hi All,

I have used fm to split long text using fm TR_SPLIT_TEXT and result is storing in one Line type

TRTEXT then i have decleared one internal table like this

data : it_text type standard table of TRTEXT,

wa_text type IT_TEXT.

But while i am running loop on this i am getting only first charater of line

ex. suppose after spliting text i have got 3 lines then it is taking only first character of line so how read every line from loop. condition for loop i have wrote like this.

DATA : A(70) TYPE c.

LOOP AT IT_TEXT INTO WA_TEXT.

IF SY-TABIX = 1.

A = WA_TEXT.

ENDIF.

ENDLOOP.

Please give me solution.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2009 at 08:53 AM

    hi ,

    what is the length of the strign ur splitting ,

    ur splitting the strign in to one line ,

    but if u want the lenght then u can give in the variable v_len

    based on lenght u can get lines of the lenght

    and once u get in the table then u can loop it through

    and get the value

    regards

    afzal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2016 at 11:32 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2009 at 08:43 AM
    -1

    HI,

    Check this code..

    data : it_text type standard table of TRTEXT,
              wa_text like line of  IT_TEXT.     "--> Check here
    
    DATA : A(70) TYPE c.
    LOOP AT IT_TEXT INTO WA_TEXT.
    Write:/ WA_TEXT.
    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2009 at 08:48 AM
    -1

    HI,

    make internal table having one field of type TRTEXT , it will solve ur problem

    do like this :

    *declaring structure
    types : begin of itab1 
               line type TRTEXT 
              end of itab1.
    
    *declaring internal table and workarea
    data : it_text type standard table of TRTEXT,
    wa_text type IT_TEXT. 
    
    now store the reult in the inernal table it_text.
    
    then apply loop to read each line of result:
    
    DATA : A(70) TYPE c.
    LOOP AT IT_TEXT INTO WA_TEXT.
    IF SY-TABIX = 1.
    A = WA_TEXT.
    ENDIF.
    ENDLOOP

    regards

    rahul

    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.