WRITE STATEMENT
When we set the attribute type to Executable Program it means your program is executable. This means that program can run on its own.
For small programs we can work on Executable programs but for large programs we do modular programming.
Every statement in ABAP program start with ABAP keyword and end with period '.' .
Report is the first statement of ABAP standalone program . We can replace the keyword report with program that makes absolutely no difference.
A small piece of code .
write : 'Hello' .
The above statement prints Hello.
If I want to display it after 30 spaces.
write : 30 'Hello'.
We can also use color codes to add color to text .
write : 30'Welcome to ABAP' color 4.
write : 30'ZWelcome to ABAP' color 4 inverse on.
The above two codes gives result with slight difference.
You can try it.
We can giver color values between 1-7. For more details we can also use F1 help by just double clicking on the keyword that will direct you to F1 help screen .
We can also use alignment like right and left justified and centered.
write : (60) 'Left' left-justified,
(60) 'Right' right-justified,
(60) 'Center' Centered .
Here 60 is the column length that we have selected to make alignment.
Every statement in ABAP program start with ABAP keyword and end with period '.' .
Report is the first statement of ABAP standalone program . We can replace the keyword report with program that makes absolutely no difference.
A small piece of code .
write : 'Hello' .
The above statement prints Hello.
If I want to display it after 30 spaces.
write : 30 'Hello'.
We can also use color codes to add color to text .
write : 30'Welcome to ABAP' color 4.
write : 30'ZWelcome to ABAP' color 4 inverse on.
The above two codes gives result with slight difference.
You can try it.
We can giver color values between 1-7. For more details we can also use F1 help by just double clicking on the keyword that will direct you to F1 help screen .
We can also use alignment like right and left justified and centered.
write : (60) 'Left' left-justified,
(60) 'Right' right-justified,
(60) 'Center' Centered .
Here 60 is the column length that we have selected to make alignment.
Loved your blog..Keep it up!!
ReplyDeleteThank you Adhaar .
Deletethanks fr sharing :)
ReplyDeleteYou're welcome Dino
ReplyDelete