Application Development 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: 

interactive report

Former Member
0 Kudos

Can anybody tell me what are the order of events in interactive report??

7 REPLIES 7

Former Member
0 Kudos

initialization.

at selection-screen.

start-of-selection.

top-of-page.

at user-command.

at line-selection.

end-of-page.

end-of-selection.

0 Kudos

Hi,

check these ...

initialization.

at selection-screen.

start-of-selection.

top-of-page.

at user-command.

at line-selection.

<b>top-of-page during line-selection.</b> "missing

end-of-page.

end-of-selection.

Former Member
0 Kudos

Hii

Events associated with classical report are as follows and each one will be discussed in detail.

• INITIALIZATION

• AT SELECTION-SCREEN

• AT SELECTION-SCREEN ON <field>

• START-OF-SELECTION

• TOP-OF-PAGE

• At line-selection

• At user-command

• END-OF-PAGE

• END-OF-SELECTION

AT LINE-SELECTION event

Double clicking is the way most users navigate through programs. Double clicking on basic list or any secondary list triggers the event AT LINE-SELECTION. SY-LSIND denotes the index of the list currently created. For BASIC list it is always 0.

AT USER-COMMAND

When the user selects the menu item or presses any function key, the event that is triggered is AT USER-COMMAND, and can be handled in the program by writing code for the same. The system variable SY-UCOMM stores the function code for the clicked menu item or for the function key and the same can be checked in the program. Sample code would look like

AT USER-COMMAND.

Case sy-ucomm.

When ‘DISP’.

Select * from sflight.

Write sflight-carrid, sflight-connid.

Endselect.

When ‘EXIT’.

LEAVE.

Regards

Naresh

Former Member
0 Kudos

Hai Shree

This is the order of execution in Classical/Interactive Report Events

Classical Reports

Reports which are properly formatted (header, footer, page numbers etc.,) with the help of one or more external events like top-of-page,end-of-page etc., are called as CLASSICAL REPORTS.

Standard list.

Output of Report program is nothing but Standard list. It consists of one continuous page of 60,000 lines.

To restrict number of lines per page.

Report Zxxxxx line-count 25.

OR

Report Zxxxxx line-count 25(3).

( In this case 3 lines are reserved for footer)

To restrict Output width.

Report Zxxxx line-size 125.

To suppress standard page heading.

Report Zxxxx no standard page heading

Above all at a time:

Report Zxxxx line-count 25(3)

line-size 125

no standard page heading.

Screen Events List Events

Initialization. Start-of-selection

At selection-screen. Top-of-page.

At selection-screen on <field>. End-of-page.

End-of-selection.

We can initialize the selection-screen with calculated default values under this event.

Initialization.

s_date-high = sy-datum.

s_date-low = sy-datum - 15.

Append s_date.

We can validate all the inputs on selection screen fields under this event.

At selection-screen.

If s_carrid-low is initial or

s_connid-low is initial or

s_date is initial.

< ... code for validation... >.

Endif.

We can validate a particular field input on selection screen under this event.

At selection-screen on s_carrid.

If s_carrid-low < > ‘LH’.

<… code for validation…>

Endif.

If any of the other event comes before

‘Select…Endselect.’ statements, then to break

that event, we require this S-O-S event.

Start-of-selection.

Select * from ……

…………

Endselect.

If we need some portion of the output (like

column headings) to appear in all the pages,

then we use this event.

Top-of-page.

Write:/ ‘Carrier’,10 ‘Connection’ 20 ‘Date’.

If there is no external output statement before

‘Top-of-page’ event, then this event will not

work.

Once the cursor reaches the last line of the

page, automatically this event will be triggered.

Report Zxxx line-count 25(3).

In this case line numbers 23, 24 and 25 are

reserved for footer.

Once the cursor reaches 23rd line, this event

will be triggered.

End-of-page.

Write:/ sy-uline(75).

Write:/ ‘This is end of page:’,sy-pagno.

Write:/ sy-uline(75).

This event is used for concluding part of List.

End-of-selection.

Write:/ ‘This is end of the Report’.

Interactive Report

A simple report or even a classical report displays a clustered list with all the requested output at one go.

What ever it is displayed, it is final. That means, the user can not interact with with that list.

A simple report or even a classical report displays a clustered list with all the requested output at one go.

What ever it is displayed, it is final. That means, the user can not interact with with that list.

In the interactive reports, we can create as many as 21 lists.

The first list is called ‘Basic list’ and all the successive lists are called ‘Secondary lists’. Each list is again an interactive.

The Basic list is not deleted when secondary list is created.

A secondary list may either overlay the basic list or appear in an additional dialog window on the same screen.

The system variable associated with list number is ‘SY-LSIND’.

For basic list SY-LSIND = 0 and for secondary lists, SY-LSIND varies from 1 to 20.

User can interact with the list by the following ways.

Double clicking or single click and pressing F2 (function key) or single click with ‘hotspot on’.

OR

Selecting from menu bar or from application tool bar.

All the events used in classical reports can be used in Basic List.

The event ‘End-of-page’ can be used in Secondary Lists also.(the other six events can not be used in secondary lists)

You can not place ‘select-options’ in secondary lists.

The following additional events are

applicable to secondary lists.

Top-of-page during line-selection.

At line-selection.

At user-command.

When you double click on any field in the basic list, you will be navigating to secondary list with detailed information pertaining to clicked field.

As such we need to store the clicked field information at some variable.

‘Hide’ temporarily stores the content of clicked field for later use.

The default title of the out put is the text what we enter during creation of program.

This title can be changed using:

SET TITLEBAR ‘AAA’.

GUI status includes:

Menu bar

Application tool bar and

Activating standard tool bar

GUI status can be created using

SET PF-STATUS ‘BBB’.

You can have 8 menus ( out of which, 2 menus are reserved for ‘System’ and ‘Help’).

Each menu can have 15 menu items.

Each menu item can have 3 levels of submenus.

You can create 35 items in application tool bar.

Thanks & regards

Sreenivasulu P

Former Member
0 Kudos

Hi Shree,

In interactive report, there is no order for the events to trigger.. Yes, TOP-OF-PAGE and END-OF-PAGE will fire whenever there will be any new page start/end.

But AT USER-COMMAND and AT LINE-SELECTION both are based upon what action user does like if he will double click on a particular line / field, AT LINE-SELECTION will fire but if he will press any Push Button on the toolbar/menu bar it may come to your USER-COMMAND.

Regds,

Sandip

Former Member
0 Kudos

Hi Shree

This is the order for interactive report

initialization.

at selection-screen.

start-of-selection.

top-of-page.

at user-command.

at line-selection.

end-of-page.

end-of-selection.

regards

Laxmi

Former Member
0 Kudos

hI SHREE,

HERE IS A OVERVIEW OF EVENTS.

Initialization : triggered when the report is loaded in memory.

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

At selection-screen / <field> : before leaving the selection screen.

start-of-selection : the first event for displaying the report.

end-of-selection : after the start-of-selection is completed.

classiscal report events.

top-of-page : every time a new page is started in the list.

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.

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

at pF<key> : function key from F5 to F12 to perform interactive action on the list.

reward with points if helpful.

regards,

keerthi.