Beginners Guide To ABAP – Module 1 – Introduction To The ABAP Workbench

Learn ABAP

As part of the Beginners Guide to ABAP this article will focus on taking a first look at an SAP ABAP Workbench. We are going to fire up the SAP system and open up the ABAP Workbench. Just before we do this, let’s quickly discuss the structure of an ABAP program.How An ABAP Program Is Structured

How An ABAP Program Is Structured

As with many other programming languages, ABAP programs are normally structured into two parts. The first part of the program is what we consider to be the Declaration Section.

Declaration Section of an ABAP Program

This is where we define the Data Types, Structures, Tables, Work Area Variables, and the Individual Fields that we want to use inside an SAP ABAP program. This is also where we would declare Global Variables that will be available throughout the individual subsections of the programs we create.

When an ABAP program is created, we not only declare Global Variables but we have the option to declare variables that are only valid inside specific sections of our program. These sections are commonly referred to as Internal Processing Blocks.

Program Declaration Section

The Declaration Section of a program is where you define the parameters used for the Selection Screens for your report. Once we have declared tables, global variables, and data types in the declaration section of our program, you then move on to the second part of an ABAP program and this is where you will write all the business logic code. This part of an ABAP program is often split up into what we call the Processing Blocks.

ABAP Processing Blocks

ABAP Processing BlocksThe Processing Blocks that we define within an ABAP program can be called from the Dynpro Processor that we discussed in SAP Environment article and video, depending on the specific rules we create within our program. Processing Blocks are nearly always just small sections of programming logic that allow us to separate logical functions found within our programs.

The ABAP Workbench

Let’s now focus on the SAP system itself and take a look at the ABAP Workbench. When you open the SAP GUI, you may have a different menu Tree to the one shown in this screen shot but that is because I have set up my SAP GUI so that we have a minimal menu option available that we will take a look at during this ABAP Training Course.SAP GUI

The first thing we’re going to do is take a look at some of the key features of the ABAP Workbench. To get to the workbench we can just use the menu system on the left-hand side. If we open up the SAP menu and click on the Tools menu option you will see the ABAP Workbench. Open that up and then you’ll see four different options within.ABAP Workbench

The first thing we want to do is just a very quick run through an overview of how we run a transaction in SAP. Hopefully you are all familiar with this but here we will just show you the two ways.

First of all, you can open up the menu tree and when you have an item that does not look like a folder, that’s an actual transaction you can run. So in this case, run the Object Navigator. Double click it then you will the status bar at the bottom of the screen show the message “Starting the transaction”. The Object Navigator will then display in your main SAP GUI window.Object Navigator

To exit or step back out of the transaction, just press the Back button or press the ‘F3’ key on your keyboard.

The other way of running the transaction is by entering the Transaction Code directly in to the Transaction Input area

Now a little trick so that you become familiar with all the different SAP transaction codes and so that you don’t have to use the menus all the time is to activate a specific setting from the Extras menu.SAP GUI Settings Select Settings and the dialogue box that comes up has four options. SAP GUI - Display technical names

Choose the bottom one that says “Display technical names”, then click the little green tick icon.

This action refreshes the menu tree and when you navigate inside, back to the Overview menu again, you can now see the actual transaction codes that you can use to trigger application of your choice. As you work with the SAP system, you will become familiar with the transaction codes and realise it is a very fast and efficient way of navigating around the different transactions within the system.SAP GUI - technical transaction codes

We will now go step by step through the different options within the ABAP Workbench menu tree and highlight the 4 or 5 major pieces of the ABAP Workbench that you will become familiar with and will use as an ABAP developer.

The ABAP Dictionary

One thing that most of ABAP programs will have in common is that they will read or write data to and from database tables within an SAP system.

The ABAP Workbench has a transaction to allow us to create database tables and view the fields that make up the table themselves and browse the data inside. This is called the ABAP Dictionary.ABAP Dictionary

You can find the ABAP dictionary by going through the ABAP Workbench menu to the Development option and there you’ll see ABAP Dictionary and its transaction code, SE11.

The ABAP Editor

The next and probably the most used part of the ABAP Workbench is the ABAP Editor and this is where we will spend a lot of our time in this course. The ABAP Editor is where we create all the code. It’s where we build all the logic and by using forward navigation (which is a function within an SAP system that we will touch on later), you can actually define function modules, jump forward to the ABAP Dictionary and create screens.ABAP Editor

The ABAP Editor can be found under the Development menu again and its transaction code SE38.

The Function Builder

The next most important part of the workbench is the Function Builder. The Function Builder is very similar to the ABAP Editor but its main function is to actually define specific tasks that can be called from any other program.

Function BuilderYou create interfaces in the Function Builder where you define the different data elements and the different types of tables that can be passed to and from the actual function that you build.

We will touch on the Function Builder a little later when we divide our programs into self code function modules. The Function Builder can be called from transaction code SE37 and it can normally be found just under the ABAP Editor option on the SAP menu tree.

The Menu Painter

The next item we want to look at is called the Menu Painter. Under the User Interface folder, you’ll see it can be triggered by using transaction code SE41.Menu Painter

The Menu Painter is a tool that can be used to create buttons, icons, and menu bars which can all be triggered by events within an ABAP program.

You can define whether the event is triggered by a mouse click, or by simply pressing a short-cut key on your keyboard.

A good example of the type of menus that can be built is the menu bar and buttons in your standard SAP GUI. The LOG-OFF button can be activated by either clicking the button itself or by pressing the short cut keys Shift + F3 together.Menu Bar Example

The Screen Painter

The next item in our list is the Screen Painter and that can be called by using transaction code SE51. Screen Painter

The Screen Painter as you might guess, allows you to define the user input screen so you can define text boxes, drop down menus, list boxes and input fields, tab areas of the screen, and so on.

It lets you define the interface that the user will use and define all the different fields, buttons, drop downs that you put on your screen. You then define the individual functions that get called when the user interacts with it.

The Object Navigator

We have saved the best for last. The last item that we are going to look at is called the Object Navigator.

The Object Navigator is a fantastic tool. It brings all the other tools together under one roof and gives you a very efficient environment for you to develop different programs.Object Navigator

When you building large programs that have many function modules, many screens and Include files, the Object Navigator is the ideal tool to use so that you can navigate all around your development with ease.

You can find the Object Navigator under the Overview menu under the ABAP workbench and it’s transaction code, SE80.

So that more or less covers the main features of the ABAP Workbench that we will interact with in this ABAP course. You will see in the SAP menu tree there are many, many other transactions that can be used to help in the development of your programs. But the ones we have just covered take care of 90% to 95% of the development tools that you will use.

I hope this overview of the ABAP Workbench has been helpful and if you have any questions please leave a comment below and will be happy to answer them all.

Categories

About the Author:

Pete has been working with SAP technologies for over 10 years. He started out as an ABAP consultant and then moved on to BW where he has worked many different clients covering a wide variety of industries. "I love introducing SAP technology (especially BI) to new clients and showing them how they can go from zero to hero within their business in super fast time". Contact me on twitter @PeterMoxon