ABAP Programming 01
ABAP Programming 01
Login language
Steps for creating a program
▪ Step 1 − Start the transaction SE38 to navigate to the ABAP Editor (discussed
in the next chapter). Let's start creating a report that is one of the many
ABAP objects.
▪ Step 2 − On the initial screen of the editor, specify the name of your report
in the input field PROGRAM. You may specify the name as ZHELLO1. The
preceding Z is important for the name. Z ensures that your report resides in
the customer namespace.
▪ The customer namespace includes all objects with the prefix Y or Z. It is
always used when customers or partners create objects (like a report) to
differentiate these objects from objects of SAP and to prevent name
conflicts with objects.
▪ Step 3 − You may type the report name in lower case letters, but the editor
will change it to upper case. So the names of ABAP objects are ‘Not’ case
sensitive.
Steps for creating a program(Contd..)
▪ Step 4 − After specifying the name of the report, click the CREATE
button. A popup window ABAP: PROGRAM ATTRIBUTES will pop up
and you will provide more information about your report.
▪ Step 5 − Choose "Executable Program" as the report type, enter the
title “My First ABAP Report” and then select SAVE to continue. The
CREATE OBJECT DIRECTORY ENTRY window will pop up next. Select
the button LOCAL OBJECT and the popup will close.
▪ You can complete your first report by entering the WRITE statement
below the REPORT statement, so that the complete report contains
just two lines as follows −
REPORT ZHELLO1.
WRITE 'Hello World'.
ABAP Editor
• This section is used to declare the components of
the classes such as attributes, methods, events .
• They are enclosed in the ABAP statements CLASS ...
ENDCLASS.
CLASS <class_name> DEFINITION.
...
ENDCLASS.
• Implementation: This section of a class contains the
implementation of all methods of the class.
• The implementation part of a local class is a
processing block.
CLASS <class_name> IMPLEMENTATION.
...
ENDCLASS.
Data Types
IS INITIAL
The condition becomes true if the contents of the variable have not changed and it has been automatically assigned its initial value. Example (A IS INITIAL) is not true
IS NOT INITIAL
The condition becomes true if the contents of the variable have changed. Example (A IS NOT INITIAL) is true.
String operations
CO (Contains Only)
Checks whether A is solely composed of the characters in B.
CA (Contains ANY)
Checks whether A contains at least one character of B.
CS (Contains a String)
Checks whether A contains the character string B.
CP (Contains a Pattern)
It checks whether A contains the pattern in B.
Contact: +91-9930522904
Mail: mayur.dhande17@live.com