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

events

Former Member
0 Likes
586

what is the default event in reports?

can we call multiple selection screen in a single report?

3 REPLIES 3
Read only

Former Member
0 Likes
557

Start-of-Selection is a Default event, if you are not maintained any events in your report program.

Yes possible to create multiple selection screen in your selection list.

Read only

Former Member
0 Likes
557

Hi,

START_OF_SELECTION is the default event.

You can use multiple selection screens in a sinle report.

Event blocks are introduced by an event keyword. They end when the next processing block begins. The following processing block can either be an event block or another processing block allowed in this context – for example, a subroutine or a dialog module. Event keywords have the same name as the events to which they react.

Example for the structure of an executable program:

REPORT...

NODES: spfli, sflight.

DATA:...

INITIALIZATION.

...

AT SELECTION-SCREEN.

...

START-OF-SELECTION.

...

GET spfli...

..

GET sflight...

...

GET spfli LATE.

...

END-OF-SELECTION.

...

FORM...

...

ENDFORM.

The sequence in which the processing blocks occur in the program is irrelevant. The actual processing sequence is determined by the external events. However, to make your programs easier to understand, you should include the event blocks in your program in approximately the same order in which they will be called by the system. Subroutines should be placed at the end of the program.

With only two exceptions (AT SELECTION-SCREEN and GET), event blocks have no local data area. All declarative statements in event blocks are handled with the global data declarations in the program. You should therefore include all of your declarations at the start of the program (see also Structure of ABAP Programs).

Statements that are not assigned to a processing block are never executed. In executable programs, all non-declarative statements between the REPORT or PROGRAM statement and the first processing block are assigned to the default event START-OF-SELECTION. if a program does not contain an explicit START-OF-SELECTION event block, these statements form the entire START-OF-SELECTION block. If a program contains an explicitly defined START-OF-SELECTION event block, these statements are inserted at the beginning of this event block. If a program does not contain any explicit event blocks, all non-declarative statements form the processing block START-OF-SELECTION.

REPORT demo_abap_events_1.

WRITE / 'Statement 1'.

FORM routine.

WRITE / 'Subroutine'.

ENDFORM.

WRITE / 'Statement 2'.

PERFORM routine.

WRITE / 'Statement 3'.

This produces the following output:

Statement 1

Only the event block START-OF-SELECTION is started in this program. This block consists of the first WRITE statement.

Now we insert a START-OF-SELECTION statement in the program:

REPORT demo_abap_events_2.

WRITE / 'Statement 1'.

FORM routine.

WRITE / 'Subroutine'.

ENDFORM.

START-OF-SELECTION.

WRITE / 'Statement 2'.

PERFORM routine.

WRITE / 'Statement 3'.

The output is now as follows:

Statement 1

Statement 2

Subroutine

Statement 3

In this program, the START-OF-SELECTION processing block consists of all statements except the FORM – ENDFORM block. A more readable form of the same program would look like this:

REPORT demo_abap_events_3.

START-OF-SELECTION.

WRITE / 'Statement 1'.

WRITE / 'Statement 2'.

PERFORM routine.

WRITE / 'Statement 3'.

FORM routine.

WRITE / 'Subroutine'.

ENDFORM.

In this case, you could also omit the event keyword START-OF-SELECTION.

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
557

Hi Kalandar,

Events in Dialog Program

PBO - Process Before Output

PAI - Process After Input

POH - Process on Help Request

POV - Process on Value Request.

Events in ABAP Programming

Classical Reporting:

INITIALIZATION

AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN

START-OF–SELECTION.

TOP-OF-PAGE

END-OF-PAGE

END-OF-SELECTION.

Events in Interactive Report

TOP-OF-PAGE DURING LINE-SELECTION

AT USER-COMMAND.

AT LINE-SELECTION

AT PF-FUNCTION KEY

Control Break events related to Internal Tables:

AT NEW FIELD

AT END OF FIELD

AT FIRST

AT LAST

U can call multiple selection screens in a single report program.

cheers,

Hema.