Skip to Content
Jan 13, 2021 at 01:32 PM

SAP GUI Scripting API


I'm a learner of python and referring to a python tutorial I'm trying to download documents via SAP GUI using Python, but I got them with the wrong encoding.

When I tried UTF8 - I got the wrong encoding. I changed Codepage settings in connection options to ANSI encoding and I was happy to see fine results working manually.

But with the same SAP connection SAP, GUI proceeds to get the same wrong results, as it was with UTF8. As I understand, on Windows server SAP GUI always uses utf8.

In SAP GUI Scripting API I found SaveAsUnicode session property, which is True by default: session.saveAsUnicode = 0 makes it False, but it does not help. All other methods, connected with code-page are read-only.

So how can I force SAP GUI to use a different encoding?