Skip to Content
avatar image
Former Member

SAPScript through Excel doesnt display the buttons and fields in sapgui screen

Dear Experts,

                 I am  using excel file to upload the master data in the SAP System. while recording the SAP Screen through that excel , it doesnt display the SAPGUI screen buttons and text box fields properly. SAPGUI  also looks like older version screen.

I tried that excel script with SAPGUI 720 with latest patch 11 in windows 7 office 2007 version.

Anybody know the solution to fix this issue.

Attached the screenshot of  SAPGUI screen.

Thanks & Regards

Sebastian A

screenshot.png (127.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 30, 2012 at 09:47 AM

    Hi Sebastian,

    if you log via VBS or VBA in SAP, then SAP GUI is running in so-called classical design. This also appears to selected design, if the following to be set:


    START -> All programs -> SAP Front End -> SAP GUI Configuration -> Applications -> Add -> wscript.exe  or excel.exe -> Open -> OK-Button

    If you have any problems, you are advised to offer a little program code. Then we know what is being discussed.

    Regards,

    ScriptMan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 11, 2013 at 06:55 PM

    Hi,

    I tried doing this:

    START -> All programs -> SAP Front End -> SAP GUI Configuration -> Applications -> Add -> wscript.exe  or excel.exe -> Open -> OK-Button

    still nothing happened.  It was working before after an error, the icon disappeared.  I already roboot and re-install the application.

    Please help.

    Thank you.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 13, 2016 at 09:00 PM

    I came across this thread trying to solve my issue, i have followed the steps that Script Man recommended and got the same result as before.

    I am using the code

    Sub Logon()

    Dim SapGuiApp As Object

    Dim oConnection As Object

    Dim session As Object

    Dim SAPCon As Object, SAPSesi As Object

    Dim SAPGUIAuto As Object, SAPApp As Object

    If SapGuiApp Is Nothing Then

        Set SapGuiApp = CreateObject("Sapgui.ScriptingCtrl.1")

    End If

    If oConnection Is Nothing Then

        Set oConnection = SapGuiApp.OpenConnection("1A. Production ECC", True)

    End If

    If SAPSesi Is Nothing Then

       Set SAPSesi = oConnection.Children(0)

    End If

       

    Application.DisplayAlerts = False

       

    With SAPSesi

           

        .findById("wnd[0]/usr/txtRSYST-MANDT").Text = "100"

        .findById("wnd[0]/usr/txtRSYST-BNAME").Text = ""

        .findById("wnd[0]/usr/pwdRSYST-BCODE").Text = ""

        .findById("wnd[0]/usr/txtRSYST-LANGU").Text = "E"

        .findById("wnd[0]").sendVKey 0

           

        .findById("wnd[0]").Maximize

        .findById("wnd[0]/tbar[0]/okcd").Text = "ME51N"

        .findById("wnd[0]").sendVKey 0

       

        End With

         

         Application.DisplayAlerts = True

         MsgBox "After clicking OK, this SAP session is terminated."

    End Sub

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I believe i solved my issue for those who have the same issue.

      making no changes to the code or anything else, i did the following and it solved my display issue.

      in the SAP GUI options box,

      click "Accessibility & Scripting" > "Scripting" > un-check the two Notify options.

      Capture4.JPG (60.6 kB)