Hi all,
I'm attempting to drilldown across two queries simultaneously using VBA. The user will click on a single navigation pane, and their navigation options must apply to both queries in the same sheet.
Since it seems SAPBEXsetDrillState and SAPBEXgetDrillState only work for BEx 3.x workbooks migrated to 7.x (see Problem with SAPBEXsetDrillState), I have written a subroutine to determine which characteristics need to be drilled down in the second query (similar to functionality of SAPBEXgetDrillState).
In terms of implementing the drilldown, I found this code on the SCN Wiki (using VBA to set Multiple Drilldowns - SAP NetWeaver Business Warehouse - SCN Wiki):
Set
lBExApp = Application.Run(
"BExAnalyzer.xla!GetBEx"
)
Set
lBExParam = CreateObject(
"com.sap.bi.et.analyzer.api.BExParameter"
)
lBExParam.Add
"DATA_PROVIDER"
,
"<DATA PROVIDER NAME - 2>"
lBExParam.Add
"CMD"
,
"EXPAND"
'lBExParam.Add "CMD", "COLLASP"
lBExParam.Add
"IOBJNM"
,
"<INFO OBJECT TECHNICAL NAME>"
lBExParam.Add
"AXIS"
,
"X"
lBExParam.Add
"WORKBOOK_NAME"
,
"<WORKBOOK TECHNICAL ID>
Call
lBExApp.Process(lBExParam)
Call
lBExApp.FrontendUpdate
Call
lBExApp.Render
Upon inserting the correct data provider name, technical name, and workbook ID, this code works to drilldown in the second query. However, I cannot remove the drilldown. By looking at the code found on the wiki, it seems like I should be able to simply replace "EXPAND" with "COLLASP", but this does not work.
Does anyone have any experience implementing multiple drilldown functionality and/or have any suggestions on how to accomplish this goal?
Kind Regards,
Nick