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 : Does not return Text

Former Member
0 Likes
2,262

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,800

helo can anyone reply me pls?

11 REPLIES 11
Read only

Former Member
0 Likes
1,801

helo can anyone reply me pls?

Read only

0 Likes
1,800

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

Read only

0 Likes
1,800

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.

Read only

0 Likes
1,800

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.

Read only

pawan_rai
Participant
0 Likes
1,800

is it a smartform or a report?

Read only

Former Member
0 Likes
1,800

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,

Read only

Former Member
0 Likes
1,800

Put your text object in single quotes...'CCIHT_IP0000000000000000000000000000000000000000'

Read only

Former Member
0 Likes
1,800

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.

Read only

Former Member
0 Likes
1,800

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

http://www.sapdev.co.uk/sapscript/sapscript_texts.htm

Read only

Former Member
0 Likes
1,800

Hi

Check are you missing any conversion exist before reading the data.

Regards,

Raghu.

Read only

pawan_rai
Participant
0 Likes
1,800

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