cancel
Showing results for 
Search instead for 
Did you mean: 

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

mitko1994
Participant
0 Kudos

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

TammyPowlas
Active Contributor
0 Kudos

Hi - I am not a VB expert, but in reviewing this book there are some good examples - https://blogs.sap.com/2018/04/28/praise-for-analysis-office-the-comprehensive-guide-3rd-edition-book...

Accepted Solutions (0)

Answers (2)

Answers (2)

mitko1994
Participant
0 Kudos

Hi, thanks for your reply.

I tried your suggestion without success. The output is still 0.

former_member110741
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dimitar Stratiev,

can you try below commands, i am just thinking this might help

Dim lResult As Long

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


Subhash

mitko1994
Participant
0 Kudos

Hi, thanks for your reply.

I tried your suggestion without success. The output is still 0.