cancel
Showing results for 
Search instead for 
Did you mean: 

closing window for standard application

Former Member
0 Kudos

Hi All,

I enhanced one of the std. app. from SAP to put in an exit btn....so whenever user clicks this btn I want to exit and close the window...

I can not use exit plugs or suspend plugs since SAP does not allow us to create exit/suspend plugs for standard application....

any ideas how i can achieve this without firing the exit plugs....

Thanks...

AS...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>

> Hi All,

>

> I enhanced one of the std. app. from SAP to put in an exit btn....so whenever user clicks this btn I want to exit and close the window...

>

> I can not use exit plugs or suspend plugs since SAP does not allow us to create exit/suspend plugs for standard application....

>

> any ideas how i can achieve this without firing the exit plugs....

>

> Thanks...

>

> AS...

Hi,

It is true, with a enhancement, you cannot create a exit plug and you cannot even make a window as interface.

I have a work around , but i do not know how far it is appreciated by other experts here.

Solution is to create custom webdynpro component with IFrame in it and create a html coding with java script to close the window.

Create a url in the memory using cl_http_server=>server_cache_upload

Set this URL to the context attribute in URL.

Via the enhancement of SAP component ,add this custom component as used component.

Embed the interface view to the window.

When exit button is pressed, fire a plug to navigate to the above interfaceView.

When you enter the inbound plug handler method, create the URL in the memory and set the URL to the context attribute.

This do the trick to close the window.

Former Member
0 Kudos

Hi Baskaran,

thanks for the reply...but unfortunately i will not be able to do that...since i am at 7.01 sp7...when i go to wda...i do not see ifram ui anymore....i guess sap took that out...

I tried using the linktourl but it opens up a new window instead opening up the url in the same window...if i can somehow open the url in the same window i can close this...as i already have javascript to close the window in my mime as an html file...

any other option?

thanks..

AS....

Former Member
0 Kudos

That is not true. Iframe is there, you have to right click the rootUIContainer and choose swaproot from context menu and select iframe.

Former Member
0 Kudos

Hi,

Another solution might be something like this , in your case is to code this in your exit_button handler.

data: lo_mr      type ref to if_mr_api,
        l_html type xstring,
        l_mime_type type string.
  lo_mr = cl_mime_repository_api=>get_api( ).

 "you have to replace this with your mime location
lo_mr->get( exporting i_url = '/sap/bc/webdynpro/sap/zzsbn_wdc_close_windows/close_window.htm'
              importing e_content = l_html
                        e_mime_type = l_mime_type ).

  cl_wd_runtime_services=>attach_file_to_response(
        exporting
          i_filename      = 'close_window.htm'
          i_content       = l_html
          i_mime_type     = l_mime_type
          i_in_new_window = abap_false
          i_inplace       = abap_true ).

Edited by: Baskaran Senthivel on Mar 11, 2011 11:36 PM

Former Member
0 Kudos

Hi Baskaran,

thanks very much for your reply....as for as the ifram ui goes....in my system...the Swarp root element is grayed out...so i can not use the iframe option...

regarding the code snipt you provided....it will work only for the custom component...I already have that for my custom component...where i am using html file in my mime repository...and closing down the parent window...

but for std. component...it does not allow me to add the mime objects...I will try again in one of my sand boxes....and let you know...

appreciate the help...

AS..

Former Member
0 Kudos

-

Former Member
0 Kudos

Hi Basakaran,

Alright instead of trying to add the mime object to the std component...i used my custom component to create the url..and it is closing down the window...

appreciate the help....thread closed...

AS...

Former Member
0 Kudos

Regarding swap root grayed out. Are you logged in a language other than English ?. Try to login with language in EN .It sounds strange but that was the case in my experience.

Answers (0)