Highlighted
Absent Member.
Absent Member.
2013 views

Issue with status bar text - sap gui protocol

Hello,

I am facing an issue where i am trying to capture the dynamic value in the status bar text , I have used sapgui_status_bar_get_text and
sapgui_status_bar_get_param , but when i try to put 1 , i get the whole text , all i need is a number from the text , i couldnt get it for "2" also , it showed blank ,
version of LR - 9.5 no patches ,version of SAP GUI - 7.2

Please let me know your inputs if you have come across such a scenario
Thanks
Dilip
0 Likes
2 Replies
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Issue with status bar text - sap gui protocol

Hello Dilip,

we are using item1 and item2.

Have a look at an extract of our source code.

'eg for Statusbarmessages
'Order 380099127 saved with notification 3800104015 (eg for iw51)
'H:Standard Order 40067976 has been saved (eg for va01)
'Standard PO created under the number 38222527 (eg for ze55)
'Number of confirmations saved for order 380099336: 1 (eg for zzsa1)

If SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").Exist Then
'Readout Statusbar
Parameter("out_MessageText") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("text")
Parameter("out_MessageType") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("messagetype")
messageid = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("messageid")

Select Case messageid
'iw51
Case "IW" Parameter("out_MessageItem") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("item1")
'miro
Case "M8" Parameter("out_MessageItem") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("item1")
'vf01
Case "VF" Parameter("out_MessageItem") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("item1")
'ip50
Case "IP" Parameter("out_MessageItem") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("item1")
'migo
Case "MIGO" Parameter("out_MessageItem") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("item1")
'va01
Case "V1" Parameter("out_MessageItem") = SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiStatusBar("StatusBar").GetROProperty("item2")
End Select

End If

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Issue with status bar text - sap gui protocol

ups...your question is about LR and not QTP. Sorry.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.