10-23-2012, 02:59 PM
Try the below code. This is just a sample code, modify as per your need.
Regards,
Ankesh
Code:
strAllItems=SAPGuiSession("micClass:=SAPGuiSession").SAPGuiWindow("micClass:=SAPGuiWindow").SAPGuiTabStrip("micClass:=SAPGuiTabStrip","name:=TAXI_TABSTRIP_OVERVIEW").GetROProperty("allitems") '//Just update the tabe name here
arrTabsName=Split(strAllItems,";")' split and get tabs name in array
'iterate through all tabs
For i=0 to Ubound(arrTabsName)
If Instr(arrTabsName(i),"<Part of tab name which is fixed")>0Then
SAPGuiSession("micClass:=SAPGuiSession").SAPGuiWindow("micClass:=SAPGuiWindow").SAPGuiTabStrip("micClass:=SAPGuiTabStrip","name:=TAXI_TABSTRIP_OVERVIEW").Select arrTabsName(i)
Exit For
End If
Next
Regards,
Ankesh