cancel
Showing results for 
Search instead for 
Did you mean: 

Close the IE page on click of a button in the transaction

0 Kudos

Hi All,

I have a button on the transaction and once I click the button it should log off from the SAP WEB AS and close the Internet Explorer page.

Can anyone guide me through the process?

Thanks in advance,

Sudhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I'm not sure if this will help you, but its a easy way:

The ITS Command for Logoff is "~command=logoff". Then you'll have to close the IE by a script (window.close();).

yours Michael

0 Kudos

Hi Michael,

Thanks for your reply but do you have any idea as to how I can do this via a button in my transaction?

athavanraja
Active Contributor
0 Kudos

from your earlier i understand that you use integrated ITS, so my answer is going to be based on that.

in your program add the following :

include AVWRTCXM .

and write the following code for button click.

field-set '~OkCode' 1 '/NEX' .

its-browser_redirect 'XXX'.

now go to SICF

navigate to your service under sap/bc/gui/sap/its/

double click on the service

choose error pages tab

then choose logoff page tab

make sure "explicit response time" radio button is selected.

Click on the create icon next to "Body" in the resulting window enter the following text

Thanks for using ITS
<a href="#" anclick="windaw.clase();">
click here to close this window
</a>

in this line (anclick="windaw.clase();) change the alphabet 'a' to 'o' .

Save the service.

and test the same.

Regards

Raja

Message was edited by:

Durairaj Athavan Raja

0 Kudos

Hi Raja,

Awesome solution !! Full points to you Also I noticed that the configuration in the SICF is not necessary. And if I put that code that you mentioned in the SICF then the BODY of the HTML page will contain of only the code that I put in and the transaction in not called.

But the include and the field set options worked for me.

Thanks a ton for your solution.

Best regards,

Sudhi

former_member228142
Active Contributor
0 Kudos

Hi Sudhi,

I would suggest to use note 959417. This note describes a new feature of the SAP kernel which automatically deletes the SAP session at the end of the transaction. So you just have to process a LEAVE PROGRAM in ABAP after clicking the button to get the session deleted. If you need the browser window to be closed you can do it as described by Raja.

Best regards,

Klaus

athavanraja
Active Contributor
0 Kudos

Klaus,

Thanks for the information.

i would like to have your thoughts on the following.

when i am viewing a transaction on the browser (SAP GUI for HTML) if i click menu->system->logoff i was expecting that the details maintained under errorpages->log off page tab (sicf) to take effect (redirect url or explicit response) however it just comes back to the same screen. Is it by design, or do i miss something. we are on was6.40 sp11

Thanks in advance.

Regards

Raja

former_member228142
Active Contributor
0 Kudos

Hi Raja,

I would expect that the works as you described, but never used it. I will try it out but I have only the latest 6.40 SP for the test.

Regards,

Klaus

athavanraja
Active Contributor
0 Kudos

Thanks Klaus,

So its not by design, something wrong in my patch level. I will try and figure out whats going wrong and post the results here.

Regards

Raja

former_member228142
Active Contributor
0 Kudos

Hi Raja,

I tested it and found out that my last answer was wrong. What you observed is by design!

WebGUI uses a frameset for session management as well as for being able to render pages flicker free by using double buffering. If you use the URL redirect feature of ICF, the server response is received in an invisible frame. Therefore you still see the last webgui page. Some time ago a guy from my team created note 916727 which suggest to use an explicite page which instead does the redirect. The note describes what should be in the body of the page. I hope that helps you.

Best regards,

Klaus

athavanraja
Active Contributor
0 Kudos

Thanks Klaus, you saved my time And thankyou very much for the clarification.

Regards

Raja

Answers (0)