<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAP GUI Scripting - Update Customer Block (XD05) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-gui-scripting-update-customer-block-xd05/m-p/12457416#M2000006</link>
    <description>&lt;P&gt;Team,&lt;/P&gt;
  &lt;P&gt;I am new the GUI Scripting. &lt;/P&gt;
  &lt;P&gt;Requirement customer block :&lt;/P&gt;
  &lt;P&gt;SAP record &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.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 application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "XD05"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtRF02D-KUNNR").text = "9000018"
session.findById("wnd[0]/usr/ctxtRF02D-BUKRS").text = "1000"
session.findById("wnd[0]/usr/ctxtRF02D-VKORG").text = "1000"
session.findById("wnd[0]/usr/ctxtRF02D-VTWEG").text = "10"
session.findById("wnd[0]/usr/ctxtRF02D-SPART").text = "00"
session.findById("wnd[0]/usr/ctxtRF02D-SPART").setFocus
session.findById("wnd[0]/usr/ctxtRF02D-SPART").caretPosition = 2
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtKNA1-AUFSD").text = "01"
session.findById("wnd[0]/usr/ctxtKNVV-AUFSD").text = "01"
session.findById("wnd[0]/usr/ctxtKNVV-AUFSD").setFocus
session.findById("wnd[0]/usr/ctxtKNVV-AUFSD").caretPosition = 2
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[0]/btn[11]").press


&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Excel file follows. &lt;/P&gt;
  &lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1947899-err3e3.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG alt="" style="font-size: 15px; color: inherit;" /&gt;&lt;/P&gt;
  &lt;P&gt;How to achieve the above with vba code .&lt;/P&gt;</description>
    <pubDate>Sat, 26 Jun 2021 18:38:48 GMT</pubDate>
    <dc:creator>former_member726365</dc:creator>
    <dc:date>2021-06-26T18:38:48Z</dc:date>
    <item>
      <title>SAP GUI Scripting - Update Customer Block (XD05)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-gui-scripting-update-customer-block-xd05/m-p/12457416#M2000006</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;
  &lt;P&gt;I am new the GUI Scripting. &lt;/P&gt;
  &lt;P&gt;Requirement customer block :&lt;/P&gt;
  &lt;P&gt;SAP record &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.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 application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "XD05"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtRF02D-KUNNR").text = "9000018"
session.findById("wnd[0]/usr/ctxtRF02D-BUKRS").text = "1000"
session.findById("wnd[0]/usr/ctxtRF02D-VKORG").text = "1000"
session.findById("wnd[0]/usr/ctxtRF02D-VTWEG").text = "10"
session.findById("wnd[0]/usr/ctxtRF02D-SPART").text = "00"
session.findById("wnd[0]/usr/ctxtRF02D-SPART").setFocus
session.findById("wnd[0]/usr/ctxtRF02D-SPART").caretPosition = 2
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtKNA1-AUFSD").text = "01"
session.findById("wnd[0]/usr/ctxtKNVV-AUFSD").text = "01"
session.findById("wnd[0]/usr/ctxtKNVV-AUFSD").setFocus
session.findById("wnd[0]/usr/ctxtKNVV-AUFSD").caretPosition = 2
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[0]/btn[11]").press


&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Excel file follows. &lt;/P&gt;
  &lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1947899-err3e3.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG alt="" style="font-size: 15px; color: inherit;" /&gt;&lt;/P&gt;
  &lt;P&gt;How to achieve the above with vba code .&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2021 18:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-gui-scripting-update-customer-block-xd05/m-p/12457416#M2000006</guid>
      <dc:creator>former_member726365</dc:creator>
      <dc:date>2021-06-26T18:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAP GUI Scripting - Update Customer Block (XD05)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-gui-scripting-update-customer-block-xd05/m-p/12457417#M2000007</link>
      <description>&lt;P&gt;It's unrelated to ABAP, better use the tag UI SAP GUI For Windows, although it's a pure Excel/VBScript question, that you should better ask in a Microsoft VBScript forum.&lt;/P&gt;&lt;P&gt;But first of all, it's very easy to use the Excel macro recorder, which produces VBA code. After that, you manually adapt it to become VBScript.&lt;/P&gt;&lt;P&gt;If you need answers for precise questions, you can search the Web, there are so many useful help sites.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2021 19:45:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-gui-scripting-update-customer-block-xd05/m-p/12457417#M2000007</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-06-26T19:45:15Z</dc:date>
    </item>
  </channel>
</rss>

