Application Development 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: 

Error message with READ_TEXT FM

anupam_srivastava2
Participant
0 Kudos

Hi

I am getting this error msg, Text 0081399884 ID ZSH2 language

what can be the cause of the error

11 REPLIES 11

Former Member
0 Kudos

Check if standard text 0081399884 is present in the system.

If text already present, reexecute the program. It will not give error.

Regards,

Aparna Gaikwad

Former Member
0 Kudos

hi,

check wheather the data exists or not int eh TCODE.

also , try to pass the data in SE37 tcode first..

Regards,

deepthi.

0 Kudos

Hi

If data doesnt exit, for that delv num, I want to continue, want to bypass that excpetion, how can i do that.

cheers

AJ

0 Kudos

Hello,

You can just bypass the deliveries for which nod ata exits like:

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = '10'

language = 'EN'

name = 'TEST'

object = 'TEST'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = lt_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 eq 4.

continue.

"your logic can be here

elseif sy-subrc <> 0 and sy-subrc ne 4 .

error

ENDIF.

Hope this helps.

Regards,

Saneep

Former Member
0 Kudos

hi Anup,

First check ur object in table stxh...then if it exists u wnt get any error...n wht is the passing internal table type u r passing to catch the values...

data: begin of itab occurs 0,

TDFORMAT like tline-TDFORMAT,

tdline like tline-tdline,

end of itab.

you wnt get any error...

regards,

Vamshi

0 Kudos

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'ZSH2'

LANGUAGE = 'E'

NAME = l_vbeln

OBJECT = 'VBBK'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = TEXTLINES1

  • 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.

I know there is no value for this ID, But I dont want it shour give any error msg, if it doenst return any thing in TEXTLINE1

Former Member
0 Kudos

hi,

if it doesnt contain any value..it will give error msg only...write code for tht..

if itab-tdline is initial.

message e000(0)....

regards,

Vamshi

Former Member
0 Kudos

hi

it will give error messase when exception NOT_FOUND triggered.

0 Kudos

Hi Venu

how to avoid this exception, if its doesnt return any thing, it should continue.

any suggestion how can I do that.

AJ

0 Kudos

Check sy-subrc after FM call.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = p_l_id

language = p_l_lang

name = p_l_name

object = p_l_obj

TABLES

lines = t_tline

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 = 4. "text not found

"->> write your logic

endif.

"-> to check blank text

if t_tline[] is initial.

"->> write your code

endif.

Regards,

Aparna Gaikwad

anupam_srivastava2
Participant
0 Kudos

thanks all