cancel
Showing results for 
Search instead for 
Did you mean: 

Closing window with scripting

petergeukens
Explorer
0 Kudos

Hi,

I have 'Fiorinized' the MIGO transaction with personas & added it to the Fiori Launchpad.

So far so good.

The only issue i have now is the back button.

In most tutorials they use the standard back button & change the icon to a more Fiori look.

The problem is that when you click the back button you end up in the start transaction of SAP (SMEN).

The wanted behavior should be that the (new) tab where the MIGO was openend, is closed.

I tried through scripting with window.close & a few other variants, but I don't get it working.

Any ideas on how to tackle this?

Thanks in advance!

Peter

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

two things you missed:

1: There is an extra url paramter needs to be used in your url (for Personas 2.0), then window.close() will work.

2: There will be a little more complex statement than .close().

Br,

Dong

clemens_gantert
Active Participant
0 Kudos

Hello Peter,

you can use the following script:

top.close();

But this will only work if the tab was opene via a script.

Cheers,

Clemens

Former Member
0 Kudos

Hi Peter,


'Catch the second screen

Set Session2 = GetObject("SAPGUI").GetScriptingEngine.Children(0).Children(1)

'Close it

Session2.ActiveWindow.Close

Kr,

Bart.