cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro ABAP - Firing a plug in WDDOMODIFYVIEW or Redirecting

Former Member
0 Kudos

Let me explain my situation and then the question.

I am expecting a ObjectID in the querystring (URL Parameters).

I capture this URL parameter in my window and pass it to a mapped context attribute that inturn is mapped to the View. Inshort, the url parameter captured in the window is now available in the view.

I make a function module call and check if that ObjectID is a valid ObjectID or not. If it is not valid, I want to file a plug and display another view called MESSAGE_VIEW. This ObjectID validation is happening in the WDDOMODIFYVIEW method and when I fire the outbound plug to go to the MESSAGE_VIEW, I get the error ...

<b>"Navigation in Phase WDDOMODIFYVIEW Cannot Be Triggered. Component: ZCRM_COMPONENT, View: PARTNER_VIEW, Window: APPLICATION_WINDOW"</b>

Question: What is the best way to validate data and redirect to a different view if the validation fails?

I am new to sdn, please also post as to how to award points.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I did find a solution and I wanted to share and validate it.

- I created a event in the COMPONENTCONTROLLER "event_chk_url_params".

- In the view where I use these url parameters, I created a method (event handler) for the above event that checks for the url parameters and fires plugs based on the value of the url parameters.

- From the window's handle default method, where I get all the url parameters, I raise the event in the component controller ... which inturn calls the event handler in the view, which in turn redirects.

Is this the right solution or is there something better then this?

thomas_szcs
Active Contributor
0 Kudos

Hi Prashant,

You can also trigger a navigation from within a window. It is possible to define outbound plugs there as well.

Best regards,

Thomas

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Prashant

Yes you've found the right solution because you can not fire plugs in wdDoModifyView() method. Method wdDoInit() of the view is called before inbound plug of your interface view with the parameters is fired, so you can not do this in the method too.

BR

Sergei

Former Member
0 Kudos

Thomas Szuecs ,

I would love to understand this.

Can you pleeeeaaase explain this in detail. How can I have outbound plugs from a window to a view?

Thanks

Prashant

thomas_szcs
Active Contributor
0 Kudos

Hi Prashant,

Just define an outbound plug at the window and an inbound plug at the view and connect both via drag&drop. Then fire the outbound-plug from within the startup plug of the window.

Best regards,

Thomas

Former Member
0 Kudos

Thanks Thomas. I will definitely try this. I wasnt aware that it is possible to fire plugs from window to a view. If it works I will definitely award some points.