cancel
Showing results for 
Search instead for 
Did you mean: 

How i can Log-In SAP BusinessObjects Analysis for Excel via VBA Macro to refresh data

Former Member
0 Kudos

Dear Comunity,

I am brand new in this comunity, and I am located in Germany. Maybe somebody can help me to get an answere to my question.


For a full automatic report i am using the SAP BusinessObjects Analysis for Excel an i need to know how i can log in in Excel on the SAP system to refresh my data via VBA Macro.

From Tammy Powlas, I found some informations in the following discussion but in my case I get an error.

http://scn.sap.com/community/businessobjects-analysis-ms-office/blog/2011/06/26/can-you-use-vba-with...

I dont know how to implementat my SAP System in my VBA script.

Can somebody help me to build the script?

With kind regards

Andreas

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hello Andreas,

please take a look at:

Best regards,

Werner

Former Member
0 Kudos

Hello Martin and Werner,

Thanks a lot for your quick support. Because of your Help i found out the solution for my script.
Now everything is working well.

the First step was the LINK from Werner to log-in and the second step was the script from Martin to refresh data.

Thanks a lot again.

Andreas

Former Member
0 Kudos

Hi Andreas,

great that we could help you solving it.

Would you mark the question as "Answered"... if you don't mind? 😄

Regards, Martin

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Andreas,

the link you have there is from 2011 ... I guess some things changed in the meanwhile?!

When you want to refresh your query, e.g. "DS_1", there is no need to "implement" the SAP System Information, since Excel already stored if you inserted the query from your Dev., QA, or Prod. System...

Just use the example coding

Sub refresh()

Dim lResult as Long

lResult = Application.Run("SAPExecuteCommand", "Refresh", "DS_1")

End Sub


What is the error message, you were talking about?

Of course, the user who is executing the macro must have a valid user with proper authorization...

Best regards,

Martin

Former Member
0 Kudos

This message was moderated.