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
1,417

plz explain me abt events in detail

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,372

Hi

<b>Common Events:</b>

1. Intialization:

This is the first event will be trigerred among all the events. In this event you will assigning values to variables.

For eg: if you want to display comments on the selection -screen.

v1 = 'HAI'. and write this variable in the at selection screen then HAI will be displayed in the selection screen.

2. At Selection-screen OUTPUT.

This is triggered before displaying the selection screen. It's just like PBO in Module pool.

3. At Selection-screen.

This event is triggered when the before leaving the selection screen.

4. Start-of-selection.

this is default event trigerred for every executable program. Here you can do all the retrival logic.

5. End-of-selection:

This event is triggered after the start-of-selection. to display the contents on the report.

Classical report events:

1.Top-of-page: Every time a new page is triggered. Mainly this is used for header of the report.

2. End-of-page : every time the list data reaches the footer region of the page.

Interactive report events.

top of page during line selection : top of page event for secondary list.

1. At line-selection : evey time user dbl-clicks(F2) on the list data.

2. At pF<key> :function key from F5 to F12 to perform interactive action on the lis

3. At user-command: to assign the function code for the button on the report.

It's just like PAI of the Module pool program.

Also Check This Link..

http://www.sap-img.com/abap/events-related-to-reporting.htm

Regards,

Padmam.

plz explain me abt events in detail

8 REPLIES 8
Read only

Former Member
0 Likes
1,372
Read only

Former Member
0 Likes
1,372

Hi,

The program then follows this sequence of steps:

It triggers the <b>initialization</b> event, causing the code belonging to initialization to be executed. If you have not coded an initialization event in your program, the driver program skips this step.

It shows the selection screen for your program. (A selection screen is the screen that contains the input fields for your parameter statements.) If your program doesn't have a selection screen, it skips this step.

It triggers the <b>start-of-selection</b> event, causing the code belonging to that event to be executed. If you have not coded a start-of-selection event in your program, it skips this step.

It triggers the <b>end-of-selection</b> event in your program, executing all of the code belonging to it. If you haven't coded an end-of-selection, it skips this step.

It shows the output list to the user.

The order of execution for events is determined by the driver program, not by your program. Therefore, you can code the events in any order and the execution order will still be the same. The order of events in your program doesn't matter; they will always be triggered in the same sequence by the driver program.

Hope this helps.

reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,372

Hi

There will be different types of events in ABAP.

So be clear what events you need ind etail.

Some related to Classical reports, some to Interactive reports and some related to Module Pool Programming(Dialog)

Events in Dialog Program

PBO - Process Before Output

PAI - Process After Input

POH - Process on Help

POV - Process on Valure Request.

Events in ABAP Programming

INITIALIZATION

AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN

START-OF–SELECTION.

TOP OF PAGE

END OF PAGE

END-OF-SELECTION.

Control Break events related to Internal Tables:

AT NEW FIELD

AT END OF FIELD

AT FIRST

AT LAST

Events in Interactive Report

AT USER-COMMAND.

AT LINE-SELECTION

AT PF-FUNCTION KEY

Reward points if useful

Regards

Anji

Message was edited by:

Anji Reddy Vangala

Read only

former_member873340
Active Participant
0 Likes
1,372

Hi nagaraju

Events are declared using the statements EVENTS and CLASS-EVENTS. Declaring an event in a class means that the methods of the class trigger the event and can therefore cause execution of event handlers. In the declaration, you can define output parameters for an event, for which actual parameters are transferred to the event handler when the event is executed.

The statement EVENTS declares instance events. Instance events are linked to objects. They can only be triggered in instance methods of the same class.

The statement CLASS-EVENTS declares static events. Static events are not linked to objects. They can be triggered in all methods of the same class.

Regards

Gowri

Award points if helpful

Read only

Former Member
0 Likes
1,373

Hi

<b>Common Events:</b>

1. Intialization:

This is the first event will be trigerred among all the events. In this event you will assigning values to variables.

For eg: if you want to display comments on the selection -screen.

v1 = 'HAI'. and write this variable in the at selection screen then HAI will be displayed in the selection screen.

2. At Selection-screen OUTPUT.

This is triggered before displaying the selection screen. It's just like PBO in Module pool.

3. At Selection-screen.

This event is triggered when the before leaving the selection screen.

4. Start-of-selection.

this is default event trigerred for every executable program. Here you can do all the retrival logic.

5. End-of-selection:

This event is triggered after the start-of-selection. to display the contents on the report.

Classical report events:

