As part of our migration strategy, we need to decide what to do with our workbooks. As BEx Analyzer has been around the longest of most of our BI Tools, this is generally the most widely deployed in our current customer base. Therefore, over the years, users may have become very savvy with these workbooks and may have ventured into using Visual Basic within these applications. This blog shows what BW 3.x functions in VBA are part of the public API that was published. It also discusses what the corresponding function is in SAP NetWeaver 2004s BI.
How do we compare?
Within SAP NetWeaver 2004s BEx Analyzer, a design toolbar has been added that allows us to use many elements and features we did not have previously. Therefore, in general, the use of Visual Basic is generally going to less in the new environment. However, we are talking about what migrates, so let us take a look. Figure 1 shows what functions existed in BW 3.x and their corresponding functions in SAP NetWeaver 2004s BI.
NOTE: Not all functions that existed in BW 3.x exist in SAP NetWeaver 2004s BI. In general, this is because these functions generally would not be needed due to being replaced by new objects available in the new design toolbar. However, this may cause some problems for migration.
Figure 1 - Comparison of Functions
BW 3.x
SAP NetWeaver 2004s BI
Comments
SAPBEXgetWorkbookID
SAPBEXgetWorkbookID
SAPBEXreadWorkbook
SAPBEXreadWorkbook
SAPBEXsaveWorkbook
SAPBEXsaveWorkbook
SAPBEXgetErrorText
SAPBEXgetErrorText
SAPBEXsetFilterValue
SAPBEXsetFilterValue
SAPBEXgetFilterValue
SAPBEXgetFilterValue
SAPBExcopyFilterValue
SAPBEXsetDrillState
SAPBEXsetDrillState
SAPBEXgetDrillState
SAPBEXgetDrillState
SAPBEXrefresh
SAPBEXrefresh
In the 2004s Analyzer, ALL the items in the workbook can be refreshed, but refreshing a query individually is not supported
SAPBEXpauseOn
BEx.Synchronize = true
SAPBEXpauseOff
BEx.Synchronize = false
SAPBEXfireCommand
SAPBEXcheckContext
SAPBEXgetFilterValue
SAPBEXshowTextElements
SAPBEXembedQuery
SAPBEXgetResultRangeByID
SAPBEXgetResultRangeByID
SAPBEXjumpInitial
SAPBEXjump
SAPBEXgetResultRange_ResultArea
SAPBEXgetResultRange
SAPBEXtoolbar
What to be careful of?
We see the functions that are the same between BW 3.x and SAP NetWeaver 2004s BI. In general, these things will migrate ok. The functions that have changed and that do not exist will generally require manual work for migration.
Are there other functions in SAP NetWeaver 2004s BI?
Of Course! There are lots of new VBA functions available in the public xBEXapi module. In addition, the interface to call connection handling, BEx Precalculation, and other common functions are also in a public interface. Keep in mind that you should NOT use VBA as a first step. This is only after you've explored the new native capabilities in the BEx Design Toolbar.
Where do I find details and examples?
Easy. The best place to go for documentation is the online help. For a list of the functions for the BW 3.x runtime, see the online help here: Integration with Visual Basic for Applications. For SAP NetWeaver 2004s BI, you don't even need to go to the online help. The functions are documented directly within the modules. Open the Visual Basic Editor with the SAP NetWeaver 2004s BEx Analyzer and go to the xBExAPI module to see all the functions you can run! They are commented right there...