cancel
Showing results for 
Search instead for 
Did you mean: 

How to refresh a view

Former Member
0 Kudos

Hi everybody,

I have a view with some dynamic fields depending on a DROPDOWN LIST field.

Every time I select a value from the Dropdown list, I need to refresh the view in order to hide/show fields, labels, conntainers etc...

I'm looking for a view refresh function but ... nothing.

I know it is possible to refresh a view by calling another view and go back again,

but unfortunately this is not my case. I want to stay in my view and refresh it.

As alternative, maybe it could be possible to refresh the parameter FIRST_TIME in WDDOMODIFYVIEW ?

Thanks and bye.

Edited by: GIUSEPPE MANCINO on May 15, 2008 12:58 PM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

to refresh the view try using

data: node type ref to of_wd_context_node.

node->invalidate().

Former Member
0 Kudos

It is not simple because I have already 8 different containers and fields are of course in different containers. Unfortunately there are even different combinations of fields to hide or show, so I can not group them....

I need to find a way to refresh the view....I'm trying to exit and reenter in the view using a fake view but it does not work. Some help is truly appreciated.

Former Member
0 Kudos

hi giuseppe........

you can try calling the url of the view again and close the current view........ but if you do so. the drop down value will also be initialised.

---regards,

alex b justin

Former Member
0 Kudos

Hi guys and thanks for the answers. Anyway I can not use your suggestions because I have a lot of fields and I used this approach. All fields are READ-ONLY = X, then, depending on the process step I set the READ_ONLY attribute to blank in order to have them editable. Most important, I remove even some objects from the VIEW and so it is impossible to recreate them....

That's why I need to have the VIEW refreshed as the first time it is called.

Former Member
0 Kudos

hi giuseppe........

instead of removing... you can make them invisble... you can group those into one container and make the whole container as invisible..........

---regards,

alex b justin

Former Member
0 Kudos

Hi

Create a Node and an attribute and is binded to the drop down. There u need to write a condition for hide/show the lables/ tables etc.. (in the same) . there is nothing like refreshing, but hide and show.

suppose if u need to hide/show a table

IF sales_order_it IS INITIAL. " no values in the table

WD_CONTEXT->SET_ATTRIBUTE(

EXPORTING

NAME = 'VISIBLE'

VALUE = ABAP_FALSE ).

ELSE.

WD_CONTEXT->SET_ATTRIBUTE(

EXPORTING

NAME = 'VISIBLE'

VALUE = ABAP_TRUE ).

Cheers,

Mary

Former Member
0 Kudos

hi giuseppe....

if it is only for hiding and showing fields then it can be done in the wdddomodify method itself..... based upon the drop down, have an if condition in wddomodify method and show fields.

---regards,

alex b justin