Skip to Content

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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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


    Capture.JPG (105.4 kB)
    Capture2.JPG (28.1 kB)
    Capture3.JPG (64.7 kB)
    Add a 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)

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.