I have 3 types of different icons that represent status of the record. I need to programmatically (using SAP Scripting) read rows and understand their statuses:
The issue that method GetAbapImage(key, name)
returns the same value @5
for both Error (red) and Success (green) statuses. For unprocessed it returns value @B
.
The sample code snippet that demonstrates my approach is the following:
Dim container
Set container = session.findById("wnd[0]/usr/cntlMAIN_CONTAINER/shellcont/shell/shellcont[0]/shell/shellcont[2]/shell")
WScript.echo TypeName(container) 'returns: ISapTreeTarget
WScript.echo container.GetTreeType() 'returns: 2
WScript.echo container.GetAbapImage(" 230", "STATUS") 'returns: @B
WScript.echo container.GetAbapImage(" 235", "STATUS") 'returns: @5
WScript.echo container.GetAbapImage(" 243", "STATUS") 'returns: @5
Where IDs 230, 235 and 243 are respective IDs for the three lines shown above on the screenshot.
Suggestion on how to more properly get row statuses is highly welcome!