cancel
Showing results for 
Search instead for 
Did you mean: 

Abap webdynpro - refresh node on changes in selection screen

Former Member
0 Kudos

Hello,

My webdynpro output is not getting refreshed even on change of new data in the selection screen. Let me explain in detail. i have a selection screen and on click of the submit button another view is triggered and have placed a break-point in the second view to debug the internal table contents. For the first time, there is no issue.

The second view is called from the first view and the break-point stops. If i click on back in the second view , the first selection screen view is called. Now if i click on submit again, the break point is not getting called rather the output ALV is displayed. I do not how, i have tried using invalidate() in the method of the BACK button but still the ALV with a blank screen is getting displayed irrespective of what changes we do in the selection screen.

What could be the reason?Please help.

Regards,

Vaishnavi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try to code it in relevant plug method in 2nd view. Ex: HANDLE<<PLUGNAME>> method of 2nd view, code it here to get the latest data upon your selection.

Either you might have written it in WDDOINIT or MODIFYVIEW(first_time true) of 2nd view. In this case the data will not be refreshed.

Answers (5)

Answers (5)

Former Member
0 Kudos

aaha..how stupid of me to not even know that WDOINIT will get trigerred only once. I have put the code in the inbound plug of the second view and it looks good. Thanks to everyone of you.

chengalarayulu
Active Contributor
0 Kudos

Hi Vaishnavi,

If you change LIfeTime of the view, then also WDDOINIT will get execute whenever you fire a plug.

chengalarayulu
Active Contributor
0 Kudos

Hi Vaishnavi,

As you said you have written code in WDDOINIT of view, so, just double click on View and go to PROPERTIES tab, there you will find LifeTime one option.. by default it will be FrameWorkControlled.... just change that to When Visible....

Now your WDDOINIT code will execute whenever you call Second View.

Hope this will resolve your issue.

bharath_k6
Active Participant
0 Kudos

Hi,

You must have placed a button in the first view to perform some action to fetch the data against the values entered in selection criteria.

1.Do the coding for data retrieval in this button(SUBMIT) Action method created in first view.

2.You must have placed a code for Triggering the plug to navigate from first view to second view in this method(Action).

3.If you want data to be refreshed whenever you come to second view froom first view, do the node invalidation upon clicking BACK button in the second view. or Upon binding the new data to a node, it automatically vanish the existing data to the node. It depends upon setting the parameter (SET_INITIAL_ELEMENTS) value to the BIND_TABLE method.

This way you can achieve the required.

Regards,

Bharath.

Former Member
0 Kudos

Check for three things:-

1.  Where are you initiating the used component (ALV)

2. Where are you filling the node

3. Where are you invalidating the node.

former_member199125
Active Contributor
0 Kudos

Did you write the code in wddoint of 2nd view? and did you completely close the view ore kept in suspend?

wddoint method will only trigger once, Observe the sequence of method triggering

You said , once you click on submit button  ( 2nd time ) data not dispalying, it means new data not binded to node.. pls check the same.

Regards

Srinivas    

Former Member
0 Kudos

Oh Yes. I have written it in WDDOINIT. Will it not work? I was under the impression that since i have clicked the back button the control has gone back to the firs view and click on the submit button again will call the second view and since the second view is called the wddoinit will get called as well.