How to get variables queryID and Result Area in AO  same as SAPBEXonRefresh(queryID As String, ResultArea As Range)

Hi Folks,
I am migrating some BEX 3.5 workbooks that contain macros into BusinessObjects Analysis workbooks.
VBA knowledge is rare but I figured out how to call routines after refresh using
Application.Run("SAPExecuteCommand", "RegisterCallback", "AfterRedisplay", "Callback_AfterRedisplay")
Now I attempt to copy the SAPBEXonRefresh code into the Sub Callback_AfterRedisplay() but SAP SAPBEXonRefresh
used queryID and ResultArea as parameters.
As far as I see these are global SAP variables available in BEX but not available in AO.
What are the equivalent functions in AO to get those values so that I can use the functions to fill the variable values and the "old" code can run?
Thanks for all replies in advance,
Axel

Hello Axel,
i am not familiar with the SAPBEXonRefresh sub. From the Parameters i infer that it probably gets called once for every queryID and ResultArea.
If you register a "Callback_afterRedisplay" macro in Analysis, it does not get called once for every datasource. It gets called only once after a redisplay, regardless of the number of datasources and crosstabs in your workbook.
Analysis Workbooks have named ranges for the Analysis crosstabs. You should be able to use these for the ResultArea. The named range has a "SAP" put in front of the crosstabs formula alias.
e. g. in the Analysis Design Panel components tab your crosstab is listed with the formula alias "Crosstab1" the named range would be: "SAPCrosstab1".
If your own VBA code needs a ResultArea and QueryID Parameter, determine and assign the appropriate values before executing.
e. g. your workbook has one datasource "DS_1" and one crosstab with formula alias "Crosstab1":
Sub Callback_AfterRedisplay()
Dim ResultArea as Excel.Range
Dim queryID as String
set ResultArea = ActiveWorkbook.Names("SAPCrosstab1").RefersToRange
'probably set ResultArea = Range("SAPCrosstab1") might work as well
queryID = "DS_1" 'or something appropriate to your old code
Call SAPBEXonRefresh(queryID, ResultArea)
End Sub
Sub SAPBEXonRefresh(queryID as String, ResultArea as Range)
<YourOldCode>
End Sub
Adapt the coding in "Callback_AfterRedisplay" to execute the "SAPBEXonRefresh" sub more than once for additional crosstabs and queries.
Regards,
Werner

