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

in the read_text function module, how to find the lines

The coding follows like this,

call function 'READ_TEXT'

exporting

client = sy-mandt

id = id

language = sy-langu

name = name

object = object

importing

header = header

tables

lines = tab

exceptions

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

others = 8.

can u provide me with the correct data form which i can read the lines.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Dec 09, 2005 at 09:47 AM

    hi you need to provide Object ID, NAme properly....

    for Object ID's you can refer these STXH,STXl tables

    and find the ID's.

    then pass them to FM, read the lines(<b>tab</b>) (lines will have text for that id).

    regards

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2005 at 09:40 AM

    The internal table 'tab' will have the text.

    You can read the lines from the 'tab' internal table.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2005 at 09:46 AM

    Hi,

    After that IT_LINES will have the text which is in Standard Text. If you want to write that text:

    Loop at IT_LINES.

    WRITE :/ IT_LINES.

    Endloop.

    Regards,

    Sudhakar.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2005 at 09:49 AM

    Find TDID,TDNAME from STXH(header),STXL(item) tables

    and you can get the text corresponding...

    loop that itab and write the text.

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2005 at 09:41 AM

    Hi,

    DATA: it_lines LIKE tline OCCURS 0 WITH HEADER LINE.

    ID = ST(Standard Text)

    NAME = Standard text name which you want to read

    OBJECT = TEXT

    LINES =

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    id = 'ST'

    language = sy-langu

    name = 'ZSAMPLETEXT'

    object = 'TEXT'

    TABLES

    lines = it_lines

    EXCEPTIONS

    id = 1

    language = 2

    name = 3

    not_found = 4

    object = 5

    reference_check = 6

    wrong_access_to_archive = 7

    OTHERS = 8.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    Reward points if it helps you.

    Regards,

    Sudhakar.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2005 at 09:46 AM

    I think this code will help you to read the lines

    *--LOCAL VARIABLES

    DATA : LV_NAME TYPE THEAD-TDNAME,

    LV_TEMP(128) TYPE C ,

    *--Structure to Hold the Header Data for Func Modules

    *--Read_text

    X_HEADER TYPE THEAD .

    CLEAR : LV_NAME ,

    LV_TEMP ,

    V_IND_FG ,

    X_HEADER ,

    IT_TLINES ,

    IT_TLINES[] .

    LV_NAME = P_DELV_NO .

    X_HEADER-TDOBJECT = 'VBBK'.

    X_HEADER-TDNAME = LV_NAME .

    X_HEADER-TDID = 'ZMAN'.

    X_HEADER-TDSPRAS = 'E'.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    CLIENT = SY-MANDT

    ID = X_HEADER-TDID

    LANGUAGE = X_HEADER-TDSPRAS

    NAME = X_HEADER-TDNAME

    OBJECT = X_HEADER-TDOBJECT

    TABLES

    LINES = IT_TLINES

    EXCEPTIONS

    ID = 1

    LANGUAGE = 2

    NAME = 3

    NOT_FOUND = 4

    OBJECT = 5

    REFERENCE_CHECK = 6

    WRONG_ACCESS_TO_ARCHIVE = 7

    OTHERS = 8.

    IF SY-SUBRC <> 0.

    ERROR.

    CLEAR :IT_TEXT,

    IT_TEXT[] .

    V_IND_FG = 'X' .

    EXIT .

    ENDIF.

    LOOP AT IT_TEXT .

    IT_TLINES-TDFORMAT = '*'.

    IT_TLINES-TDLINE = IT_TEXT-LINE.

    APPEND IT_TLINES.

    CLEAR IT_TLINES.

    ENDLOOP.

    Thanks,

    Koshal

    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.