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: 

Google Sheets App Script to receive TCODE ZBPP053 data.

terry-lzx
Discoverer
0 Kudos

I wrote one code as below in order to extract ZBPP053 into clipboard, but error happened in "GuiAuto = GetObject("SAPGUI")". Any issues?

var GuiAuto = GetObject("SAPGUI"); var application = GuiAuto.GetScriptingEngine; var connection = application.Children(0); var session = connection.Children(0); var window1 = session.findById("wnd[0]"); window1.findById("tbar[0]/okcd").text = "ZBPP053"; window1.sendVKey(0); window1.findById("usr/ctxtP_WERKS").text = "ZBPP053"; window1.findById("usr/ctxtS_DISPO-LOW").text = "312"; window1.findById("usr/ctxtS_DISPO-LOW") = setFocus; window1.findById("usr/ctxtS_DISPO-LOW").caretPosition = 3; window1.findById("tbar[1]/btn[8]").press; window1.findById("tbar[1]/btn[45]").press; var window2 = session.findById("wnd[1]"); window2.findById("usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[4,0]").select; window2.findById("usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[4,0]").setFocus; window2.findById("tbar[0]/btn[0]").press;
0 REPLIES 0