cancel
Showing results for 
Search instead for 
Did you mean: 

How to update the WD table with Timer

Former Member
0 Kudos

Hello Gurus,

Can anyone please provice a sample example to refresh the wedynpro table with timer.

I have created a table in my webdynpro application and fetching the data from custom table(ZTEST) and binding the data to table upon onActionSearch event.

I have one more button on the same view to send the same WD table entries to PI system. after couple of secs, my custom table will be updated with the new data that sent from PI via Asynchronus.

I was struck in refreshing the WD table information. Can anyone give me some sample example "how update the table entires in webdynpro abap using TimedTrigger (Update the WD table data every 10 secs)"?

Point will be rewarded.

Thank You.

Shyam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thomas/Amy,

Can you please clarify how to resolve Filtering issue with TimeTrigged event.

I have created a "ViewContainerUIElement" and embedded my table in that UI element and binded the data to the table context. now i can see the data in the table.

now, I have created a time triggered event to update the table entries with the database table values for every 5 secs.

I have added a sort and filter functionality to my table.

when i click on Filter button on Table, i can see the filter on my table to filter the values, here is the problem, whenever the table data is refreshed with the time triggered event, my filter cursor is going back to first place of my filter value.

Please see the image uploaded in below link:

http://i48.tinypic.com/v4xi12.jpg

Once the time triggered event is triggered, my cursor is pointing to the first place of that particular field (as per the screenshot, my cursor is pointing to the first place of 07/13) . User has to click again to enter on that particular field to correct the filter value. (i.e 07/13/2012).

I'm not able to resolve this issue. can you please provide some inputs.

Thank You.

Shyam

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Please see what I stated above:

It doesn't turn an update into an AJAX event.  It is still a full server event.  The delta rendering just reduces the amount of data that must be sent back to the client and injected into the DOM when changes are only made to a subset of the page.  The impact is to improve performance; but otherwise it isn't really noticable to the end user in other ways.  Delta Rendering isn't going to localize your server update.

There is nothing in Web Dynpro that will allow this to work like a localized AJAX event. What you describe is the main problem of using the TimedTrigger in such a way. Its a full server event and causes user input to be disrupted.  There is really no way around that. What you describe would require an AJAX eventing framework tied to the Table UI element and isn't something that is in currently available in Web Dynpro.

Former Member
0 Kudos

Hi Thomas,

Thanks for the quick response and thank you very much for clarifying TimeTriggered event issue.

Currently, We are on Ehp 5, What are the possibilities I have to achieve auto update the table with the updated database entries and enable filter and sort functionality to my table?

Please provide me any example or sample WD application to figure out the solution to achieve my requirement.

Thank You.

Shyam

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm sorry, but as I already described there is nothing in Web Dynpro that will allow such a localized client side update. That simply isn't how the framework or the current UI elements are designed.  For such a requirement you would need SAPUI5 and REST/NetWeaver Gateway services.  It is designed for this type of client side update and data injection into the UI controls.

Former Member
0 Kudos

Thanks for the info Thomas.

Thank You.

Shyam

former_member194142
Participant
0 Kudos

Hello Thomas,

I and my lead is struggling to figure out (trace out) the below error message that From where its generating? Even though we are popularting / passing correct number of digits as per lenght, still we are getting this error, bcz SAP is throwing it, but SAP is not telling specifically which field's data is causing issue? How to debug? where we must put break-point?

"The entered value has too many digits in integer part"

I opened the thread, pls. suggest us

http://scn.sap.com/thread/3243048

Thank you

Answers (1)

Answers (1)

amy_king
Active Contributor
0 Kudos

Hi Shyam,

The documentation page for TimedTrigger mentions (at the very bottom) that there is an example of using this UI element in web dynpro component WDR_TEST_EVENTS, view TIMEDTRIGGER.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

Thanks for the reply.

I couldn't find much information in wed dynpro component WDR_TEST_EVENTS to refresh the table entires using TIMEDTRIGGER UIE.

Can you please let me know if you have an idea on refreshing the table entries using timer.

THank You.

Shyam

amy_king
Active Contributor
0 Kudos

Hi Shyam,

It sounds like you already have an action, Search, in which you read your data and bind the table. Depending on how you wrote your action handler method, you maybe can reuse this action for the TimedTrigger. Just set the delay (in seconds) for the trigger and specify the action to be called in onAction. Then this action will be executed after the specified delay.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

I have done everything as you mentioned above but the problem is its refreshing entire view whenever the table refreshed with the new data.

Do you have any idea, how can I control time trigger only for table (It should not affect other elements on the UI)?

Thank You.

Shyam

Former Member
0 Kudos

Try to put your table and time trigger in another view

Regards

Roman

amy_king
Active Contributor
0 Kudos

Hi Shyam,

I think what you're looking for is Delta Rendering, available with EhP 2. See the documentation for how to enable it for your application. You'll need to create a separate view to contain just the Table and the TimedTrigger and then Delta Rendering will allow only that view to update.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

Can you please provide me some sample application for Delta Rendering.

I want to do this delta rendering only for table content not for other UI elements.

Hi Roman,

My requirement is to place all the UI elements in one view.

Thanks for the information.

Thank You.

Shyam

amy_king
Active Contributor
0 Kudos

Hi Shyam,

My system is not yet on EhP 2 so I don't know if any example applications for Delta Rendering come with EhP 2. If you're on EhP 2 maybe you could look in your system for examples. Reading the documentation that I linked to above, TimedTrigger is not yet supported for Delta Rendering but I wonder if you can still accomplish your requirement without the timer. If your Table is in its own view, that view can be updated via delta rendering with the new PI data.

Keep in mind Delta Rendering is done within the scope of a view, so if you want only your Table to change, the Table needs to be in its own view.

Cheers,

Amy

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I think you have a misunderstand of what Detal Rendering does.  It doesn't turn an update into an AJAX event.  It is still a full server event.  The delta rendering just reduces the amount of data that must be sent back to the client and injected into the DOM when changes are only made to a subset of the page.  The impact is to improve performance; but otherwise it isn't really noticable to the end user in other ways.  Delta Rendering isn't going to localize your server update.

amy_king
Active Contributor
0 Kudos

Ahh, thanks for clarifying this, Thomas. I had misunderstood the documentation and believed it was describing delta rendering as AJAX-like behavior.

Cheers,

Amy

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

It is very AJAX Like in the technology which it uses to inject the changes into the Document Object Model on the client side.  Where it differs from AJAX is that it isn't asychronous.