cancel
Showing results for 
Search instead for 
Did you mean: 

Universe Refresh Structure using BI 4.1 SDK?

Former Member
0 Kudos

Hello Experts,

I was looking for a code snippet which will be used to retrieve the universe (.unv) from BI 4.1 and perfrom refresh structure on it.

I got the below code:

===============================

Private Sub
   Document_AfterRefresh()
   Dim DesignerApp As Designer.Application
   Dim Univ As Designer.Universe
   Set DesignerApp = New Designer.Application
   DesignerApp.Visible = False
   DesignerApp.Logon "Administrator", "Password", "CMSName","SecEnterprise"
   Set Univ = DesignerApp.Universes.Open("eFashion.unv")
   Univ.RefreshStructure
   Univ.Save
   DesignerApp.Quit
   Set DesignerApp = Nothing
End Sub

=================================

from thread: http://scn.sap.com/thread/3682547

Does the above code snippet require an IDE to execute, or a macro in excel.

Please suggest.

Regards,

Mitesh Joshi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mitesh,

-To run the above code snippet you need a VBA editor.

-Visual Basic Editor is the tool used to create, modify and maintain Visual Basic for Applications (VBA) procedures and modules in Microsoft Office applications. The Visual Basic Editor is included with most Office programs

-You can use Microsoft Excel to run your VB code.

-To get more information related to COM SDK Developer Guides and API References

You can follow below link

http://scn.sap.com/docs/DOC-27465

Thanks,

Jayashree

Former Member
0 Kudos

Hi Jayashree,

Thanks for your help.

Can i create a program object with this VBA code snippet. Like we do using Java (jar) file.

Please suggest.

Regards,

Mitesh Joshi

DellSC
Active Contributor
0 Kudos

The VBA code snippet will only run in Excel.  However, it is possible to create a program that does the same thing in Visual Studio.  You would have to reference the "Designer" COM object in the program, which could then be written in either VB or C#.

-Dell

Answers (0)