Statement

<< Click to Display Table of Contents >>

Navigation:  All About ABAP Technique > English > ABAP Tutorial > ABAP Syntax >

Statement

Statement is lines of codes which instruct an order. In ABAP, every statement always close by dot(.) at the end.

These are few  examples of statements:

>> Source Code

write 'Hello, World !!'.

 

>> Display

abap_syntax0001

Statements are always begined by ABAP Keywords (Example: TYPES , DATA , write dst). Keyword determine statement Catagory.

These are reference of statement at ABAP Program:

1.Data Types

2.Declaration of Data Type

This statement use to define a data type or object as variable of program.

Example :

 TYPES <variable_name> TYPE <type>.

DATA <variable_name> TYPE <type>.

 

3.Compound Statement

Compound Statement is group of statements of a block coding. It's also called as "Block Statement".

Example :

FORM <form_name>.
 Statement 1.
 Statement 2.
 ...
 Statement n.
ENDFORM.

 

FUNCTION <function_name>.
 Statement 1.
 Statement 2.
 ...
 Statement n.  
ENDFUNCTION.

 

MODULE <module_name>.
 Statement 1.
 Statement 2.
 ...
 Statement n.    
ENDMODULE.

 

4.Control Statement

Control Statement is used to control statement flow according to conditions that siutable to algoritma of program we want.

Example :

IF <condition1>.
 <statement block>
ELSEIF <condition2>
 <statement block>.
ELSEIF <condition3>.
 <statement block>
.....
ELSE.
 <statement block>
ENDIF.

 

5.Operator Statement

Operator Statement is keyword for doing some process of type/object that declared in a program.

Example :

WRITE <statement>.

ADD <variable 1> to <variable 2>.

 

6.Database Statement

Database Statement is statement that used for accessing database. In ABAP, there are 2 statement for accessing database, these are Open SQL and Native SQL.

 

7.Structures

8.Internal Tables