Think Like Python: A Guide for ABAP Developers
If you are coming from ABAP, you are probably used to opening SAP GUI, going into SE38, SE80, ADT, or Eclipse, and working inside a controlled development environment. Python feels different at first because the workbench is something you assemble: Python itself, an IDE, a project folder, packages, and eventually Git.
This chapter walks through that setup slowly and practically. By the end, you should have a local Python project that can run a small script and install packages. That foundation will support the first project in the next chapter: an ALV-style table report rebuilt with Python and Bokeh.
A lot of Python setup confusion comes from vocabulary. Here is the quick translation table.
Start by installing Python from the official Python website. On Windows, make sure to check the option that adds Python to your PATH during installation. If you miss that checkbox, the command line may not recognize Python.
Open Command Prompt or PowerShell and run:
On some Windows machines, this command may work instead:
If you see a Python version number, you are ready for the next step.
This usually means Python was not added to PATH. The beginner-friendly fix is to rerun the installer and choose the option to modify your install, then enable the PATH option.
You can use either PyCharm or VS Code. Both are valid. The right choice depends on how much structure you want.
Good if you want a guided Python experience. It helps manage projects, interpreters, virtual environments, and packages through a more complete IDE interface.
Good if you want a lightweight editor that can become powerful through extensions. You will need the Python extension and a little comfort with the terminal.
Create a folder for the book projects. Keep it simple and avoid spaces in the folder name.
Inside that folder, create a file named:
Add this small test script:
From the project folder, run:
Or, on Windows:
A virtual environment is a project-specific Python sandbox. Instead of installing every package globally on your machine, you install packages inside the project’s environment.
Create a virtual environment:
Activate it on Windows PowerShell:
Activate it on Windows Command Prompt:
Activate it on macOS/Linux:
Your terminal prompt usually changes and shows (.venv) at the beginning.
Python packages are reusable libraries. In ABAP terms, imagine being able to install useful external toolkits into a project. For our early projects, we will use packages like pandas and Bokeh.
With your virtual environment active, run:
Then capture those dependencies into a requirements file:
Later, another developer can install the same dependencies with:
Git is version control. You do not need to become a Git expert on day one, but you should know enough to save your progress, recover from mistakes, and share examples.
A Git commit is not exactly the same thing as an SAP transport, but the mental model is similar: you are collecting related changes and giving them a meaningful label.
You are ready to continue if you can do the following:
These are official or widely trusted references. You do not need to read them fully now. Keep them nearby when you need deeper details.