on 02-18-2013 1:35 PM
Hello together,
is there a sample-scripting for accessing a tree in vbs?
Here is my problem:
I want to know, whether the import of an imported list was successful. The tree looks like this:
here is my source code:
Set vtree = session.findById("wnd[0]/usr/subSUBSCREEN:SAPLSBAL_DISPLAY:0101/cntlSAPLSBAL_DISPLAY_CONTAINER/shellcont/shell/shellcont[0]/shell")
vtree.selectItem "1 1","001"
wscript.Echo "Subtype : " & vtree.subtype
wscript.Echo "Treetype: " & vtree.gettreetype '2=Column tree
WScript.Echo "SelMode : " & vtree.getSelectionMode '2=Single Item
WScript.Echo "topNode : " & vtree.topNode
WScript.Echo "text1 : " & vtree.getNodeTextByPath("1")
WScript.Echo "itemtype: " & vtree.getitemtype(vtree.getNodeKeyByPath("1"), "000")
WScript.Echo "nodekey : " & vtree.getnodeKeybypath("1")
WScript.Echo "count : " & vtree.getnodechildrencountbypath("1")
WScript.Echo "image : " & vtree.getNodeAbapimage("1 1")
WScript.Echo "image : " & vtree.getNodeAbapimage("2 2")
and the output:
Subtype : Tree
Treetype: 2
SelMode : 2
topNode : 1 1
text1 : Konsistenzprüfung der Sanktionslisten-Entitäten
itemtype: 0
nodekey : 1 1
count : 500
image1 :
image2 :
How can I be sure that the import was successful?
I solved the problem with this piece of code:
session.findById("wnd[0]/usr/subSUBSCREEN:SAPLSBAL_DISPLAY:0101/cntlSAPLSBAL_DISPLAY_CONTAINER/shellcont/shell/shellcont[0]/shell").doubleClickItem "1 1","001" |
Informationen ausblenden
session.findById("wnd[0]/usr/subSUBSCREEN:SAPLSBAL_DISPLAY:0101/cntlSAPLSBAL_DISPLAY_CONTAINER/shellcont/shell/shellcont[1]/shell").pressToolbarButton "%SEL_OTHR"
'verbleibende Zeilen abfragen
If session.findById("wnd[0]/usr/subSUBSCREEN:SAPLSBAL_DISPLAY:0101/cntlSAPLSBAL_DISPLAY_CONTAINER/shellcont/shell/shellcont[1]/shell").rowCount > 0 Then
MsgBox("Verarbeitung fehlerhaft, Script wird abgebrochen!")
WScript.quit
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.