‎2007 Aug 13 7:41 AM
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
‎2007 Aug 13 7:50 AM
‎2007 Aug 13 7:52 AM
‎2007 Aug 13 8:21 AM
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
‎2007 Aug 13 8:45 AM
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.
‎2007 Aug 13 9:00 AM
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