Skip to Content

Script Recording "Save file" not showing in recording in transaction SE37


I have recorded the Transaction call SE37 and FM "RECA_GUI_TEXTEDIT_POPUP" buth when it Comes to the popup with the needed thext and I click on save to local hdd it works well, but not shown in the script coding. Could you please help me to get the right Statement to define my own save Folder and file Name? Or how Can I use copy and paste from/to clipboard. I have added the script code into my Excel to use also a macro as seen below. Please help me!



Add comment
10|10000 characters needed characters exceeded

  • Set SapGuiAuto = GetObject("SAPGUI")  'Get the SAP GUI Scripting object
    Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
    Set SAPCon = SAPApp.Children(0) 'Get the first system that is currently connected
    Set session = SAPCon.Children(0) 'Get the first session (window) on that connection
    On Error Resume Next
    If Not IsObject(Application) Then
      Set SapGuiAuto = GetObject("SAPGUI")
    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
    x = 2
    For i = 1 To 2
      session.findById("wnd[0]/tbar[0]/okcd").Text = "se37"
      session.findById("wnd[0]").sendVKey 0
      session.findById("wnd[0]/usr/ctxtRS38L-NAME").Text = "RECA_GUI_TEXTEDIT_POPUP"
      session.findById("wnd[0]").sendVKey 8
      session.findById("wnd[0]/usr/txt[34,8]").Text = "ROUTING"
      session.findById("wnd[0]/usr/txt[34,9]").Text = "010N100882250000000100000007"
      session.findById("wnd[0]/usr/txt[34,10]").Text = "PLPO"
      session.findById("wnd[0]/usr/txt[34,11]").Text = "EN"
      session.findById("wnd[0]/usr/txt[34,12]").Text = "03"
      session.findById("wnd[0]/usr/txt[34,12]").caretPosition = 2
      session.findById("wnd[0]").sendVKey 8
      session.findById("wnd[0]").sendVKey 3
      session.findById("wnd[0]").sendVKey 8
    x = x + 1
    Next i
    End Sub
  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 21, 2016 at 10:14 AM

    Hi Stephan,

    uncheck the "Show native MS Windows dialogs" option in the SAPGUI options (If you have the version SAP GUI 7.4), then it will work.



    Add comment
    10|10000 characters needed characters exceeded