Getting Started With ABAP: PART 2
This is the second blog post in this series. Here is the previous blog post Get Started with ABAP Programming From Scratch
In the first blog post, we learn how to create package and how to write your first program.
In this blog post you will learn how to print multiple text on same line and multiple line as well as how to give comments.
In previous blog post we have seen how to create package and program from transaction SE80. So, once you open SE80 (Transaction Code for ABAP Editor) you have already created the package so need to create it every time. Just right click on existing package name and create new program.
While creating program you will see the below window.
Here you can see that type of the program is Executable program. We can create other type of the program that we will learn in later part. Here we are creating Executable Program that is one of the types of program.
How to write multiple text on same line
We can do these two ways.
Step 1: As we learned how to print text in previous blog post. Now I want to print two text on the same line.
Write ‘This is my first Program.’.
write ‘I am learning SAP ABAP.’.
Step 2: Check, Activate and Execute the program.
Step 1: Write Code.
Write: ‘This is my first Program.’,’I am learning SAP ABAP.’.
Step 2: Check, Activate and Execute.
In second method we used colon (:) just after write keyword. So, we don’t need to write two statement to print two or multiple text on same line. In this way you can print multiple text with just one statement.
How to print text on next line
Suppose I want to print second text on next line.
Step 1: Write code.
Write: ‘This is my first Program.’,/’I am learning SAP ABAP.’.
In this way we can print text on next line by using forward slash (/).
How to give comments
Full Line Comments:
We can give full line comments by using *.
Partial Line Comment:
We can give partial comment using “.
Here we have completed the second part of learning SAP ABAP programming. I hope this blog post helped you as beginner.
As we continue to learn more, I will use this second blog post to link all the parts of this series.
Here you can check next blog post Getting Started with ABAP: Data Dictionary Introduction
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.
Previous Blog Post Get Started with ABAP Programming From Scratch
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