on ‎2022 Jul 13 2:22 PM
Hi,
is it possible to select two variables (US and DE) with the below code? How should it be adjusted?
Call Application.Run("SAPSetRefreshBehaviour", "Off")
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")
Call Application.Run("SAPSetVariable", "0BWVC_COUNTRY", "US")
Call Application.Run("SAPSetVariable", "0BWVC_COUNTRY", "DE")
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")
Call Application.Run("SAPSetRefreshBehaviour", "On")
Thanks!Request clarification before answering.
Hello Gasper,
it should work like:
Call Application.Run("SAPSetVariable", "0BWVC_COUNTRY", "US;DE")
BR,
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin!
Thank you! This works 🙂
Do you maybe have a solution also for the below code? I would like to use dynamic variables (Datex1 and Datex2) instead of fixed variables (in " "). Please see my code below.
Sub UpdateData()
Dim Datex As String
Worksheets("Sheet1").Select
Datex1 = Range("G2").Text
Datex2 = Range("E2").Text
SetReportingUnit = Application.Run("SAPSetVariable", "Select FCRSCode-Child(s) Opt", Datex2;Datex3, "INPUT_STRING", "DS_1")
Hello Gasper,
for the 2nd example you probably need to concat the texts into one Variable:
Datex = Datex1 & ";" & Datex2
And then use this one:
SetReportingUnit = Application.Run("SAPSetVariable", "Select FCRSCode-Child(s) Opt", Datex, "INPUT_STRING", "DS_1")
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.