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

Problem in Events

Former Member
0 Likes
793

Hi all,

I have a small code to take one parameter and print its value. the code is as follows,

REPORT  z_sdn.

PARAMETERS:
  p_var TYPE i.

END-OF-SELECTION.
  WRITE:'Input value is',p_var.

here I neither have any START-OF-SELECTION nor any free statement so that START-OF-SELECTION be applied to it.

But when I check it in debugging mode, under overview tab, it shows a START-OF-SELECTION .

Please explain.

1 ACCEPTED SOLUTION
Read only

prasanth_kasturi
Active Contributor
0 Likes
763

hi,

START-OF-SELECTION is the default event which is triggered even if we do not explicitly mention the events

The Report statemnt itself acts as START-OF-SELECTION event

regards

prasanth

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
763

there is always a START-OF-SELECTION EVENT in a REPORT program, you don't have code by you in it but it is here nevertheless.

Regards

Read only

former_member206377
Active Contributor
0 Likes
763

Hi Anirban,

Start-of-selection is an implicit standard event block in an ABAP program, if there are no blocks mplemented in the program then by default it will be assigned to the "Start-of-selection" event.

Regards,

Vasuki

Read only

prasanth_kasturi
Active Contributor
0 Likes
764

hi,

START-OF-SELECTION is the default event which is triggered even if we do not explicitly mention the events

The Report statemnt itself acts as START-OF-SELECTION event

regards

prasanth

Read only

Former Member
0 Likes
763

Hi Anirban

greetings

As per i knw Start-of-Selection is implicitly defined with Report statement.

and it is fired before the first executable statemnet. so in debugging u r seeing a start-of-selection block.

Read only

Former Member
0 Likes
763

Hi Anirban,

In an executable program, all statements that are not declarations, and are listed before the first explicit processing block, are assigned to this event block. If the program does not contain an explicitly defined event block START-OF-SELECTION, these statements form the complete event block START-OF-SELECTION. If a program contains an explicitly defined event block START-OF-SELECTION, these statements are added to the beginning of the event block. If the program contains no explicitly defined event blocks, these statements form the entire event block START-OF-SELECTION. Even if we do not have any free statement, START-OF-SELECTION event is implicitly triggerred.

Hope this information will help you.

Reward if helpful.

Read only

Former Member
0 Likes
763

hi,

The REPORT statement automatically starts the START-OF-SELECTION processing. Any processing between the REPORT statement and the subsequent event key word is executed at START-OF-SELECTION .

Immediately after, the processing block introduced by an explicit START-OF-SELECTION is executed.

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.

hope this will help.

reward if useful.

Sumit Agarwal

Read only

Former Member
0 Likes
763

Hi anirban,

As you might be knowing that start-of-selection is the default event in any report program.Also the report statement in a program falls under the start-of-selection event.

In your program you only have end-of-selection .So all the remaining statements including the parameter declaration are a part of start-of-selection.That is the reason why you are getting start-of-selection in the debugging mode.

Good Luck,

bhumika