cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP - how to refresh a view

Former Member
0 Kudos

In ABAP Web Dynpro, I created a view for user to input data. As long as the submit button is clicked, a window will pop up to display the result. User can simply click the close button on the popup window to leave and go back to the previous window. My question is how to refresh the view for data input(including its context and controller) to allow user to fill in data again.

Your help would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Fred,

You can bind an action to the close event of the popup window and invalidate the affected context data in the action handler by either calling invalidate( ) on a particular node (or wdContext to invalidate everything) or by calling set_attribute( ) as Rich suggested.

Best regards,

Thomas

Former Member
0 Kudos

Thank to all! Thomas,

I got this problem resolved by executing the invalidate() method in the component controller as you suggested.

Answers (2)

Answers (2)

RichHeilman
Developer Advocate
Developer Advocate

You can access the context in this way. Say the element in the context is NAME. You can set it this way.





clear item_name. 
  elem_main->set_attribute( 
       exporting name = `NAME`       
                 value = item_name ).




Regards,

Rich Heilman

Former Member
0 Kudos

Hi Fred,

Just after you call the close window method you can fire a plug which will call a method and will flush the data and hence making your view ready to be re-used.

to make the view ready again in the same method you can reset context node attrbutes of those attached to fields of view.

Hope this helps.

Regards,

Anoop