2016 Mar 08 10:23 AM
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..
2016 Mar 08 10:42 AM
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..
2016 Mar 08 10:29 AM
but i wrote many report programs without using any eventsNo, 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
2016 Mar 08 10:42 AM
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
2016 Mar 08 10:43 AM
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
2016 Mar 08 10:50 AM
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,
2016 Mar 08 11:05 AM
And in fact, one should not mix up events with event handlers as done above:
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |