SAP ABAP

ABAP stands for Advanced Business Application Programming and it’s a high level programming language used in SAP for the development and other customization processes. Normally a transaction code is used for executing an ABAP program. For example we can use the transaction code VA01 for creating a sales order.

ABAP used to be an abbreviation of Allgemeiner Berichtsaufbereitungsprozessor, the German meaning of “generic report preparation processor” , but was later renamed to Advanced Business Application Programming. ABAP was one of the first languages to include the concept of Logical Databases (LDBs), which provides a high level of abstraction from the basic database level(s).ABAP is one of the many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting.

ABAP syntax
This brief description of the ABAP syntax begins inevitably with the ubiquitous “Hello World” program.
“Helloworld”

REPORT TEST.
WRITE ‘Hello World’.

This example contains two statements: REPORT and WRITE. The program displays a list on the screen. In this case, the list consists of the single line “Hello World”. The REPORT statement indicates that this program is a report. An alternative statement, PROGRAM, would be used for a module pool.
Formatting rules:

The basic formatting rules of ABAP are simple:

  •     Every ABAP statement must end in a period
  •     Tokens within a statement must be separated by at least one space
  •     An end of line is equivalent to a space
  •     Statements and keywords are not case-sensitive

The “Hello World” program could be legally rewritten as follows:

REPORT tESt. WRITE
‘Hello World’ .

Comments

ABAP has 2 ways of defining text as a comment:

An asterisk (*) in the leftmost column of a line makes the entire line a comment
A double quotation mark (“) anywhere on a line makes the rest of that line a comment

Example:

***************************************
** Program: BOOKINGS                 **
** Author: Joe Byte, 07-Jul-2007     **
***************************************

REPORT BOOKINGS.

* Read flight bookings from the database
SELECT * FROM FLIGHTINFO
WHERE CLASS = ‘Y’       “Y = economy
OR    CLASS = ‘C’.      “C = business
(…)

About iamsolusi

just ordinary people

Posted on February 27, 2012, in SAP Modules and tagged , . Bookmark the permalink. Leave a comment.

Comments are closed.

%d bloggers like this: