Skip to Content
0
Former Member
Oct 31, 2007 at 01:33 AM

different result page when I use the catch exception

10 Views

Hi all,

I write a programe like this:

-


report zXXXX.

....

PERFORM insert_to_table.

FORM insert_to_table .

TRY.

INSERT z01peopday FROM TABLE it_peopday.

CATCH CX_SY_OPEN_SQL_DB into xref.

message_txt = xref->GET_TEXT( ).

message message_txt type 'E'.

CATCH CX_SY_SQL_ERROR INTO xref.

message_txt = xref->GET_TEXT( ).

message message_txt type 'E'.

ENDTRY.

ENDFORM.

-


the catch block will catch the exception when there is a exception occured at inserting.but the page will de stopped at the blank page with some infomation on the status bar. but it will not go back to the original page.I mean,the page will go to the original page if there is no exception occured. I have catch the exception,but why the result is defferent? and how to let the page go to the original page?

thanks.