cancel
Showing results for 
Search instead for 
Did you mean: 

Close Window

Former Member
0 Kudos

Hi,

In my scenario I closed a external browser window by defining an exit plug for the window and calling a javascript window.close()

in one of my component.

I am trying to use the same functionality in another component which defines a component usage to the above component. But this doesnt work!

I hope i am clear of my requirement.

Please suggest how to go about this .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

see also the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/04a5421935c511e10000000a1550b0/frameset.htm">documentation</a> with the section on closing the browser window.

Regards, Heidi

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sascha,

I tried your suggestion.

But in the Component 2 i can register only to the events defined by the 'Component Controller' of Component 1.

I have defined an action named Close_Window in the View controller of Component 1.

Is there any way to register to this action ?

Former Member
0 Kudos

You can fire the event of the component controller in the action handler of the

action. Just use the wizard. If you have defined the event in component controller

of component1 you can just call the component controller method fire_on_... in

any view of component1.

Cheers,

Sascha

Former Member
0 Kudos

Hi Veena,

While opening window of component 1 you can pass the reference of component 2's window and once you click on the action you can call Close_Window using component2 windows reference ..

Hope this helps.

Regards,

Anoop

Former Member
0 Kudos

Hi All,

Thanks for your quick response.

I have two components

Component 2 uses Compoent 1

The close window functionality works fine for the Component 1 but the same does not work for compnent 2.

I did this using SICF service.

I cannot make use of l_window_manager->create_window because i have to pass a URL to the created window.

OR is there any way i can display the application in the same window ?

I tried using Absolute navigation with "inplace" option but inspite of this it opens the given URL in a seprate browser window.

I also tried using Exit plug with URL parameter...this too does not work ...

Thanks,

Veena.

Former Member
0 Kudos

Hi Veena.

In this case you could define an event in component 1 which is fired when the

application tries to close. Component 2 registers for this event and will itself use

the same close functionality as you have defined it in component 1 via exit plug.

Cheers,

Sascha

Former Member
0 Kudos

Hi Veena,

i was just wondering where you could write a java script in WD ABAP .. anyways .. if you want to close the window then you can call close() method with windows reference .. or else you just need to make use of following code while creating your window and close functionality will be taken care by framework..

CALL METHOD l_window_manager->create_window

EXPORTING

modal = abap_true

window_name = 'RPLM_DOCUMENT_WINDOW'

title = lv_document_txt

close_button = abap_true

RECEIVING

window = l_window.

If you are using WD JAVA then please post in another forum where experts in WD JAVA could help you .. also close this thread if the issue is resolved or you have decided to post it on another forum ..

Regards,

Anoop

Former Member
0 Kudos

Hi Anoop.

You can write the mentioned java script when you go to SICF to the service of the

WDA application. There you can define some pages, including the exit page.

Here you are free to code.

Cheers,

Sascha

Former Member
0 Kudos

Thanks a lot for the piece of info Sascha

Have a great day.

Regards,

Anoop