1.Top-of-page: Every time a new page is triggered. Mainly this is used for header of the report.

2. End-of-page : every time the list data reaches the footer region of the page.

Interactive report events.

top of page during line selection : top of page event for secondary list.

1. At line-selection : evey time user dbl-clicks(F2) on the list data.

2. At pF<key> :function key from F5 to F12 to perform interactive action on the lis

3. At user-command: to assign the function code for the button on the report.

It's just like PAI of the Module pool program.

Also Check This Link..

http://www.sap-img.com/abap/events-related-to-reporting.htm

Regards,

Padmam.

Read only

Former Member
0 Likes
1,372

hi

<b>Events in an ABAP/4 Report Program</b>

ABAP/4 report programs are event driven programs

The different events in a report Program are:

<b>Load-of-program</b>

Triggers the associated event in an internal session after loading a program of type 1, M, F, or S. Also runs the associated processing block once and once only for each program and internal session. The processing block LOAD-OF-PROGRAM has roughly the same function for an ABAP program of type 1, M, F or S as a constructor has for classes in ABAP Objects

<b>Initialization.</b>

This event is executed before the selection screen is displayed .

Initialization of all the values.

You can assign different values other than the values defaulted on the selection screen .

You can fill your selection screen with some values at runtime.

<b>At Selection-Screen.</b>

The event is processed when the selection screen has been processed (at the end of PAI ).

Validation & Checks of inputted values happen here

Extras :

…ON VALUE-REQUEST FOR psel_low_high .

The pushbutton for F4 (Possible entries) appears beside the appropriate field.

... ON HELP-REQUEST FOR psel_low_high

. ... OUTPUT

This event is executed at PBO of the selection screen every time the user presses ENTER

<b>Start-of-Selection.</b>

Here the program starts selecting values from tables.

<b>End-of-selection.</b>

After all the data has been selected this event writes the data to the screen.

<b>Interactive Events</b>

Used for interactive reporting. It is used to create a detailed list from a basic list.

Start-Of-Selection

Processing block is executed after processing the selection screen

All the data is selected in this block.

All the main processing on the data except for interactive reporting is handled in this block.

<b>End-Of-Selection

Data which is selected and has been processed is printed to the screen in this block.

List Processing happens in this block

Top-of-Page.

New-Page.

End-of-Page.</b>

Events during List Processing

<b>Top-of-Page.</b>

Triggered by the first write statement in the program

It is used to have a standard header in the program for all the pages.

<b>TOP-OF-PAGE</b> is only executed before outputting the first line on a new page

New-Page.

Can be used when one wants to display different data on different pages

Terminates the current page and continues output on a new page.

Will not trigger the Top-of-Page or End-of-Page.

<b>

End-of-Page.</b>

It is used to have a standard footer for all the pages.

Triggered by the program if the number of records exceed the line-count of the program.

regards

ravish

<b>plz reward points if helpful</b>

Read only

Former Member
0 Likes
1,372
Read only

Former Member
0 Likes
1,372

Hi Nagraj,

Reports in the R/3 systems are online programs whose function is to retrieve data from database and monitoring it.

It consists of Classical reports & Interactive reports.

Classical report consists of one program that creates a single list.

This means that when the list is displayed it has to contain all data requested regardless of details the user want to see.

Classical Report Events:

1) Initialization: This event is triggered when you execute your program for the first time.

2) At selection-screen output: triggered when the selection screen is loaded in memory before being displayed.

3) At selection-screen: The user enters the values in the fields of selection screen and click on execute button this event gets triggered.

4) At selection screen on <filed>: This event is for checking individual fields.

5) Start-of-selection: This is the first event for u r list. Once all the events are triggered for selection-screen the data is retrieved from database.

6) Top-of-page: This event is triggered with first write statement. What ever you write under this event is applicable to all the pages.

7) End-of-page: This event is triggered when end- of –page is reached. In this case page numbers will be written in every page.

8) End-of-selection: All output statements are mentioned after end-of-selection.

Interactive Reporting: Allows to user to participate retrieving and processing data on each level using the session.

It consists of one Basic list and 20 secondary lists.

Basil list starts from: 0

Secondary list starts from: 1

Events:

1) At line –selection: The secondary list triggers the event at line-selection.

2) At user-command: this event is triggered when the users selects the menu item or press any function key.

3) Top of page during line selection: top of page event for secondary list.

4) Set PF-STATUS <VAR>: If you double click on the variable the system takes you to menu painter screen.

Thanks,

Satya Kumar.