Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Why ABAP is called Event Driven.

0 Likes
2,252

i have a doubt remained in my mind i.e why abap is event driven ?

many of them said that without event wee cant write a abap program so abap is event driven program.

but i wrote many report programs without using any events..

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,707

Whitout any explicit event, but not without implicit event


In an executable program, all statements that are not declarations and that are listed before the first explicit processing block, or if the program does not contain any explicit processing blocks, then all functional statements of the program, are assigned to an implicit event block START-OF-SELECTION, which is inserted before any explicit START-OF-SELECTION event blocks.

Like in


Raymond, my code written before INITIALIZATION is not executed before selection-screen display...

Regards,

Raymond

i have a doubt remained in my mind i.e why abap is event driven ?

many of them said that without event wee cant write a abap program so abap is event driven program.

but i wrote many report programs without using any events..

5 REPLIES 5
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
1,707
but i wrote many report programs without using any events

No, there is no report without event.


If you don't code an event processing block explicitly, the standard event START-OF-SELECTION is handled implicitly.

Have a look at all events that happen, when you SUBMIT a report.

Horst

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,708

Whitout any explicit event, but not without implicit event


In an executable program, all statements that are not declarations and that are listed before the first explicit processing block, or if the program does not contain any explicit processing blocks, then all functional statements of the program, are assigned to an implicit event block START-OF-SELECTION, which is inserted before any explicit START-OF-SELECTION event blocks.

Like in


Raymond, my code written before INITIALIZATION is not executed before selection-screen display...

Regards,

Raymond

Read only

Former Member
0 Likes
1,707

Also don't get confused with a normal windows style program which is fully event driven in that you have actual physical events happening such as mouse clicks,  Got_Focus,  Key_Press Enter, Lost_Focus etc etc.

These type of things as far as I am aware are only available in the various objects that handle user interaction rather than a standard ABAP report.

Regards

Rich

Read only

Former Member
0 Likes
1,706

Well the undisputed authority on ABAP is Horst and he has spoken

Many trainee developers in my team ask the same , so just click on the display object list icon on the se38 screen of your report program you will see a left panel open up. See there is an event folder.

You expand it in your program that you wrote without any explicit event you shall see the START-OF-SELECTION. It's the default event in ABAP program.

So when some one told you ABAP report can be written without an event he meant explicitly writing events.

BR,

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
1,706

And in fact, one should not mix up events with event handlers as done above:

  • (Reporting) events are raised by the ABAP runtime environment
  • Event handlers are the processing blocks that are triggered by the events

If you don't code an explicit processing block say for INITIALIZATION, the event is triggered but not handled. START-OF-SELECTION is an exception, because it's processing block is always there. Theerfore, the event START-OF-SELECTION always triggers an event handler.

Horst