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

About the call function read text

Former Member
0 Likes
1,893

hello everyone:

I face the question as follow: We need to read the long text,but some long text is empty.when I call funtion "READ_TEXT",the system message me "no find the long text", and can not return to my programming. so I want to someone give me some help.

Regard&Thanks!

zagory

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
979

Hi zagory,

Welcome to SDN.

1. If you don't want to get message displayed on screen,

just remove * (comment)

for EXCEPTIONS.

2. Remove the * at the starting of each line.

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

3. Then message on screen won't come.

and your program will proceed further without

any problem/halt.

regards,

amit m.

7 REPLIES 7
Read only

Former Member
0 Likes
979

just comments the exception part of function module....

Read only

hymavathi_oruganti
Active Contributor
0 Likes
979

IF LONG TEXT IS NOT STORED IN stxh, stxl TABLES, U CANT READ USING read_teaxt.

u can create one using CREATE_TEXT.

SO IF U WANT UR PROGRAM TO RUN, REMOVE THE FN MODULE OR CREATE ONE AND THEN READ

Message was edited by: Hymavathi Oruganti

Read only

Former Member
0 Likes
979

Hi Zagory ,

refer <a href="http://www.sap-basis-abap.com/sapac002.htm">http://www.sap-basis-abap.com/sapac002.htm</a> for some help and code on this FM.

regards

satesh

Read only

Former Member
0 Likes
979

Hi,

Just comment the message statement in sy-subrc check after call function READ_TEXT.

Ex.

IF SY_SUBRC <> 0.

  • MESSAGE ....

ENDIF.

Hope this helps..

Regards,

Shashank

Read only

Former Member
0 Likes
980

Hi zagory,

Welcome to SDN.

1. If you don't want to get message displayed on screen,

just remove * (comment)

for EXCEPTIONS.

2. Remove the * at the starting of each line.

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

3. Then message on screen won't come.

and your program will proceed further without

any problem/halt.

regards,

amit m.

Read only

0 Likes
979

hi..

first change the header text in PO by ME22 (if u want to see its effect)

then u need three things for read text...

abject , name , its id.

then texts u got from read_text will be in WA_text...

try it and ask if problem still there

REPORT ZREADTEXT.

parameters: po like ekko-ebeln.

data : begin of itab_stxh occurs 0.

include structure stxh.

data : end of itab_stxh.

DATA: wa_TEXT like TLINE occurs 0 with header line.

data : begin of it_text occurs 0,

tdid like itab_stxh-tdid,

tdline like tline-tdline,

end of it_text.

select * into corresponding fields of table itab_stxh from stxh where

tdname = po.

loop at itab_stxh.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = itab_stxh-tdid

language = sy-langu

name = itab_stxh-tdname

object = itab_stxh-tdobject

tables

lines = wa_text

loop at wa_text.

MOVE wa_TEXT-TDLINE TO IT_text-TDLINE .

move itab_stxh-tdid to it_text-tdid.

APPEND IT_text .

endloop.

break-point.

write : / itab_stxh-tdid, itab_stxh-tdobject.

endloop.

loop at it_text.

write : / it_text-tdid, it_text-tdline.

endloop.

Message was edited by: Madan Gopal Sharma

Read only

vinod_gunaware2
Active Contributor
0 Likes
979

hi

Check sy-subrc is zero or not.

if it is not zero then put corresponding message in ur

log that is internal table and display that log as report at end of program.

regards

vinod