Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert
Hi Analysis Office VBA programmers,
are your tired of looking up Analysis Office VBA command syntax in the documentation?
are you jealous of the great context sensitive help in SAP BusinessObjects Design Studio while writing code there?
If you answer at least one of those questions with yes it will be worth reading that blog.
In this first part of my series I will explain how to get a generic syntax help while coding analysis specific vba like that...
list of available commands
list of available parameters for a command
To get this help you need to follow these steps:
  1. Go to the VBA editor and create a new Module.
  2. Paste in the following code which can be used as example implementation
    Public Function SAP_SetFilter(iDataSource As String, iDimension As String, iMember As String, iMemberFormat As String) As Integer
        SAP_SetFilter = Application.Run("SAPSetFilter", iDataSource, iDimension, iMember, iMemberFormat)
    End Function
    Public Function SAP_AddMessage(iText As String, Optional iSeverity As String = "INFORMATION", Optional iDetails As String = "") As Integer
        SAP_AddMessage = Application.Run("SAPAddMessage", iText, iSeverity, iDetails)
    End Function
  3. Export your Module to a .bas file
When you do your next VBA project simply import your .bas file in the vba editor and as soon as you write your vba code you can see the help available like on the screens above.
In the next part of that blog I will explain how to enrich that with more details like the available filter setting for the SAPSetFilter command like on the screen below.
Hope you enjoy...
* I added a TXT as Example. There are all APIs included except SAPExecuteCommand. I will think about how to best implement it. You can download it and than change file extension to  .bas
* See the second part, its available now