简体   繁体   中英

Start of selection triggered

I understand that START-OF-SELECTION is triggered when the user executes the program (after the selection screen), but still there is something missing. Example: If I have the code:

gv_var = 2.
INITIALIZATION.
gv_var = 1.

the initialization code will be executed first, but if I have:

gv_var = 2.
START-OF-SELECTION.
gv_var = 1.

Start-of-selection will not be the first thing executed after the user executes. So my question is: What exactly is the point of START-OF-SELECTION if it is not the first thing that is executed after the selection screen? Is it just to make the program easier to read?

You may want to refresh your knowledge about Event Blocks in Executable Programs . INITIALIZATION is run before START-OF-SELECTION , and even before the display of the selection screen. The other important information is

In an executable program, any non-declarative statements that occur between the REPORT or PROGRAM statement and the first processing block are also processed in the START-OF-SELECTION block.

(described here )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM