Getting started with ABAP Programming from Scratch
I am happy to share my very first blog post on SAP ABAP Programming. In this blog post you will learn how to create package and how to write your first program. This blog post based on classic development in SAP GUI.
How to Create Package
Once you login to the system, below screen will be open. On the left side of the screen there is command field. You can enter transaction code to go to any task of SAP application.
SE80 and SE38 are transaction code for ABAP editor.
Follow the below steps to create package.
Step 1: Enter SE80 transaction code in command field and press Enter.
Step 2: Select package from the drop-down list.
Step 3: Enter package name and press Enter.
Step 4: It will prompt you to create the package if the package with the same name is not present. Click on Yes.
Step 5: Give short description and press enter and package is created.
How to write program
Step 1: Once the package is created, right click on the package name. You will get the below options.
Step 2: Click on Create option. Once you click on it you will get options. Select Program option.
Step 3: Give the program name. Program name should start with Z or Y.
Step 4: Save it in your package. Once you save it you will get below screen. Here you can write your code.
Program to print Text
There is a keyword WRITE to print a text on output screen.
Syntax: Write ‘This is my first program’.
Write: It is a keyword to print text on output screen.
Whatever the text that we want to print on output screen must be inside the single quotation mark.
The statement is closed with period(.).
Note: Each statement must be closed with period(.).
Once you write your code, you can check your code whether it is syntactically correct or not.
To check click on check button which is shown in below image.
Once you click on it will show you the error if it is present. If not, you will get the message like No syntax errors found in report.
Then you have to activate your program. To activate this, click on activate button.
Once your program is activated you can execute your program. Click on execute to run the program.
Note: Any changes if you done in your program then first you have to activate the program then run it. If the program is inactive then you will not be able to run your program. You can see that status just besides the report name.
Once you execute it, you will get the output.
Here you have completed the first step into your learning SAP ABAP programming journey. I hope this blog post helped you as beginner.
As we continue to learn more, I will use this first blog post to link all the parts of this series.
Here you can check next blog post Getting Started With ABAP: PART 2
Follow my profile to be notified of the next blog post. Please feel free to ask any questions you have in the comments section below.
Join the conversation about the ABAP programming by following the tag ABAP Development
Post questions and answer related to tag by following the tag Questions & Answers
Read other blog post on topic ABAP Development