cancel
Showing results for 
Search instead for 
Did you mean: 

Reopen the WD application

Former Member
0 Kudos

hi, dear all:

Now, i have encountered one tough issue:

In my WD, i have one button named "Refresh" in the main view

Now, i want the WD application will execute again( that means just like when we execute the application first time when we test the WD application) when the user presses the button "Refresh"..

The requirement is:

We want the Window doesnot close(and open again)..the better is : user can not know that he execute the WD once more...

I have tried some ways, but it doesnot work very fine.

Now, can any friend give me some advice on this issue?

Thanks very much.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

wht u can do is...put the entire code in modify view....and u dont need to put any code in button action

bcoz whnever a button(in ur case refresh) will b clicked.....an event wil b generated...bocz of which modify view wil b again executed....and hence the data wil be refreshed....

Answers (5)

Answers (5)

Former Member
0 Kudos

We will find the way.

former_member186491
Contributor
0 Kudos

Hi,

May refer following thread --

[;

Thanks.

Kumar Saurav.

former_member186491
Contributor
0 Kudos

Hi Edison,

You can code for opening web-link on pressing of your Button 'REFRESH'. While calling web-link, you can pass 'Application-URL' and set the Browser-Window' to be same. This way you can achieve your requirements.

Add a linktourl UI in your view.

and in the reference properly give YOUR_APPLICATION_URL

[http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/25/e2f0416ab6da6fe10000000a1550b0/content.htm]

For using same window, you can set TARGET.

This way that same application would get opened up with all its nodes refreshed.

Hope this would be of some help.

Thanks.

Kumar Saurav.

Edited by: Kumar Saurav on Jan 11, 2011 8:21 AM

Former Member
0 Kudos

ya..This method we have tried already..However the customer does need the "Button"..

Thanks all the friends.

Best wishes,

Former Member
0 Kudos

thanks the upper 2 experts.

However, just like what i said before:

i don't want the main window of this WD application to be closed..

we don't want to put all coding( WddoInit in Component contorller, plug-hanlder of main window..) in the WdDoModifyView...

And we provide one button "Refresh", we don't want to execute the F5..

Thanks again..

gill367
Active Contributor
0 Kudos

I dont understand what is the problem in using an exit plug and firing it in the event handler of the button refersh.

give it the url of same application and fire it.

it will open in the same window just like you have run the application again.

please revert back if you want furthere assistance in firing the exit plug

thanks

sarbjeet singh

gill367
Active Contributor
0 Kudos

use exit plug and in the url parameter give the parameter for the same application

have you tried this?

thanks

sarbjeet

sahai
Contributor
0 Kudos

hi,

using the refresh of Internet explorer or pressing F5 also will execute the application again...but you may also try the below mentioned code on the action of the refresh button....but i suggest that using refresh of Internet explorer will be better option.

method refresh .

DATA LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.

DATA LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.

DATA LO_WINDOW TYPE REF TO IF_WD_WINDOW.LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).

LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).

CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW

EXPORTING

URL = 'url of the application'

MODAL = ABAP_FALSE

HAS_MENUBAR = ABAP_TRUE

IS_RESIZABLE = ABAP_TRUE

HAS_SCROLLBARS = ABAP_TRUE

HAS_STATUSBAR = ABAP_TRUE

HAS_TOOLBAR = ABAP_TRUE

HAS_LOCATION = ABAP_TRUE

RECEIVING

WINDOW = LO_WINDOW.LO_WINDOW->OPEN( ).

IF SY-SUBRC EQ 0.

ENDIF.

endmethod.

thanks and regards,

sahai.s