12-19-2012, 06:46 PM
Ankesh,
big thanks to you and the web......exactly what i was trying to do. According to your instructions, I made the following and will like to hear from you if it is ok.
Please see also the attached file:
‘my final code might look like this (2 coloms where multiple values may exist - Char. Value and Description)
Is this correct?
big thanks to you and the web......exactly what i was trying to do. According to your instructions, I made the following and will like to hear from you if it is ok.
Please see also the attached file:
‘my final code might look like this (2 coloms where multiple values may exist - Char. Value and Description)
Code:
strCharacters=Datatable("InputCharacters",dtGlobalSheet)'get the datatable values
strDescription=Datatable("InputDescription",dtGlobalSheet)'get the datatable values
arrCharacters=Split(strCharacters,".")
arrDescription=Split(strDescription,".")
For i=0 to Ubound(arrCharacters)
For i=0 to Ubound(arrDescription)
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiEdit("Characteristic").Set "QTWTEST2"
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiButton("Create").Click
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiEdit("Description").Set "QTP characteristics test2"
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiComboBox("Data Type").SetFocus
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiComboBox("Data Type").Select "Character Format"
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiEdit("Number of Chars").Set "6"
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiTabStrip("TABSTRIP1").Select "Descriptions"
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiTabStrip("TABSTRIP1").Select "Values"
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiTable("Allowed Values").SetCellData i+1,"Char. Value",arrCharacters(i)
next
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiTable("Allowed Values").SetCellData i+1,"Description","arrDescription(i)"
next
SAPGuiSession("Session").SAPGuiWindow("Characteristics").SAPGuiTable("Allowed Values").SelectCell 1,"Description"
Is this correct?