Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Analysis, edition for Microsoft Office
Viewing all articles
Browse latest Browse all 1521

Using VBA to set Hierarchy Variable in BW Query, Prompt on Hierarchy Variable

$
0
0

Hi Experts :-)

 

I try to use VBA to set a Hierarchy Variable, but i can't achieve it.

Any suggestions?

 

I tried the following code, but its not working:

 

 

 

    Dim lResult As Long

 

    Call Application.Run("SAPSetRefreshBehaviour", "Off")
    Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")


    lResult = Application.Run("SAPSetVariable", "YRGWV42", "MATERIALHIERARCHIE3", "KEY", "DS_1")


    Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")
    Call Application.Run("SAPSetRefreshBehaviour", "On")

 

 

The Problem seems to be the value im passing in, but i don't know which value to set here.

"MATERIALHIERARCHIE3"

 

If i use the dialog i get this here: where YRGWV42 is the variable on the hierarchy and YRGWV11 is the variable on a node of the chosen hierarchy.

12-07-2013 09-29-18.gif

After chosing this hierarchy i can read out the variable YRGWV42:

Its showing me this:

 

12-07-2013 09-32-11.gif

 

So now i tried to do this by suing VBA and not the selectionscreen anymore, but its not working.

 

I also tried to get this by using a prompt, but a prompt on this variable is also not working.

I get a prompt on YRGWDATE which is 0CALMONTH, this working fine,

but YRGWV42 is 0MATERIAL and i want to get the same selection prompt which showing me just the 3 value from the first screenshot without using the standard prompt on AO.

 

Any ideas?

 

Here is the prompt for 0CALMONTH:

 

12-07-2013 09-38-11.gif

 

I want the same prompt for the 0MATERIAL Variable, but i can't get it working.

 

 

Hope you got any ideas for me?

Thanks :-)

 

Best regards

Andy


Viewing all articles
Browse latest Browse all 1521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>