Skip to Content

SAP Design Studio - Timer Component to refresh data from Universe, but No Data Available

Jan 09, 2017 at 10:36 PM


avatar image

I am creating a real time Dashboard that uses data from a Universe as the Data Source. I have successfully implemented the Timer Component and can see my data is getting refreshed every 30 seconds. This part is great! However, there are occasions when there will be 0 recordsin the Data Source. In these cases, I would like to show a "pretty" screen with a message stating that there are no records rather than the standard message that makes it look like an error occurred. (The standard message appears in a grayed out cross table and says "No Data Available. Could not find any data. This might be due to the current selection of variabl...").

My thinking is to check the length of the Data Source every time the timer kicks off. That way when it is 0 records, I can hide the cross table and display a nicer image instead. However, I cannot get this to work! Here's what I am doing:

I have a cross tab that has the data from the Universe

A text Box that has a counter that increments every time the timer runs (so I can prove that the timer is in fact running)

A text box that has the number of records in the data source. (by using the getMembers function of the data source and then doing a length function on that)

A Timer that runs a ReloadData() every 30 seconds and also populates the above text fields


I start with 1 record in the Data Source. The table shows 1 record and the text field that has the number of records in the data source also shows 1. Great!

In the next 30 seconds, I add a second record to the Data Source. Next time timer runs, table has 2 records, text field shows a count of 2 records. Great!

However, I delete the 2 records from the data source. Timer counts down and table shows ugly message of "No Data Available. Could not find any data to display...". I understand why it's doing this. It is correct. However, my text box still shows that there are 2 records in the data source. This is NOT the desired result. I want it to tell me that there are 0 records in the data source!

If I add 1 record back to the data source, the table and text field will show 1 record. However, anytime the result set is empty, I get unexpected behavior when trying to determine if the result set is empty.

So technically the data is refreshing correctly, I'm just struggling how to find out if the result set is empty.

Sorry for the long post...any advice is appreciated!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jeff White Jul 19, 2017 at 06:28 PM


Have you tried using the isResultSetEmpty function?

Check DS_1.isResultSetEmpty() and take appropriate actions, e.g.,

if ( DS_1.isResultSetEmpty() ) {

// show the pretty no-data alternative

} else {

// show the data

} // end if


10 |10000 characters needed characters left characters exceeded