cancel
Showing results for 
Search instead for 
Did you mean: 

How to make Auto Refresh to Webdynpro table UI element

Former Member
0 Kudos

Hi all

we have Table UI element in webdynpro , we are hitting the BAPI and getting displayed the records from Backend to TableUI element in webdynpro.

now we have a requirement when ever the records are added/modified/deleted in BAPI then we want those changes to be reflected automatically without hitting an action of again executing BAPI again.

can anybody tell me that how to make auto refresh to webdynpro table UI element like after certain we choose then automatically wants to refresh the table for updated records from BAPI into table UI element.

is it possible by maintaining some threads or any specific class...then we want to execute that thread by certain period of time , inside that thread we wanted to write the actually BAPI call , but we dont want to hit an action for calling BAPI/Execute BAPi. it has to be done automatically?

Is it possible?

if anybody have solution then it would be great help to me??

Thanks

Bindu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I would suggest to call a method that retrieves data from BAPI after insert/update/delete button action. This would ensure that the data in table is real.

You can use Timed Trigger only if you need an automatic refresh after a period of time say 10 mnts, 20 mnts. This UI element refills the table node in a time interval. It seems you don't have to use Timed trigger in your application.

Vinod V.

Former Member
0 Kudos

Hi Vinod

Thanks for your reply.

Yah we are looking for auto refresh the table node for specific time .

can you please send the sample code how to pass the table node in the Time Trigger UI element.

if u have any sample code then it would be great help to me.

Thanks

bindu

Former Member
0 Kudos

The solution is simple;

1] Add a Timed trigger UI element in your application

2] Set its delay time (delay value in seconds)

3] On its action, call the common method, which call the bapi and fill the model node.

Note: If the delay time is 0, then Timed Trigger UI element will be inactive.

Reference:

http://help.sap.com/saphelp_nw04s/helpdata/en/c1/fa7842fdb70f53e10000000a155106/frameset.htm

Vinod V.

Former Member
0 Kudos

hi

you can search for Timed Trigger in the NWD studio help content , you can find a method to use

and description of how to use it and inthe early post , please go that also that may also help you

using timed trigger .

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi all

I have many UI elements in webdynpro UI screen along with TimedTrigger UI element.

when ever any action happens among many Action with respecto many UI elements then i wanted to stop the TimedTrigger . it shouldn't refresh the screen

Can anybody send the peace of code??

Thanks

Bindu

Former Member
0 Kudos

Hi Bindu;

I think you have directly given delay value to Timed trigger property.

Lets do this.

1] Create an attribute of type Integer

2] bind this to the delay property of Timed trigger

3] on any action you set value to this attribute

Note: if you give 0 as its value, then timed trigger stops working, On each action of other UI elements, you can set the same value say 3000 secs, that may postpone the refresh activity for another 3000 secs.

Try this and let us know the result.

Vinod V.

Former Member
0 Kudos

Hi Vinod

Thanks for your reply

actually we wants to check an event triggering at view level, if any event happens in any of the UI elements then we will set the value of the delay time as "0".

is it possible to test this at single place of any event happens at View level if Mutileple UI elements and multiple events are there

Thanks

Bindu

Former Member
0 Kudos

Bindu,

1] You can set the delay value in each action.

or

2] In order to check the event triggering at a single point, you can use the parameter mapping.

The second option seems little tough in your case, since you are using lots of different kinds of UI elements in your View.

Try this.

Vinod V.

Former Member
0 Kudos

In NW 7.1 there exists the MessageBasedTrigger UI element which uses the RTMF (real-time messaging framework) to provide a push channel to the browser.

Armin

Former Member
0 Kudos

Hi,

"requirement when ever the records are added/modified/deleted in BAPI then we want those changes to be reflected automatically without hitting an action of again executing BAPI again"

For this requirement one option could be

a) Create a job which does invalidating of node and fetch the data using BAPI

b) Create a job which polls the table for changes in number of records of table after every fixed period

c) Create a schedular whcih runs job-b ; based on result runs job-a anf trigger a method in Web Dynpro application refreshing the data in UI

Regards,

ganga

Former Member
0 Kudos

Hi Ganga

Thanks for your reply

can you provide indetail information how to achieve this then it would be great help to me??

if you have any document or sample code then it would be great help to me

Thanks

Bindu

Former Member
0 Kudos

hi

check this thread may help you in creating Timed Trigger

Thanks

Former Member
0 Kudos

Hi Hema,

I would suggest you to use timer element in your code and set the timer to the period in which teh value to your BAPI is passed.

Other option could be using SPRO. Through this, R/3 would be hit but not your BAPI.

I hope this helps, If you need some thing else, please revert bsck. I'll be happy to help you.

Cheers!!!

Umang

Former Member
0 Kudos

Hi Umang

Thanks for your reply.

can you please elaborate how to use timer element to pass the BAPI value??

do u have any sample code then it would be great help to me.

other option you said by using SPRO , can you tell me briefly how to achieve this option??

actually our requirement is we dont want to perform any action ( like dont button click and all) but we wanted to be refreshed the table automatically by specific period of time in webdynpro table

please provide your inputs then it would be great help to me??

Thanks

Bindu

Edited by: Hima Bindu on May 12, 2009 1:31 PM

Former Member
0 Kudos

Hi Hima

I did not understand where will the lines of table be added/modified/deleted .

Will the data be changed in the backend system ?

In this case u will have to execute the bapi again in order to get updated data.

Or the data is to be changed in the WD Application ?

In this case I think u should make some button or link that will trigger the bapi to execute

and pass data to backend system.

Hope it helps

Nitsan