<p>Small instruction about SAP scripting.</p>
<p>Activate SAP Scripting in GUI settings (SAP Logon settings).</p>
<p>Open SAP and hit &#8220;Record macro&#8221; in GUI menu. Run all needed steps and stop recording.</p>
<p>As a result you&#8217;ll get file with script. For example I&#8217;ve a script of creating 0015 infotype record:</p>
<p>If Not IsObject(application) Then<br />
Set SapGuiAuto = GetObject(&#8220;SAPGUI&#8221;)<br />
Set application = SapGuiAuto.GetScriptingEngine<br />
End If<br />
If Not IsObject(connection) Then<br />
Set connection = application.Children(0)<br />
End If<br />
If Not IsObject(session) Then<br />
Set session = connection.Children(0)<br />
End If<br />
If IsObject(WScript) Then<br />
WScript.ConnectObject session, &#8220;on&#8221;<br />
WScript.ConnectObject application, &#8220;on&#8221;<br />
End If<br />
session.findById(&#8220;wnd[0]&#8221;).maximize<br />
session.findById(&#8220;wnd[0]/tbar[0]/okcd&#8221;).text = &#8220;pa30&#8221;<br />
session.findById(&#8220;wnd[0]&#8221;).sendVKey 0<br />
session.findById(&#8220;wnd[0]/usr/subSUBSCR_PERNR:SAPMP50A:0110/ctxtRP50G-PERNR&#8221;).text = &#8220;609&#8221;<br />
session.findById(&#8220;wnd[0]&#8221;).sendVKey 0<br />
session.findById(&#8220;wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-CHOIC&#8221;).text = &#8220;15&#8221;<br />
session.findById(&#8220;wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-SUBTY&#8221;).text = &#8220;0030&#8221;<br />
session.findById(&#8220;wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_TIME:SAPMP50A:0330/ctxtRP50G-BEGDA&#8221;).text = &#8220;100914&#8221;<br />
session.findById(&#8220;wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-SUBTY&#8221;).setFocus<br />
session.findById(&#8220;wnd[0]/usr/tabsMENU_TABSTRIP/tabpTAB01/ssubSUBSCR_MENU:SAPMP50A:0400/subSUBSCR_ITKEYS:SAPMP50A:0350/ctxtRP50G-SUBTY&#8221;).caretPosition = 4<br />
session.findById(&#8220;wnd[0]/tbar[1]/btn[5]&#8221;).press<br />
session.findById(&#8220;wnd[0]/usr/txtQ0015-BETRG&#8221;).text = &#8220;11&#8221;<br />
session.findById(&#8220;wnd[0]/usr/txtQ0015-BETRG&#8221;).setFocus<br />
session.findById(&#8220;wnd[0]/usr/txtQ0015-BETRG&#8221;).caretPosition = 18<br />
session.findById(&#8220;wnd[0]&#8221;).sendVKey 11</p>
<p>Then you can put this script as VBA macro into MS Excel, handle it in a right manner (i.e. make a cycle) and automate you regular tasks or data upload/ mass change.</p>
<p>Important: scripting doesn&#8217;t understand system errors, system messages. eCATT and SAP Personas understand.</p>