cancel
Showing results for 
Search instead for 
Did you mean: 

Calling WDDOINIT

Former Member
0 Kudos

Hej.

I have two components A and B which are 'connected' to each other.

If I go from A to B, the WDDOINIT from B is triggered. But when I return to component A (with a button) and then again go to component B, WDDOINIT of B is not triggered again.

Is there a way to solve this? I hought you could set the lifetime but this doesn't seem to work.

Regards,

Henry

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hai Henry,

As u know WDDOINIT will be called only once during the life time. When you are moving back from b to a or from a to b , try to write the procedures you need to be executed in WDmodify with proper logic.

Regards

Sarath

Former Member
0 Kudos

I have moved the source from WDDOINIT to WDDOMODIFYVIEW and I see that WD executes the logic.

However, nothing seems to happen in the ALV.

Problem I am facing:

I am setting a blue color on an ALV-cell in WDDOMODIFYVIEW. First time everything works as planned: Color is set.

However, when I trigger the same logic when calling the component the second time (after calling another component), the logic is executed but no blue color appears.

Strange......

Message was edited by:

Henry Helderop

S-H
Active Participant
0 Kudos

Hi Henry,

As you know WDDOINIT is called only once in the lifetime of the view. But if we want to execute some code when we go secound time to the view we can place such a code in the handle method of the inbound plug since this will be called each time inbound plug is processed.

So you can move the code which you want to execute each time the view is loaded (via navigation) from WDDOINIT to Handle method or place the code in some other method and call this method in all the places wherever required.

Hope this helps.

Best regards,

Suresh

Former Member
0 Kudos

Hi Henry.

The life time only affects the view and its context. But there is no life time setting for components. So the wddoinit of the component controller is only called once.

So before navigating to component B you have to delete the current component and recreate it.

Cheers,

Sascha

thomas_szcs
Active Contributor
0 Kudos

Hello Henry,

To my knowledge there is no setting at component level to control the lifetime. Where have you made this setting?

Best regards,

Thomas