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

call second line of include text

hi all,

i wud like to know whether its possible to extract text from standard text starting from the second line.

that is to say that if my include text has 2 or more lines, i want to extract data starting only from the second line onwards (or for that matter only the second line).

regards

pk

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jun 05, 2008 at 01:49 PM

    Use the funstion module READ_TEXT to get the full text.

    The result will be in the form of an internal table.

    read the second line of that internal table to get the text in the second line.

    Sample code:

    DATA          IT_TLINE TYPE STANDARD TABLE OF TLINE.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              ID                      = 'Z006'
              LANGUAGE                = 'E'
              NAME                    = L_VBELN
              OBJECT                  = 'VBBK'
            TABLES
              LINES                   = IT_TLINE
            EXCEPTIONS
              ID                      = 1
              LANGUAGE                = 2
              NAME                    = 3
              NOT_FOUND               = 4
              OBJECT                  = 5
              REFERENCE_CHECK         = 6
              WRONG_ACCESS_TO_ARCHIVE = 7
              OTHERS                  = 8.
    
    READ TABLE IT_LINE INDEX 2.
    IF SY-SUBRC = 0.
    WRITE:/ IT_TLINE.
    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Chidanand Chauhan

      well.. my idea is that i want to dispaly the captured text in the alv for the relevent line, based on certain conditions.

      well im too tired to think straight now.

      i guess i have to call it a day and rack my brains abt it first thing in the morning tomaro.

      thanx anyways.

      pk

  • Posted on Jun 05, 2008 at 01:50 PM

    Hi Prashant,

    If you would like to get the text starting from the second line then what you need to do is call the function module READ_TEXT and it will return you all the line items in one table

    Then loop at the internal table and read the text starting from the second line.

    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.