cancel
Showing results for 
Search instead for 
Did you mean: 

Error-Page from IF_BSP_APPLICATION_EVENTS~ON_START

Former Member
0 Kudos

Hi everybody,

we have build a Single-Sign-On Scenario in the method

IF_BSP_APPLICATION_EVENTS~ON_START of an BSP-Appl..

When an error occured we want to skip to an Error-Page

an show the User what is going wrong!

The navigation to the Error-Page we wanted to realize

with the following two code-examples but they didn't work!?

The application is always running till an http 500 error occurs in the browser.

Can anybody help me with this!?

Thanks

Heinz

1. data: lo_nav type ref to CL_BSP_NAVIGATION,

lo_run type ref to CL_BSP_RUNTIME.

lo_run ?= runtime.

if not sso_error is initial.

CREATE OBJECT lo_nav

EXPORTING

runtime = lo_run.

lo_nav->exit( 'zvm_login_err.htm' ).

endif.

2. data: lo_nav type ref to CL_BSP_NAVIGATION,

lo_run type ref to CL_BSP_RUNTIME.

lo_run ?= runtime.

if not sso_error is initial.

CALL METHOD lo_nav->if_bsp_navigation~exit

EXPORTING

EXIT_URL = 'zvm_login_err.htm'.

endif.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Heinz,

In your browser, choose Tools -> Internet Options -> Advanced tab and uncheck the "Show friendly HTTP error messages" attribute.

Now if you execute your BSP on a new browser window, you might be able to see more details of the error on the browser.

Regards,

Rohini.

Former Member
0 Kudos

Hi Rohin,

thank you for your answer, but my problem is that we know

the error (trusted system ... and others) and we want it to show to the user on a friendly error page. But this didn't work.

regards Heinz

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

please tell us where did you write this code.

if it is within the event handlers of the application , you dont have to instantiate the runtime & navigation class.

Regards

Raja

Former Member
0 Kudos

Hi Raja,

thank you for your answer but sorry, the code is

inside the method IF_BSP_APPLICATION_EVENTS~ON_START

and there the navigation object isn't accessable.

So i've instantiated it but the Error-Page was'nt displayed!?

As written above the application is going on and than

the http-error occured.

Can i not stop the application in this method or skip

to an error page and exit!?

Thanks Heinz

athavanraja
Active Contributor
0 Kudos

move your code to

IF_BSP_APPLICATION_EVENTS~ON_REQUEST

IF_BSP_APPLICATION_EVENTSON_START will get called only once when it is called. but IF_BSP_APPLICATION_EVENTSON_REQUEST will get called for each and every incoming HTTP request.

and <b>runtime, request, response, navigation</b> are already available there . (click on the signature button in the application toolbar to see this).

you dont have to instatntiate them.

Regards

Raja

Former Member
0 Kudos

Hi Raja,

thanks once more! You've brought me to the right way to solve the problem. Now I'm storing the errors in a global variable and call the error-page from another place in case of an error!

Have a nice day!

Heinz

athavanraja
Active Contributor
0 Kudos

good to hear that your porblem is solved.

Can you mark this thread as answered.

Regards

Raja