cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSetVariable Does Not Work

Kemaley
Discoverer
0 Kudos
245

 

Hello everyone, SAPSetVariable function is not working. I share the code below. lResult returns 0. Thanks in advance...

Screenshot 2024-07-16 065850.pngSub TestSon()

Refresh = Application.Run("SAPExecuteCommand", "RefreshData", "DS_1")
lResult= Application.Run("SAPSetVariable", "OP_DATE_OPEN", "08.07.2024", "", "DS_1")


End Sub

View Entire Topic
MKreitlein
Active Contributor
0 Kudos

Hello @Kemaley 

first of all, you should always give the AO version, you are currently using. I chose this link:

https://help.sap.com/docs/SAP_BUSINESSOBJECTS_ANALYSIS_OFFICE/ca9c58444d64420d99d6c136a3207632/f2713... 

... and you can see that there is one additional parameter, which might be helpful:

  • Text - Single member as text.
  • Key - Single member as key.
  • INTERNAL_KEY - Single member with its internal key.
  • INPUT_STRING - Complex selection of members.
  • INPUT_STRING_AS_ARRAY - Returns the input string as string as array.
  • LITERAL - Single member with its internal key.

Maybe you try this again:

lResult= Application.Run("SAPSetVariable", "OP_DATE_OPEN", "08.07.2024", "KEY", "DS_1")

or the INTERNAL_KEY, which should be 20240708

BR, Martin

 

Kemaley
Discoverer
0 Kudos
First of all, thank you for taking the time to respond. I tried all versions one by one. It refreshes the data, but the prompt part does not work. I couldn't understand the reason. When I searched it on the internet, it actually seems very easy. But I can't figure out what's missing.
Kemaley
Discoverer
0 Kudos
My AO version is 2.8