
Given it won't do anything but it connects and then disconnects from your first open SAP session. So now we can connect to an already open SAP GUI session. In Python that is done using the win32com.client module. To do anything with gui scripting you first have to connect to the SAP GUI scripting com object. If you are on a different SAP version your controls used may be different.

If you need some work on Python you can check out YouTube for many tutorials along with multiple websites. If you don't know SAP you shouldn't be doing this. You can even use something like Notepad++ or plan old Notepad but I don't recommend Notepad as it has no syntax highlighting which will make it much easier.Īlso I assume you have a working knowledge of SAP GUI usage and Python. Also I'll be using P圜harm Community edition but you can use any IDE you prefer. If you don't have Python installed you can get it here.

Python 2.7 to be exact but the same should work in Python 3.5. What I am going to do is provide some how to's on scripting SAP GUI with Python. I'm not going to debate the better language here that has been done. SAP even has a built in recorder but I don't use VB I use Python.

So I know you can script SAP GUI actions using Visual Basic.
