cancel
Showing results for 
Search instead for 
Did you mean: 

How to Refresh Data on View?

Former Member
0 Kudos

Hi All,

<b>How to Refresh my Data on My View?.</b>

In my application, i get data to table from BAPI. Once i click one record on table, it takes to another view(Here i display full information of table content). If user update his data, it will update particular record in my DB. UpTo Here is fine.

If the user wants to change another record, he will go back and pick another record. Here table data is not refershing. I read about view.reset(). and i also tried to invalidate() method in WdExit(). Even then it s not refershing. Can any one help me?.

Thanks and Regards

Ravi Golla

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi,

Have u called

wdContext.node<RFCOutputNode>().invalidate();

after executing the RFC to get data.

If not, add it and try

Regards

Fahad Hamsa

Answers (3)

Answers (3)

saraswathi_d
Participant
0 Kudos

Hi,

Try using node.invalidate()

or in wdDomodifyView()

{

if( ! firstTime)

view.reset();

}

Regards,

Saraswathi

Former Member
0 Kudos

Hai Ravi,

If you are devloping in a multi user environment, its better to execute the BAPI in in onPlugFromEditView().

If you are develpoing in single user environment, Share the BAPI context node in both views, after Calling the Edit function,

remove the context element which you have selected .

wdContext.nodeXXX.removeElement(selectedElement);

create a new Element with eedited values.

IprivateXXview.IXXElement elementEdited=wdContext.createXXElement();

elementEdited.setX(value);

wdContext.nodeXXX.addElement(pos,elementEdited);

Regards,

Naga

Former Member
0 Kudos

Hi Naga Raju,

I'm using model node in my application. So it is not possible to create element. Any other idea you think?

Thanks and Regards

Ravi Golla

Former Member
0 Kudos

Ravi,

Try context mapping:

1. Declare your model node in component controller (just copy it from first view)

2. In first view add component controoller to list of required controllers and map table node to corresponding node in component controller.

3. Repeat the same for second view (the one that displays details). Also cardinality of node will be 0..n it is ok. The record to display will be lead selected record selected in table (first view)

Here no additional synchronization code is necessary at all.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi ,

Have you tried calling the method to fetch list BAPI, in onplugfromScreen2 method.?

in this case the values will get refreshed so that you get the lastest values...

AM