Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

"No Values Found" message within SE16 - can't access via Statusbar?

0 Kudos

I know how to pull text back from the status bar, but we've recently upgraded from 7.4 to 7.6 which has changed the GUI somewhat; now when doing a search for Vendor Number(s) in SE16 and no data is found, the status bar message seems to "float" above the app and nothing is being returned for status bar text or condition (W, E, A, I).

Performing script recording is not capturing anything to work with, even if I move focus to the text message at the bottom.

1 ACCEPTED SOLUTION

0 Kudos

Not sure where the disconnect came in but I tested the script again this morning with no changes to it, and no restart of my PC and it worked correctly this time reading the status bar. All is well, I will leave the question with this as the answer in case someone else runs into this strange occurrence.


' This sets the Windows Shell environment to enable calling shell script functions such as "sleep"
Set WshShell = WScript.CreateObject("WScript.Shell")



' Checking for error status if no data found
' WScript.Echo session.findById("wnd[0]/sbar").MessageType
 If session.findById("wnd[0]/sbar").MessageType = "E" Then
 ' add error file placeholder for business user to show that data was searched and nothing found
 CreateObject("WScript.Shell").run("cmd /c @echo %date% " & " -- " & vVendorNum & ": NO DATA FOUND" & " >> " & vDataPathTarget & vDataNotFoundName)
 ' add error entry to tracking log file
 CreateObject("WScript.Shell").run("cmd /c @echo %date% %time% " & " -- " & vVendorName & " -- " & vVendorNum & " vendor data NOT FOUND" & " >> " & vDataPathTarget & "RKWA_Data_Download.log")
 ' double click in Vendor number field to reactivate value entries for next iteration
 session.findById("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/ctxtGS_SELFIELDS-LOW[2,9]").setFocus
 session.findById("wnd[0]").sendVKey 2
 Else
<rest of my code runs here>
2 REPLIES 2

0 Kudos

Thank you for the reply Thorsten. Those dates are how they are supposed to be formatted in my installation of SAP so that's not the issue. Doing the same search with the same dates but with a different Vendor number does return valid data. The fact that there is no data returned is not an error - we don't have invoices from all vendors across every time period - but I need to be able to read when there is no data in order to skip the rest of the script and move on to the next Vendor Num. This message used to show up in a status bar that was readable, but seems it does not any more with change to 7.6

0 Kudos

Not sure where the disconnect came in but I tested the script again this morning with no changes to it, and no restart of my PC and it worked correctly this time reading the status bar. All is well, I will leave the question with this as the answer in case someone else runs into this strange occurrence.


' This sets the Windows Shell environment to enable calling shell script functions such as "sleep"
Set WshShell = WScript.CreateObject("WScript.Shell")



' Checking for error status if no data found
' WScript.Echo session.findById("wnd[0]/sbar").MessageType
 If session.findById("wnd[0]/sbar").MessageType = "E" Then
 ' add error file placeholder for business user to show that data was searched and nothing found
 CreateObject("WScript.Shell").run("cmd /c @echo %date% " & " -- " & vVendorNum & ": NO DATA FOUND" & " >> " & vDataPathTarget & vDataNotFoundName)
 ' add error entry to tracking log file
 CreateObject("WScript.Shell").run("cmd /c @echo %date% %time% " & " -- " & vVendorName & " -- " & vVendorNum & " vendor data NOT FOUND" & " >> " & vDataPathTarget & "RKWA_Data_Download.log")
 ' double click in Vendor number field to reactivate value entries for next iteration
 session.findById("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/ctxtGS_SELFIELDS-LOW[2,9]").setFocus
 session.findById("wnd[0]").sendVKey 2
 Else
<rest of my code runs here>