SapBex Functions

Question: Hi BW Gurus!!

I´m trying to use BEx modules in Visual Basic, and specially, SAPBExcopyFilterValue Function, but It is not working well, I suppose I´m not using it in the correct way. So, I´´m just look for Notes and found 395272 and a How to paper from SAP but the process not run.
So, Any hints about using that modules, and this particular one?
What I´m trying to do it´s comunicate two queries in the same workbook, in order to get the same parameters for both of them....

Ideas? suggestions?
Thanks in advance!!!!
BW Girl

Answer:
I made a little test on my system, putting this VBa code into the SAPBExonrefresh :
I've got 2 queries, one on "Feuil1" worksheet, second on "Feuil2"
Everytime one query is refreshed, I copy the customer filter (located in B7 or in B8 cell of relevant worksheet) on the other query.

Here is the code

If queryID = "SAPBEXq0001" Then
    i = Run("SAPBEX.XLA!SAPBEXcopyFilterValue", Worksheets("Feuil1").Range("B7"), Worksheets("Feuil2").Range("B8"))
Else
    i = Run("SAPBEX.XLA!SAPBEXcopyFilterValue", Worksheets("Feuil2").Range("B8").Select, Worksheets("Feuil1").Range("B7").Select)
End If

_________________
When my car stops, I first look at the gasoline's level before dismounting the engine.


Tuly Idiot's fan club active member.

Answer:
Be carefull, if you only cut/paste this code, you'll have a wonderfull loop because calling the copy filter implies a refresh of the query, so a call to copy filter, so a refresh, so a copy filter, so a refresh ......
_________________
When my car stops, I first look at the gasoline's level before dismounting the engine.


Tuly Idiot's fan club active member.

Answer:
Hi Fred

Exactly, that´s whats happened with my test, I got a terrible loop!! So, was the clue to avoid that!!!

thanks so much for your comments, I really appreciated that,

BW Girl.....
Copyright ?2007 - 2008 www.jt77.com