Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

EPMSaveData - Value not written in cell when using AFTER_WORKBOOK_OPEN

$
0
0

Hi Experts!

 

Since this community already could help me in many cases i hope someone can help me with the following issue.

 

To allow users to set input templates offline and save them to a local drive, i don't want to use the BPC Sheet option "Refresh Data in the Whole File when Opening it". Instead i use the Custom VBA Function "AFTER_WORKBOOK_OPEN". In this function i first check if the workbook is online and afterwards start the BPC refresh API "RefreshActiveWorkBook" using the following code:

 

Function After_Workbook_Open()                          ' function starting after opening the excel workbook

' After_Workbook_Open function to verify if workbook is offline
' starts refreshing process if workbook is online

If BPCStat Then
    epmA.RefreshActiveWorkBook                          ' EPMExecuteAPI refresh data for the entire workbook
End If

End Function


Public Function BPCStat() As Boolean                    ' public function to check the status of the workbook

' BPCStat defined as boolean:
'       True  - Online
'       False - Offline

On Error GoTo Online

If ThisWorkbook.Names.Item("_epmOfflineCondition_") = "=1" Then
    BPCStat = False
    GoTo ExitF
End If

Online: BPCStat = True
ExitF:

End Function

 

This mainly works perfect, except when using the EPM function EPMSaveData. When opening a workbook the VBA function works and i can see that the workbook is refreshed, but the target cell (yellow cell in the following screenshot) of the EPM function EPMSaveData is not filled with the value shown in the cell with the formula itself:

 

EPMSaveData_Error1_2013-11-07_15-14-54.jpg

 

After entering any cell in this workbook and confirming with Enter values from all EPMSaveData functions will be sent to their target cells.

 

When using the native "Refresh Data in the Whole File when Opening it" option this issue does not occur.

 

Has anyone else experienced this problem and how can i avoid this problem?

 

Thank you for your help,

Florian


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>