cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Closing a web dynpro application

Former Member
0 Kudos

Hi experts,

I wanted to close the application when the user clicks on the close button.

I created a out bound plug "EXIT" of type 'EXIT' in my window.

I also created a parameter "CLOSE_WINDOW" of type "WDY_BOOLEAN" for the outbound plug

Now in action of the close button i have done the below code:

DATA: l_ref_ywd_maintain_catalog TYPE REF TO ig_ywd_maintain_catalog .

l_ref_ywd_maintain_catalog = wd_this->get_ywd_maintain_catalog( ).

l_ref_ywd_maintain_catalog->fire_exit_plg( CLOSE_WINDOW = 'X'

).

where ywd_maintain_catalog is my window name.

when i check the program i am getting the below error:

get_ywd_maintain_catalog_ctr is unknown or protected or private.

I refered the standard web dynpro component "WDR_TEST_EXIT_PLUG" to implement the logic

Pls help

Regards,

Vinod

Accepted Solutions (1)

Accepted Solutions (1)

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Can you check in ST22 and paste the code where it showed the error.

Regards,

Priya

Former Member
0 Kudos

Hi Priya,

First of all i am not able to activate my component and it gives the below error :

"Method GET_YWD_MAINTAIN_CATALOG_CTR" is unknown or protected or private.

I just gave activate anyway and got the below error when i check in ST22:

"ERROR: Syntax error in program /1BCWDY/6TSR9KMI051N10RIZ1T2==CP ."

The following syntax error occurred in program

"/1BCWDY/6TSR9KMI051N10RIZ1T2==CP " in include "/1BCWDY/B_6TSTHIYXVF5CS9A44120

" in

line 4164:

"Method "GET_YWD_MAINTAIN_CATALOG_CTR" is unknown or PROTECTED or PRIVATE."

Regards,

Vinod

Former Member
0 Kudos

GET_YWD_MAINTAIN_CATALOG_CTR where is this method defined.

Can't i code on the action of the button directly to fire the exit plug instead of using SICF tcode.

What exaclty you wanted to do..

Edited by: Lekha on Nov 6, 2009 2:36 PM

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

From which class are you calling the method GET_YWD_MAINTAIN_CATALOG_CTR or is it created by your own.

The method is not public so you cant call it ouside and facing that the error.

Regards,

Priya

Former Member
0 Kudos

Hi all,

This is my requirement when i click on a close button the application should close.

i refered to a web dynpro component "WDR_TEST_EXIT_PLUG" where they have explained the way to use exit plug.

They have created a outbound plug in the window called "EXIT" of type exit. and in the action of the button they have used the below code to fire the outbound plug.

method onactionfire_exit .

data: l_ref_wdr_test_exit_plug type ref to ig_wdr_test_exit_plug .

l_ref_wdr_test_exit_plug = wd_this->get_wdr_test_exit_plug_ctr( ).

l_ref_wdr_test_exit_plug->fire_exit_plg(

url = 'http://www.google.de/'

).

endmethod.

I followed the similiar approach in my code:

I created a out bound plug "EXIT" of type exit in my window.

then in the action of the close button i have done the below code:

DATA: l_ref_ywd_maintain_catalog TYPE REF TO ig_ywd_maintain_catalog .

l_ref_ywd_maintain_catalog =wd_this->get_ywd_maintain_catalog_ctr( ).

l_ref_ywd_maintain_catalog->fire_exit_plg( CLOSE_WINDOW = 'X'

).

The problem i am facing is i am getting the error "method get_ywd_maintain_catalog_ctr is unknown or public or private"

I am referred to the below URL to do it :

link: []

Regards,

Vinod

Former Member
0 Kudos

Where is this method defined -

"method get_ywd_maintain_catalog_ctr is unknown or public or private"

Former Member
0 Kudos
method ONACTIONGO_EXIT .
data: L_REF_MAIN_WINDOW type ref to IG_MAIN_WINDOW . 
L_REF_MAIN_WINDOW = WD_THIS->GET_MAIN_WINDOW_CTR( ). 
L_REF_MAIN_WINDOW->FIRE_MY_EXIT_PLUG_PLG( CLOSE_WINDOW = 'X' ). 
endmethod.

where is the method get_ywd_maintain_catalog_ctr ?

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I went throught the comp WDR_TEST_EXIT_PLUG.

go to the properties of the view V1.

in the view V1 by default

WDR_TEST_EXIT_PLUG COMPONENTCONTROLLER will get embeded .

you need to embed the window of the component there

ie. your window WDR_TEST_EXIT_PLUG must be embeded in you view V1.

WDR_TEST_EXIT_PLUG WDR_TEST_EXIT_PLUG. "2 line which was shown in the view

I think you might have missed this so you are getting that error..

add the window in the properties of your view .

For this click on create and select the your comp which has your window.

This will resolve your prob i guess..

Regards,

Priya

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

The Exit plug is in the window of the component.

To fire that exit plug in the view ,you need to embed your window in the view of the component.

Then you can access the window's methods/plugs etc in the view which you want.

Regards,

Priya

Former Member
0 Kudos

Hi Priya,

Yes i have forgotten to mention it. The issue is solved. The application is working fine Thanks for the help

Regards,

VInod

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Vinod ,

Using Exit lugs you can close the running application.

Check this blog which explains the step by step

procedure to do so.

/people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications

regards,

amit

Former Member
0 Kudos

Hi Amit & Radhika,

Can't i code on the action of the button directly to fire the exit plug instead of using SICF tcode. Right now i am not authorized to use SICF tcode. I have to raise a request to get the access.

Regards,

Vinod

Former Member
0 Kudos

Check this Wiki [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID2096230950DB11241031861360265394End?blog=/pub/wlg/6687]