Pages

Monday 10 February 2014

Introduction to ABAP

BAP stands for - Advanced Business Application Programming.It is  a programming language for developing applications for the SAP R/3 system.

The latest version of ABAP is  called  ABAP Objects and supports object-oriented programming. SAP will run applications written using ABAP/4, the earlier ABAP version, as well as applications using ABAP Objects.

Without further adieu , lets dive into ABAP.

Note, this tutorial will not go into extensive details on ABAP language constructs (which become very boring to read ) but quickly introduce key concepts to get you started so you can focus your attention on more important topics.

Data Types

Syntax to declare a variable in ABAP -
DATA Variable_Name Type Variable_Type
Example:
DATA employee_number Type I.
The following is a list of Data Types supported by ABAP
Data TypeInitial field lengthValid field lengthInitial valueMeaning
Numeric types
I440Integer (whole number)
F880Floating point number
P81 - 160Packed number
Character types
C11 - 65535... 'Text field(alphanumeric characters)
D88'00000000'Date field(Format: YYYYMMDD)
N11 - 65535'0 ... 0'Numeric text field(numeric characters)
T66'000000'Time field(format: HHMMSS)
Hexadecimal type
X11 - 65535X'0 ... 0'Hexadecimal field
Processing Data - Assigning Values
a=16.

move 16 to a.

write a to b.
- Arithmetic Operations
compute a = a*100.

Control Statements

Following control statements can be used - - If ... EndIf Loop
if [not] exp [ and / or [not] exp ].
........
[elseif exp.
.......]
[else.
.......]
Endif.
- Case statement
Case variable.
when value1.
.........
when value2.
.........
[ when others.
.........]
Endcase.
Do.
-While loop

While <logical expression>.
.....
.....
Endwhile.
- Do loop

Do <n> times.
.....
.....
Enddo.

Logical Operator

A list of logical operators
  • GE or >=
  • GT or >
  • LE or <=
  • LT or <
  • EQ or =
  • NE or <>

ABAP/4 Editor

Finally , here is where you will spent most of your time as a developer creating / modifying programs. Transaction SE38
Introduction to ABAP

2 comments:

  1. Blogs can serve as valuable networking tools, connecting individuals with similar interests and industry professionals. SERP Performance Ways Articles documenting historical events and developments provide valuable records for future generations.

    ReplyDelete

  2. Embarking on the journey of "Introduction to ABAP" opens doors to the realm of Advanced Business Application Programming. As we delve into the intricacies of ABAP, it's akin to exploring the Advancements in Dental Technology—both domains evolve, embracing innovation. Stay tuned for an engaging experience in the world of programming, just as dentistry continues to evolve for brighter smiles.

    ReplyDelete