Ads

SAP ABAP Environment

SAP ABAP Environment


As a ABAP developer, to learn the coding, we have to understand ABAP environment and its tools,statements,execution,activation and saving the ABAP objects and writing the ABAP programmer.

We can understand ABAP environment very well by using Reports to familiarize you with general ABAP statements and tools. ABAP reports are used in many applications. In this chapter, we will look how easy it is to write a simple ABAP Report.

Hello ABAP program

Let's get started with the common “Hello World” example.
Each ABAP statement starts with an ABAP keyword and ends with a period. Keywords must be separated by at least one space. It does not matter whether we use one line or several lines for an ABAP statement.

We enter our code using the ABAP Editor that is a part of ABAP Tools delivered with the SAP Net Weaver Application Server ABAP (also known as ‘AS ABAP’).

Application server with its own database, ABAP run-time environment, and ABAP development tools such as ABAP Editor.  ABAP offers a development platform which is independent of hardware, operating system, and database.

How to use the ABAP Editor

Step 1: Start the transaction SE38 to navigate to the ABAP Editor to create a report .

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.

Step 3: We can 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.

Step 4: After specifying the name of the report, click the CREATE button.
A popup window ABAP: PROGRAM ATTRIBUTES will pop up and we 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'.


Starting the Report


We can use the keyboard (Ctrl + S) or the save icon (right hand side beside the command field) to save the report. ABAP development takes place in AS ABAP.
Starting the report is as simple as saving it. Click the ACTIVATION button (left hand side next to the start icon) and start the report by using the icon DIRECT PROCESSING or the F8 function key. The title “My First ABAP Report” along with the output “Hello World” is displayed as well. Here is the output:

My First ABAP Report Hello World
Viewing the Existing Code

 If you look at the field Program and double-click on the value ZHELLO1, the ABAP editor will display the code for your report. This is called Forward Navigation. Double clicking on an object's name opens that object in the appropriate tool.


Comments

Popular posts from this blog

BADI Interview Questions in SAP ABAP

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced