cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify changes in a table/ node?

Former Member
0 Kudos

Hi Buddies,

I need to indentify the changes made on a table UI element which is bound to the context. I need an array with all rows of the table that have been changed.

So, on my view there is a table showing customers that have been read using a RFC. I can iterate over all elements in the context like that:

	  
for( int i=0; i < wdContext.nodeE_Customer().size(); i++ ){ 
//if an attribute within wdContext.nodeE_Customer().getE_CustomerElementAt(i) 
// has changed -> put this row into the aforesaid array
}

I want to filter the changed values in the context and put them into some kind of array (maybe another context node?).

Whats the best way to do that?

Thanks, Johannes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

it would be good if you can copy the data you get through RFC in a new Node and Map that node to data base Table.

You must be having Text edit or some other cell variant for cell editor. Give a button called "Modify" or similar and allow the user to press this button after all the changes and modification he has done in the table displayed. In the action of button, compare the Values of new Node and the Original Data and populte the corresponding row in the required Value node.

This is a long approach, but the user can change the value in Many columns and rows and not always the Lead selection is triggered and infact if the compatability mode is set to "NW04plus", the lead selection will never be triggered unless and until the user preses the button in the beginning of the row. So writing the code in lead selection wont work always.

I believe you wont face any issue in coding this logic. I hope it is helpful

Former Member
0 Kudos

Hi,

Did you try to use the method isChanged from IWDNodeElement to get info about node modification?

https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/IWDNodeElement.htm...

Best regards

Answers (2)

Answers (2)

sureshmandalapu6
Active Contributor
0 Kudos

Hi Johannes Schnatz,

in onLeadSelect() event, you can write the code as you want. In onEnter also used for executing some procedures in case if the user changes anything in the table.

thanks

suresh

former_member214651
Active Contributor
0 Kudos

Hi Johannes,

If ur requirement is to put all the values into another ValueNode then u can use the utility CopyCorresponding

the syntax goes like this:

wdCopyService.copyCorresponding(wdContext.node<Table1>.get<Table1>Elementat(i),<Node2 Object>);