Skip to Content
0
May 21, 2018 at 11:58 AM

Is it possible to refresh/redisplay a data source programmatically?

193 Views

Hello everyone,

I'm working on a fix in one of our workbooks to deal with data sources overlapping each other when the drill-down becomes detailed. What happens is that as soon as there is an overlap, the upper crosstab is cropped out at the last row before the lower crosstab starts. Anyway, I have made it so that if there's an overlap the lower crosstab shifts down as many rows as needed to accommodate the drill-down of the upper crosstab. The problem is that the upper crosstab doesn't load the cropped rows on its own and I have to refresh/redisplay/reload the data source programmatically.

I have tried the following without success - the command fails(returns 0)

lResult= Application.Run("SAPExecuteCommand", "Refresh", "DS_1")

lResult= Application.Run("SAPExecuteCommand", "Restart", "DS_1")

I have found that the following 3 manual actions cause the layout to redisplay properly and expand all the way:

1 .clicking the information tab(in the analysis tab)

2. refreshing all data sources

3. right-click crosstab => Move To => click Ok without any changes

The question is how can I do one of these programmatically or maybe do something else in order to make the upper crosstab expand all the way after clearing the overlap.

Thanks