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

FM

Former Member
0 Likes
542

Dear All,

I am using fm READ_TEXT_INLINE inside a loop.

Here the problem for some record of the internal table the fm showing exception due to this the program execution stops.But what i want is if the FM does not give the output it has to take next record instead of providing the exception message or error message.

As it is a standard FM it is not possible to change the FM.

Please provide me the solution.

i tried the following solution

i keep exit if sy-subrc ne 0. but it did not work.

Thanks in advance

5 REPLIES 5
Read only

Former Member
0 Likes
521

Hi shoban,

Try with using

IF sy-subrc NE 0.

CONTINUE.

ENDIF.

Read only

0 Likes
521

sorry continue not working

Read only

Former Member
0 Likes
521

Loop through the table first.. look for error which is causing the raise in expeption and then call the function with the new itab.

Regards,

Aparna

Read only

0 Likes
521

Hi Aparna,

i did not get you.

can you plz explain more clearly

In the program i looped at an internal table.In side i had written one perform.In that perform i called the FM.

Read only

0 Likes
521

Hi shoban,

if u have used the FM inside a perform. then u can try like this.

DATA gw_flag(1) TYPE c.

LOOP AT itab.

CLEAR gw_flag.

PERFORM read_text.

IF gw_flag = 'X'.

CONTINUE.

ENDIF.

ENDLOOP.

&----


*& Form read_text

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM read_text .

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id =

language =

name =

object =

archive_handle = 0

local_cat = ' '

IMPORTING

header =

tables

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

gw_flag = 'X'.

EXIT.

ENDIF.

ENDFORM. " read_text