Skip to Content
0
Former Member
Nov 15, 2012 at 05:59 PM

BEx 3.x & VBA - automatisation of regular refreshing

47 Views

Hi everybody,

I've been a silent reader for a while and have used the search function extensively, including searching for code from "Peter Knoer", who seems to be very knowledgeable yet inactive since some time, and I have also tried implementing quite a bit of code which I found on my way here, however so far unsuccessful. I'm new to SAP but quite familiar with VBA, though I'm self- and google taught and do have significant knowledge gaps.

I am currently creating and implementing an Excel tool with a variety of functions which are pretty much all up and running, excepts the core one - regular, completely automatic i.e. macro-steered updates of queries. Specifically, I would like a macro to run/refresh a query and change a specific variable within it, to be exact: the date. I made myself somewhat familiar with the BEx interface and as stated before, I tried some code but it doesn't do as I please. For example, I found code which automatically logs on to SAP, which it does successfully, but it seems to log-out again straight away, because when I try to use another piece of code with which to retrieve the query/table I'm looking for, I have to insert my password again. Which in turn does work, but I just don't get the table. I found both subs I just described on here on some threads, but I currently don't have them here, if you would like to see them I will see to repost them underneath.

So.... long story short: Does anybody have some VBA code which does what I want: Update a query completely automatically (given username, password and the date for which to update the query)? Everything else I can do on my own...