I have the following code and it appears to always produce an error
Run-time error ‘619’: The control could not be found by id.
at the line session.findbyid("wnd[1]/usr/radRSEUMOD-TBALV_GRID").Select
.
I have attempted using different ways to identify the radio button I want to select, but none of that worked.
Sub fill_data()
' Establish connection with SAP
If Not IsObject(sapApplication) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set sapApplication = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(Connection) Then
Set Connection = sapApplication.Children(0)
End If
If Not IsObject(session) Then
Set session = Connection.Children(0)
End If
If IsObject(Wscript) Then
Wscript.ConnectObject session, "on"
Wscript.ConnectObject sapApplication, "on"
End If
window0SAPID = "wnd[0]"
session.findbyid("wnd[0]/usr/ctxtP_TABLE").text = "KNKK"
press session, "F8"
session.findbyid("wnd[0]/usr/ctxtI2-LOW").text = "0001"
session.findbyid("wnd[0]/usr/txtMAX_SEL").text = ""
press session, "F8"
press session, "F8"
session.findbyid("wnd[1]/usr/radRSEUMOD-TBALV_GRID").Select
End Sub
The button I want to select is the one in yellow:
SAP screen
And this is the technical information of that radio button:
Technical information
I appreciate the help as I am not able to record a script in SAP.
Sabrina Montenegro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.