cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

script_man
Active Contributor
0 Kudos

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

0 Kudos

Thanks Script Man

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.