RWayneH
asked on
Loop through dynamic array, set each position as variable.
I have a scenario that I have to loop through values that are in a dynamic array or string. Looking for some guidance in understand this.
AllTabs=SAPGuiSession("Ses sion").SAP GuiWindow( "Display Normal Order 200760677").SAPGuiTabStrip ("TABSTRIP _CHAR").Ge tROPropert y("allitem s")
AllTabs output could be "GR_01;GR_02;GR_03;SG_01;S G_02;SG_03 ;SG_04;SG_ 05;SG_06;S G_07;SG_08 ;SG_09;SG_ 10;SG_11;S G_12;SG_13 ;SG_14;SG_ 15;SG_16;S G_17;"
I am trying to loop thru the values starting with GR_01, and defining it as a var, like make it H = to whatever is in first position.
For i = 0 to ubound(AllTabsB)
CurrentTab=SAPGuiSession(" Session"). SAPGuiWind ow("Displa y Normal Order 200760677").SAPGuiTabStrip ("TABSTRIP _CHAR").Ge tROPropert y("selecte ditem")
If CurrentTab = H Then
MsgBox "On right tab"
SAPGuiSession("Session").S APGuiWindo w("Display Normal Order 200760677").SAPGuiTabStrip ("TABSTRIP _CHAR").Se lect i
Else
MsgBox "On WRONG tab"
End If
Datatable.GetSheet("Result s").AddPar ameter AddAdditionalResultParamet ersForFunc tion(i),""
Next
AllTabs=SAPGuiSession("Ses
AllTabs output could be "GR_01;GR_02;GR_03;SG_01;S
I am trying to loop thru the values starting with GR_01, and defining it as a var, like make it H = to whatever is in first position.
For i = 0 to ubound(AllTabsB)
CurrentTab=SAPGuiSession("
If CurrentTab = H Then
MsgBox "On right tab"
SAPGuiSession("Session").S
Else
MsgBox "On WRONG tab"
End If
Datatable.GetSheet("Result
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This helped me understand the use of Arrays, Thanks.
Welcome.
ASKER