What's the difference between using Refresh and RefreshData? The guide says both can "redraw" the crosstab. According to the guide:
"Refresh" is used "to initially refresh the data in the workbook". If the data source is already refreshed, "crosstabs are redrawn". "RefreshData" updates data "from the server and the crosstabs are redrawn."
I'd think "Refresh" will take the longest time since it would expand rows and columns for any new data found(?). "RefreshData" refreshes only the cells of the current crosstab. That's my guess. However, RefreshData takes 8x longer than Refresh in my example crosstab which seems to contradict my thoughts on what Refresh and RefrehData are doing.
1. Open workbook
2. Refresh or RefreshData?
3. Refresh crosstab cells only...RefreshData.
3. Refresh/redraw entire crosstab...Refresh.
However, RefreshData always takes way more time. I tested refreshing one crosstab back to back and got the results below:
Related Question...
How do these relate to using PauseVariableSubmit with SAPSetRefreshBehaviour? What does SAPSetRefreshBehaviour do compared to Refresh and RefreshData? I'm asking because my workbook opens, update variables, refresh workbook---this is done using SAPSetRefreshBehaviour. Is there a faster way possible maybe thru Refresh and RefreshData?
For example, which is better (assuming #2 is somehow possible):
Example 1 (my current method):
- SAPSetRefreshBehaviour Off
- PauseVariableSubmit On
- Update variables
- PauseVariableSubmit Off
- SAPSetRefreshBehaviour On
Example 2:
- PauseVariableSubmit On
- Update variables
- PauseVariableSubmit Off
- Call Application.Run("SAPExecuteCommand", "Refresh", "DS_1")
- Call Application.Run("SAPExecuteCommand", "Refresh", "DS_2")
- Call Application.Run("SAPExecuteCommand", "Refresh", "DS_3")
BONUS question:
What refresh method is used when clicking OK on the variable prompt screen? Refresh, RefreshData or something similar but does extra steps?