‎2011 Apr 11 8:54 AM
hi masters,
i am using FM : READ_TEXT but it does return the long text in EH&S module for the TCODE : CBIH82.
to the FM : I am passing below values.
Text Name : CCIHT_IP0000000000000000000000000000000000000000
Language : EN
Text ID : 0001 EHS: Text ID for Pers. Invlvd
Text Object : C_SHES_INP EHS: Docu for Persons Involved
it does not return the values.
next thing I have checked the TABLE : STXH.
I have passed the above values...the table does not contain text/
what would be wrong can i have some idea pls?
thank you,
pasala.
‎2011 Apr 11 10:44 AM
‎2011 Apr 11 10:44 AM
‎2011 Apr 11 10:55 AM
hi,
Call function 'Read_Text' ,
And EXPORTING the CLIENT as SY-MANDT,
id which is define by you. in language you call as sy-langu, name in your text name.
Its helps to read your text.
regards
kamal kishore
‎2011 Apr 11 11:10 AM
thank you for the reply...
i have gone to long text double clicked gone to GOTO-> HEADER.
Took all the parameters and passed :
ex :
Client : 026
Text Name : CCIHT_IP0000000000000000000000000000000000000000
Language : EN
Text ID : '0001; " EHS: Text ID for Pers. Invlvd
Text Object : 'C_SHES_INP' " EHS: Docu for Persons Involved
still results are same says : EXCEPTION : TEXT NOT FOUND.
Thank you,
pasala.
‎2011 Apr 12 2:19 PM
There are so many posts on READ_TEXT and it is so incredibly easy to use...you should search the forum... in the meantime, consider this (debug if required):
data: ls_thead type thead,
lt_lines type table of tline.
. . .
clear: lt_lines, ls_head.
ls_thead-tdspras = sy-langu.
ls_thead-tdobject = 'C_SHES_INP' .
ls_thead-tdid = '0001'.
ls_thead-tdname = 'CCIHT_IP0000000000000000000000000000000000000000'.
select single * from stxh into ls_thead
where tdobject eq ls_thead-tdobject
and tdname eq ls_thead-tdname
and tdid eq ls_thead-tdid
and tdspras eq ls_thead-tdspras.
if sy-subrc eq 0. "text exists...
call function 'READ_TEXT'
exporting
id = ls_thead-tdid
language = ls_thead-tdspras
name = ls_thead-tdname
object = ls_thead-tdobject
tables
lines = lt_lines
exceptions
others = 0.
else.
* no text exists...what to do?
endif.
if lines( lt_lines ) gt 0.
*.....process your text.
endif.
‎2011 Apr 11 10:53 AM
‎2011 Apr 11 11:04 AM
Thank you for the reply....
am using it in the REPORT.
I have long text in TCODE : CBIH82.
So to call the long text am using the FM : READ_TEXT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = '0001'
language = 'E'
name = CCIHT_IP0000000000000000000000000000000000000000
object = 'C_SHES_INP'
IMPORTING
header = lt_head
TABLES
lines = lt_line
EXCEPTIONS
id
language
name
not_found
object
reference_check
wrong_access_to_archive.
THE EXCEPTION I GET IS : TEXT NOT FOUND.
I went to TCODE : CBIH82 to check the TEXT : IT IS THEIR.
looking for your feed back pls,
‎2011 Apr 11 11:09 AM
Put your text object in single quotes...'CCIHT_IP0000000000000000000000000000000000000000'
‎2011 Apr 11 11:14 AM
Hi Nagarjuna,
thanks for the reply...
however even if i execute via SE37 i must able to get the text...how can we put in single quotes?
thank you,
pasala.
‎2011 Apr 12 12:17 PM
u can define like
DATA itab LIKE tline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = '0001'
language = 'E'
name = name
object = 'VBBK'
TABLES
lines = itab
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
and also check following link
‎2011 Apr 11 10:53 AM
Hi
Check are you missing any conversion exist before reading the data.
Regards,
Raghu.
‎2011 Apr 12 6:30 AM
hi,
The problem is that your passing the text name parameter from the header in your t-code.Instead of that just before the read text pass a paramter of type on basis of which your picking your values and pass it to the text name.
For eg.
LOOP AT it_final.
name = it_final-matnr.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = '
language = '
name = name
object = 'MATERIAL'
archive_handle = 0
local_cat = ' '
IMPORTING
HEADER =
TABLES
lines = txline
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.
READ TABLE txline INTO wa_txline.
it_final-maktg = wa_txline-tdline.
ENDIF.
endloop.
regards,
pawan