cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax error when executing suspend or exit plug code

Former Member
0 Kudos

Hi all of you WD4A experts.

I want to suspend and resume to another WD component. When I enter the following code to from an action in a view in the main window I get a syntax error saying "GET_W_MAIN_CTR" is unknown or Protected or Private.

DATA: l_ref_main_window TYPE REF TO ig_w_main .

l_ref_main_window = wd_this->get_w_main_ctr( ).

l_ref_main_window->Fire_suspend_Plg(

url = 'http://u2026u2026u2026u2026/webdynpro/sap/my_secondary_wda' ).

My window name is W_Main and the outbound plug in window W_Main is called "Suspend" and is Plug Type suspend. I'm sure this is user error but for the life of me can't figure out what it is. I expected the method would be called "Get_W_Main_ctr" but apparently it is not. Any help will be greatly appreciated.

Thanks,

Terry

Accepted Solutions (1)

Accepted Solutions (1)

former_member199125
Active Contributor
0 Kudos

Hi Terry

Try this...

l_ref_main_window->FIRE_GO_suspend_Plg(

url = 'http://u2026u2026u2026u2026/webdynpro/sap/my_secondary_wda' ).

Regards

Srinvias

Former Member
0 Kudos

Hi Srinvias,

I'm trying to fire the suspend plug from a push button action in the view. This is how SAP Help has it coded. As I read the code the whole reason for the call the method GET_<WINDOW>_CTR() is to get the reference to the window where the suspend plug method is located. So when I remove the call to the get method I get a syntax error on the plug.

Thanks for your help but I need to keep looking for an answer.

Terry

former_member199125
Active Contributor
0 Kudos

Hi terry,

Sorry, i didn't check your plug name is suspend only. And moreover did you create resume plug with in that window?

Anyhow I dont think the problem is with resume plug.........

this i got from saphelp

"Since suspend and resume plugs are used for communicating from the active application, they have to be added to the interface view of the window."

For my satisfication write the code in capital letters. and check the window name.

Regards

Srinivas

Former Member
0 Kudos

Hi Srinivas,

I have not been able to create a suspend plug with out checking the Interface check box on the Outbound plug tab. Is there something else I need to do? I do have a resume plug defined but don't think it has anything to do with this error either. It appears to me that the GET_<WINDOW_NAME>_CTR( ) method has not been generated and I don't understand why or what I would need to do to generate it.

Regards,

Terry

saravanan_narayanan
Active Contributor
0 Kudos

Hello Terry,

Add the window controller(W_MAIN) as used controller in the view. then things should work.

BR, Saravanan

Former Member
0 Kudos

Thank You BR. That solved my problem. I knew it was user error on my part.

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi.,

Your code looking perfect., May be some where embeding Window of another controller you may missed. check once again.,

also check help this for reference : [Suspend and Resume Calls in WDA|http://help.sap.com/saphelp_nw04s/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/content.htm]

@Moderators: dont close this thread, Instead move this to WDA Forum.

Thanks & Regards,

Kiran

Former Member
0 Kudos

Hi Kiran,

Thanks for your quick response. I also thought it could be another controller so I wrote a very simple WD Component with one view embedded into one window and still get the error. When I drill down into the wd_this-> reference for both the view and the window there isn't a component called get_<window name>_ctr defined. I feel it must be something else I've missed when coding the WD Component but can't figure it out.

Terry