Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

READ_TEXT Not displaying correct data

Former Member
0 Likes
719

HI abapers,

I am using the FM READ_TEXT for reading change document long text , for some document it gives correct data but for some other doc it give some unrelated data , when i debug i found in IMPORT statement inside the FM gives this unrelated data.

this is my call to FM ..

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = 'AENR'

language = sy-langu

name = tname

object = 'CHANGE'

IMPORTING

header = htext

TABLES

lines = ltext

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

and import statement that gives is in SAPLSTXD program and in LSTXDFDB include line no 98

import tline to rt_lines

from database stxl(tx)

client rt_client

id stxl_id

ACCEPTING TRUNCATION

IGNORING CONVERSION ERRORS.

this import gives worng data to rt_lines.please help in this regard.

thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
634

Hi,

// check this code . I think you need to comment the importing and header

FORM READ_TEXT .

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'ST'

LANGUAGE = SY-LANGU

NAME = VNAME

OBJECT = 'TEXT'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = G1_MYTABLE

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.

Read only

0 Likes
634

But it works well for some documents , this problem exists only for some documents...more over in quality system it works fine for all document only in produciton it is a problem ...

any idea where i can directly fetch the text from table also will be helpful. i can reaplace this FM ...

Read only

0 Likes
634

Hi,

Change ID = 'ST'

OBJECT = 'TEXT'

Edited by: Ravi.Seela on Dec 15, 2011 7:15 AM

Read only

0 Likes
634

Hello Friend,

I think you need to do a client copy of the data to the production system also so that it will also work fine in all the systems.

Please look these links also it might be useful for you regarding this issue.

http://help.sap.com/saphelp_nw70/helpdata/en/d6/0db8c8494511d182b70000e829fbfe/content.htm

Thanks,

Sri Hari