sap abap basic programming notes

ABAP statements/Keywords

1. Data: Data is used for declaring variables.

Syntax: 

<variables name> <type/like> <datatype> [value <initial value>]
[decimals <no. of decimals>]....
[] --> optional (may/may not be used)
<> --> mandatory/obligatory

Ex: 
data x type i.
data x type i value 10.
data abc type c.

2. Parameters: Generates selection screen for reading user    input.

Syntax:
parameters [:] <variable name> <type/like> <data type> [default <default value>] [obligatory] [lower case]...

3. Write: Generates list processing screen(output screen) for displaying the results.

Syntax:

write[:] <variables>....

4.Constants: used for declaring fixed value variables. it must be initialized at the time of initialization itself.

Syntax:

Constant[:] <variable> type <datatype> value <fixed value>.

**How we can declare a variables in ABAP

Like other programming language we also declare a variables in abap. but first we look how we declare a variables in others languages.

Examples: 

For variables declaration in c/c++/java- :

int x=10;
char y;
float z;
int x,y,z.

For reading user input in c/c++/java :

Scanf, 
cin, 
System.in.read.

For displaying output in C/C++/Java

Printf,
Cout,
System.out.println.

Note:- If anybody want some example of these all topic then kindly send/comment your mail id, i will send the all examples through mail in word format.


**Kindly like and share these all topic with your friends**