cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to get changes from WDA

Former Member
0 Kudos

Hi,

which is the best way to get changes from fields on WDA?

I use some input fieds and alv tables on my web dynpro and need to check them for any changes.

Is the only way to loop on the context nodes and check every element for changes from client or there other options?

An is it necessary to reset for every changed element the changed flag with method "RESET_CHANGED_BY_CLIENT"?

Regards,

Anton

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anton,

You can use the context change log for your requirement.

It will displays the old value/new value, change kind of the changed attributes.

You can also enable or disable the recording of changes made at the Attribute.

Check the standard application DEMO_CONTEXT_CHANGES for contex change log.

For more information see the help link also.

Thanks.

Former Member
0 Kudos

Hi,

and which is the best way to handle changed data?

As i know it is not possible to break a application flow with a popup and wait for the user entry.

So how can i make a "correct" handling for changed data an the web dynpro.

For example i have 12 Fields and two alv components on my web dynpro. Before th user change the page, i must check every field for changes and show a popup if needed.

On this popup, the user can chosse if he wants to save the data or leave without saving.

On top, there are six different buttons to leave the page to another.

Regards,

Anton

Former Member
0 Kudos

Hi,

nobody with an idea for this request?

Regards,

Anton

Former Member
0 Kudos

Hi Anton Hartl ,

One of the possible ways of finding whether the changes has been made is to put it in a loop as mentioned by every one ,

other option of doing this is to check by using 2 context nodes.

You get the details of alv by using a context node, and create another node, for marking/deciding the changes that happens to the node. by using this every time you need to compare the datas in the two nodes are equal. if equal, "no changes has been made" if not the same some changes are been made.

A little complicated one, but i guess this is another way we can do.

Cheers

Mary

Former Member
0 Kudos

You can use the context change log to check if anything has changed. The method get_changes will return null if no changes have been done. And if anything has been changed, you will be able to get the element that has changed, along with the old and new values. Check the component DEMO_CONTEXT_CHANGES.

Regards,

Nithya

former_member189058
Active Contributor
0 Kudos

Hi Anton,

Use [Context Change Log|http://help.sap.com/saphelp_nw2004s/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/frameset.htm]

In short, all information about changes made to context elements within a controller by the user are saved in an internal table. The Web Dynpro runtime has access to this table.

Regards,

Reema.