SAP GUI for Java auto login

Any desktop programmer can write a simple script to login via SAP GUI for Java automatically!

If you want to skip instructions and see a sample Python code, check sap_connection.py in my pet project Kutapada.

Step 1: Dynamically create a string with the following format:

conn=<CONNECTION>&clnt=<CLIENT>&user=<USER>&pass=<PASSWORD>&lang=<LANGUAGE>&expert=true

Here is an example:

conn=/H/10.1.3.122/S/3200&clnt=100&user=KEREM&pass=SECRET&lang=TR&expert=true

If you aren’t familiar with that connection string format, check this article.

Step 2: Save this string as a text file with the extension .sapc . Example file name: login.sapc

Step 3: Let your OS open this file, as if the user double-clicked. If your file associations are accurate, SAP GUI for Java will read this file and log in automatically.

Step 4: For security purposes, delete the generated .sapc file. Otherwise, you will be storing your password in an unencrypted text file.

Advertisement

5 thoughts on “SAP GUI for Java auto login

  1. Hello,

    I found your Kutapada project very interesting. I would like to use it, but I’m having trouble installing the module:
    sagkutana.

    I couldn’t find it to download.

    Could you help me?

      1. Javanın SAP Gui sine odaklı olunca sizin Py uygulama yerine java gui ile denedim bu hatayı aldım. Şimdi sizin gitteki py uygulamayı çalıştırmaya çalışıyorum. Py de çok fazla bilgim olmadığı için henüz çalıştıramadım.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s