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.
After chosing this hierarchy i can read out the variable YRGWV42:
Its showing me this:
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:
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