Similar Messages

  • How to get the preview and edit screen on the same size?

    Hi!
    I have a question about Adobe Premiere Pro cs6. When I import a video, the size is normal in the preview screen (the actual video's size), but when I insert it into the edit screen, it zooms in a little bit and I don't see everything in the video.
    Though my settings are 'fit' and '1/2' for the preview window and also 'fit' and '1/2' for the edit window.
    Does anyone what could be wrong? Or does anyone know how I can reset the settings to the factory defaults?
    Thanks in advance,
    Lotte

    When I drag clips from source to timeline, they automatically are zoomed in. What do I do?

  • How can i get the time and result together show in one Array or in Cluster?

    hello everyone i am a new user .I want to get the time and voltge form a Generater. How can i get the time and result together show in one Array or in Cluster?When i selecte the first(or third...) result then in the front panel display the time and the voltge.Thank you!
    I post the time and voltge NOT together photo
    Attachments:
    12345.GIF ‏54 KB

    You can create an array of clusters with one element being the time and the other being the voltage, like so (using the "Get Waveform Components" function):
    Message Edited by smercurio_fc on 10-17-2007 03:15 PM
    Attachments:
    pic.PNG ‏11 KB

  • I keep getting an error code that my billing info doesnt match my card info.  I verified with my bank, the bank card, and my itunes account and all are exactly the same.  I need this crap fixed, how?

    I keep getting an error that my billing info for my card doesnt match my bank info, but it does.  Nothing has ever been changed.  I called my bank, the card company, and all are exactly the same, word for word as my billing info in iTunes.
    In fact, every time I get the error code that billing doesnt match, my card gets charged a $1.00 authorization fee.  It later falls off, but it shows my card is being billed when they say they cant verify billing info.
    I called Apple support and they want to charge me to get their crap together.
    I need to do some updates and by a couple apps for work and am about ready to go to ANdroid if I cant get it fixed.
    $##@@$%%$##$%%$$%$!!!!!!!!!!!

    If you're in the US, this is usually caused by the simple fact that what the Postal Service shows as your address does not match what you're entering. Go here & see:
    https://tools.usps.com/go/ZipLookupAction!input.action

  • How to get Variable name in output (Report Writer/Painter)

    Hello Experts,
    We have maintained one Repot by using Report Writer, this is the report for Cost center (periodic report), input fields are Fiscal year, Period and Cost Center. In out put system will display the selected cost center balances for individual cost element.
    Output: Excel format: in first sheet it will display balance of the total cost centers selected and from second sheet it will display individual cost center balances.
    My requirement is in the output system is displaying sheet name as CC1,CC2,CC3.......CC50, but my user want to display this as Cost Center 1, Cost Center 2, Cost Center 3...... like this. we have maintained variable name as Cost center 1, cost center 2....., but why system is displaying as CC1,CC2,.... .
    Please help me how to get the full description as sheet name in excel.
    Thanks ......Sudheer

    Hello Everybody,
    Please help me how to get variable name in Report Painter outout ( Excel format ).
    Thanks

  • Urgent How to get variable value in other sub templates from main template

    <?import:file:///C:/Temp/P1.rtf?> <?import:file:///C:/Temp/P2.rtf?>
    <?import:file:///C:/Temp/P3.rtf?>
    <?param@begin: Test;'default_value';'string'?>
    <?$Test?>
    <?CALL: O1?>
    <?CALL: O11?>
    <?CALL: O111?>
    <?CALL: O1111?>
    <?CALL: O11111?>
    <?CALL: P1FOOTER?>
    PageBreak
    <?CALL: O2?>
    <?CALL: O22?>
    <?CALL: O222?>
    <?CALL: O2222?>
    <?CALL: O22222?>
    <?CALL: P2FOOTER?>
    PageBreak
    <?CALL: SUM1?>
    <?CALL: SUM2?>
    <?CALL: SUM3?>
    <?CALL: SUMFOOTER?>
    Now i am passing some parameter value to the main template, but i have to pass that variable value in all other templates.
    I am getting parameter value in main template but not getting in other templates. Getting error BI generation failed
    Please advise me.
    Thanks,
    Jag

    Hi Niel,
    are those variables A and B used for the same characteristics?
    If not, maybe you could try to put variable A also to the 2nd query as dummy variable, that would not affect the query... Then in WAD you would see that just once and then you should be able see the variable A in the step 2 in user exit.....
    But I guess, that has already struck you.....
    Regards
    Pavel

  • How to get automatic plant and shipping point and storage location

    hi,
    sap gurus,
    how to get automatic plant and shipping point and storage location automatically into the sales order
    i have done all the config settings for that
    but its not appearing automatically.
    regards,
    balaji.t

    Hi
    Balaji...
    U can get the plant in sales order,  by doing the default the same in customer master or in  material master. In customer master -- sales are data--shipping tab delivering plant there u can assign and get the same in order for that customer. it is better to do in customer master rather than in material master.
    Shipping point is getting determine in sales order and u can not make it default like plant. Shipping point is determine in the basis of Shipping condition of customer ( ship to party)+ loading group of material + Deliverying plant there u have to assing the shipping point and it will flow in the sales order. Tcode OVL2
    For S loc u have to enter manually in the sales order u can not get it automatically.
    Hope this will help you.
    Thx.

  • I am freeing up some space and am using osx lion, but i have 12gb of back ups, how can i delete these and what are they?

    I am freeing up some space and am using osx lion, but i have 12gb of back ups, how can i delete these and what are they?

    Gotcha.
    Back-ups are what they are: a safety copy. If you feel you don't need them, you can trash them. They could be of a previous System if you upgraded, or something else. You wont get the full picture from looking at system profiler.
    You may want to look into getting an external drive and offloading some stuff to it.

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

  • Can Anyone help with syncing my contacts are getting duplicated and there is a file from my computer and they are not the same it is driving me carazy can anyone help?

    Can Anyone help with syncing my contacts are getting duplicated and there is a file from my computer and they are not the same it is driving me carazy can anyone help?

    Are you in DSL? Do you know if your modem is bridged?
    "Sometimes your knight in shining armor is just a retard in tin foil.."-ARCHANGEL_06

  • How to get the  Checked box which are clicked

    for(int k=0;.....
    jsp code
    <input type=checkbox name=checkbox value='<%=k%>' >
    how to get the particular Checkbox which are checked???

    String[] checkedValues = request.getParameterValues("checkbox");You'll get an array filled with the values only for the checked boxes. In other words, if no boxes are checked, checkedValues will be null or checkedValues.length == 0, not sure, going from memory.
    Hope this helps!
    Patrick

  • How to get current month and last month dynamically??

    how to get current month and last month dynamically
    like
    month = getCurrentMonth();
    lastmonth = getcurrentMonth() -1;
    please help
    thanks

    hi :-)
    /* depracated but can be still useful */
    java.util.Date dtCurrent = new java.util.Date();
    int month = dtCurrent.getMonth();
    int lastmonth = dtCurrent.getMonth() - 1;
    System.out.println("* " + month);
    System.out.println("* " + lastmonth);
    /* better to use this one */
    Calendar cal = new GregorianCalendar();     
    int imonth = cal.get(Calendar.MONTH);
    int ilastmonth = cal.get(Calendar.MONTH) - 1;
    System.out.println("*** " + imonth);
    System.out.println("*** " + ilastmonth);
    regards,

  • How to get count,index and compare to arraylists

    hi
    how to get count,index and comparing of 2 arraylist.... plz suggest me asap...

    How is your question related to JDBC? And what have you done so far with your code?

  • How to get system status and user status ?

    how to get system status and user status for the given production order?
    In which PP table we can
    find these?
    Thanks&Regards
    Satish

    Hi Ram,
    Use the FM "STATUS_READ" to read both the system and user statuses for an Order.
    Alternatively, the following tables store the user and system status info:
    JSTO- Status object information
    JEST- Individual Object Status
    Hope this helps.
    Let me know if u need further information.
    Regards,
    Sonal

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

Maybe you are looking for

  • Error MESSIGE Help please

    Hello, i am copying this code straight out the book and i still get a error message: this is th code and the error messige please help me fix it.... -the program is saved under the correct name and it compiles fine but when it runs this happens : imp

  • Custom Reports in SQL Developer and translations files

    I try to do custom reports for our development team and I would have translated ones, like standards does. Does anyone have any informations on how to do that ? I tried with xliff file in the same directory of my custom xml but without any result. Ha

  • How to make EZ Drummer go Multi in L8?

    Hi, I'm very new to Logic, in fact I'm just migrating from Pro Tools. I have a (seems to be) very easy question: How do I get EZDrummer to work in Multi tracks with Logic 8? Thanks!

  • What means this error

    Exception occurred during event dispatching: java.lang.NullPointerException      at ticks.paint(ticks.java:211)      at sun.awt.RepaintArea.paint(RepaintArea.java:293)      at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:191)      a

  • Re: Predictive Text Removal

    hi  im using my asha 303 when i type a massage  there is an underline in every word. Hope you can help me. thanks