Quantcast
Channel: SCN : All Content - SAP BusinessObjects Analysis, edition for Microsoft Office
Viewing all articles
Browse latest Browse all 1606

VBA: Create embedded help for writing Analysis Office VBA commands - PART 1

$
0
0
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 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
screen01.jpg
list of available parameters for a command
screen02.jpg
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.
screen03.jpg
Hope you enjoy...
Dirk
PS: Maybe we will find someone who has some spare time to generate a complete list. I will not find the time myself in the next weeks and I do not have a full list up to now.

Viewing all articles
Browse latest Browse all 1606

Trending Articles



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