Showing results for 
Search instead for 
Did you mean: 

SAPGUI scripting via. Excel

Former Member
0 Kudos

We have a inhouse SAPGUI scripting tool (not really sure if it is Inhouse or SAP delivered it) that we currently use to perform Mass updates via. Excel. The person who created this has left the company but now we have a need to update this. I have no idea of how it was developed. It just seems like it was customized from available scripting functions alread yavalable. This was created in 2003 and obviously it is outdated.

How it works:

We install this tool/plugin, and it creates a menu item in the Excel called SAP Scripting and it has Connect to SAP, Play, Record, Stop, Generate Input Sheet as options. Wehn you click connect to SAP, it brings up the Logon pad and allows the user to select a system and logon. Then yo ucan click Record and it will capture all the transcations and when you hit stop and click generate input sheet, the script is ready. The script looks something like the below but below is not complete.


The script is converting all the Input Values to UpperCase but when we use this to populate some paramets which are case sensitive, we are having issues. We need to figure out a way so that the script doesn't convert the input values to UpperCase.

have nayone seen this type os scripting tool? Any advice?

IsInput ID ScriptCode


002 MySession.findById("wnd[0]").resizeWorkingPane 95,25,false

003 MySession.findById("wnd[0]/tbar[0]/okcd").text = "/nsu01"

004 MySession.findById("wnd[0]/tbar[0]/btn[0]").press

X 005 MySession.findById("wnd[0]/usr/ctxtUSR02-BNAME").text =

006 MySession.findById("wnd[0]/usr/ctxtUSR02-BNAME").caretPosition = 6

007 MySession.findById("wnd[0]/tbar[1]/btn[7]").press

008 MySession.findById("wnd[0]/usr/tabsTABSTRIP1/tabpLOGO").select

009 MySession.findById("wnd[0]/usr/tabsTABSTRIP1/tabpSNC").select

010 MySession.findById("wnd[0]/tbar[1]/btn[19]").press

X 011 MySession.findById("wnd[0]/usr/tabsTABSTRIP1/tabpSNC/ssubMAINAREA:SAPLSNCB:1002/txtUSRACL-PNAME").text =

012 MySession.findById("wnd[0]/usr/tabsTABSTRIP1/tabpSNC/ssubMAINAREA:SAPLSNCB:1002/txtUSRACL-PNAME").caretPosition = 21

013 MySession.findById("wnd[0]/tbar[0]/btn[11]").press

STOP 014

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Standard Excel VBA uses UCASE to convert text to upper case.