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

interactive reports

Former Member
0 Likes
883

Hi everybody,

What are the report events that are used in interactive report.

with regards

srikanth

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
858

HI SRIKANTH,

THIS MIGHT GIVE YOU A BETTER IDEA

Interactive Reports

As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers. And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.

We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21). Events associated with Interactive Reports are: 1. AT LINE-SELECTION 2. AT USER-COMMAND 3. AT PF<key> 4. TOP-OF-PAGE DURING LINE-SELECTION. HIDE statement holds the data to be displayed in the secondary list. sy-lisel : contains data of the selected line. sy-lsind : contains the level of report (from 0 to 21)

Interactive Report Events:

AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.

AT PFn: For predefined function keys...

AT USER-COMMAND : It provides user functions keys.

ANUJ

reward for helpful answers

9 REPLIES 9
Read only

Former Member
0 Likes
858
AT LINE-SELECTION.

AT USER-COMMAND.
Read only

Former Member
0 Likes
858

AT LINE-SELECTION.

AT PFn.

AT USER-COMMAND.

regards

shiba dutta

Read only

Former Member
0 Likes
858

hi ,

here's a list .........

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.

Regards,

Bijal

Read only

Former Member
0 Likes
858

srikanth,

First event -

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 : before leaving the selection screen.

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

This event keyword defines an event block whose event is triggered by the ABAP runtime environment

when calling the executable program selection screen processing of a selection screen.

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.

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.

at user-command

http://help.sap.com/saphelp_47x200/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm

Pls. reward if useful

Read only

Former Member
0 Likes
858

Total events in IR r

INITIALISATION

AT SELECTION SCREEN

START OF SELECTION

<b>AT LINE SELECTION</b>

END OF SELECTION

TOP OF PAGE

<b>TOP OF PAGE DURING LINE SELECTION</b>

<b>AT USER COMMAND</b>

END OF PAGE

AT PF

Bolded events r extra used in IR when compared to Classic Reports

~~Guduri

Read only

Former Member
0 Likes
858

hi,

atline selection

http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm

See this link,

http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm

Event in interactive reporting

This event is processed whenever the user chooses a valid line in the list (i.e. a line generated by statements such as WRITE , ULINE or SKIP ) with the cursor and presses the function key which has the function PICK in the interface definition. This should normally be the function key F2 , because it has the same effect as double-clicking the mouse, or single-clicking in the case of a hotspot .

The processing for the event AT LINE-SELECTION usually generates further list output (the details list) which completely covers the current list display. If the latter is still visible (to aid user orientation), this may be due to the key word WINDOW .

In most cases, the information is from the selected line is used to retrieve more comprehensive information by direct reading. When displaying the original list, you store the key terms needed for this in the HIDE area of the output line.

at line selection event is mainly used when u r using a drill down list.

that is,

when u click on the list in the output it triggers or navigates us into another output i.e another list.

consider this code.it can be helpful.

TYPES : BEGIN OF TY_A1,

VBELN TYPE VBAK-VBELN,

ERNAM TYPE VBAK-ERNAM,

ERDAT TYPE VBAK-ERDAT,

NAME1 TYPE KNA1-NAME1,

END OF TY_A1,

BEGIN OF TY_A2,

MATNR TYPE VBAP-MATNR,

MAKTX TYPE MAKT-MAKTX,

CHARG TYPE VBAP-CHARG,

POSNR TYPE VBAP-POSNR,

END OF TY_A2.

&*********************************************************************

&*********************************************************************

DATA : IT_A1 TYPE TABLE OF TY_A1,

IT_A2 TYPE TABLE OF TY_A2.

DATA : WA_A1 TYPE TY_A1,

WA_A2 TYPE TY_A2.

AT LINE-SELECTION.

PERFORM F1.

TOP-OF-PAGE.

ULINE 1(100).

WRITE : 100 SY-VLINE.

WRITE 😕 SY-VLINE, 02 TEXT-000,SY-VLINE,

15 TEXT-001,SY-VLINE,

40 TEXT-002,SY-VLINE,

60 TEXT-003, 100 SY-VLINE.

WRITE :/100 SY-VLINE.

WRITE AT 1(100) SY-ULINE.

WRITE : 100 SY-VLINE.

END-OF-PAGE.

TOP-OF-PAGE DURING LINE-SELECTION.

ULINE 1(100).

WRITE : 100 SY-VLINE.

WRITE 😕 SY-VLINE, 02 TEXT-004,SY-VLINE,

25 TEXT-005, 56 SY-VLINE,

65 TEXT-006,SY-VLINE,

85 TEXT-007,

100 SY-VLINE.

WRITE :/100 SY-VLINE.

WRITE AT 1(100) SY-ULINE.

WRITE : 100 SY-VLINE.

START-OF-SELECTION .

PERFORM F2.

END-OF-SELECTION .

&----


*& Form F2

&----


  • text

----


FORM F2 .

IF P_DATE-LOW IS NOT INITIAL AND P_DATE-HIGH IS NOT INITIAL.

SELECT VBAK~VBELN

VBAK~ERNAM

VBAK~ERDAT

KNA1~NAME1

FROM VBAK INNER JOIN KNA1

ON VBAKKUNNR = KNA1KUNNR

INTO CORRESPONDING FIELDS OF TABLE IT_A1

WHERE VBAKERDAT > P_DATE-LOW AND VBAKERDAT < P_DATE-HIGH.

ELSEIF P_DATE IS INITIAL.

MESSAGE E000(ZTH_TEST).

ELSEIF P_DATE-LOW IS NOT INITIAL AND P_DATE-HIGH IS INITIAL.

SELECT VBAK~VBELN

VBAK~ERNAM

VBAK~ERDAT

KNA1~NAME1

FROM VBAK INNER JOIN KNA1

ON VBAKKUNNR = KNA1KUNNR

INTO CORRESPONDING FIELDS OF TABLE IT_A1

WHERE VBAK~ERDAT = P_DATE-LOW.

ELSEIF P_DATE-HIGH IS NOT INITIAL AND P_DATE-LOW IS INITIAL.

SELECT VBAK~VBELN

VBAK~ERNAM

VBAK~ERDAT

KNA1~NAME1

FROM VBAK INNER JOIN KNA1

ON VBAKKUNNR = KNA1KUNNR

INTO CORRESPONDING FIELDS OF TABLE IT_A1

WHERE VBAK~ERDAT < P_DATE-HIGH.

ENDIF.

IF SY-SUBRC <> 0.

MESSAGE E001(ZTH_TEST).

ELSE.

*SKIP 2.

LOOP AT IT_A1 INTO WA_A1.

WRITE : / SY-VLINE, 03 WA_A1-VBELN,14 SY-VLINE.

HIDE WA_A1-VBELN. WRITE: 20 WA_A1-ERNAM,34 SY-VLINE,

36 WA_A1-ERDAT,54 SY-VLINE,

60 WA_A1-NAME1,100 SY-VLINE.

ENDLOOP.

WRITE AT 1(100) SY-ULINE.

ENDIF.

ENDFORM. "F2

&----


*& Form F1

&----


  • text

----


FORM F1.

SELECT VBAP~MATNR

MAKT~MAKTX

VBAP~CHARG

VBAP~POSNR

FROM VBAP INNER JOIN MAKT

ON VBAPMATNR = MAKTMATNR

INTO CORRESPONDING FIELDS OF TABLE IT_A2

WHERE VBAP~VBELN = WA_A1-VBELN AND SPRAS = 'EN'.

*SKIP 2.

LOOP AT IT_A2 INTO WA_A2.

WRITE : / SY-VLINE, WA_A2-MATNR, 14 SY-VLINE,

16 WA_A2-MAKTX, 56 SY-VLINE,

65 WA_A2-CHARG, 78 SY-VLINE,

85 WA_A2-POSNR, 100 SY-VLINE.

ENDLOOP.

WRITE AT 1(100) SY-ULINE.

ENDFORM. "F1

AT USER-COMMAND:

If the user chooses a function code during list processing that is neither processed by the system, or PICK or PF<nn>, the system triggers the event AT USER-COMMAND. For this event, you must define your own GUI status for a list. To react to your own function codes in a program, you must define the following event block:

AT USER-COMMAND.

<statements>.

In this event block, you can use an IF or CASE structure to tell the function codes apart. They are available in the system field SY-UCOMM. There are further system fields that are filled in list events, such as SY-LSIND and SY-PFKEY, that allow you to make further case distinctions.

REPORT Test_program.

START-OF-SELECTION.

SET PF-STATUS 'TEST'.

WRITE: 'Basic list, SY-LSIND =', sy-lsind.

AT LINE-SELECTION.

WRITE: 'LINE-SELECTION, SY-LSIND =', sy-lsind.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'TEST'.

WRITE: 'TEST, SY-LSIND =', sy-lsind.

ENDCASE.

With this code double click on 'TEST' and define your own PF status and give user command as TEST and check out this useful programe.

award points if useful.

sri

Read only

Former Member
0 Likes
858

hi

these are the events used for reporting techniques

LOAD-OF-PROGRAM

INITIALISATION

AT SELECTION SCREEN

START OF SELECTION

AT LINE SELECTION

END OF SELECTION

TOP OF PAGE

TOP OF PAGE DURING LINE SELECTION

AT USER COMMAND

END OF PAGE

AT PF

regards,

shamim

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
858

Hi

AT LINE-SELECTION.

AT USER-COMMAND.

TOP-OF-PAGE DURING LINE-SELECTION.etc

Regards,

kumar

Read only

Former Member
0 Likes
859

HI SRIKANTH,

THIS MIGHT GIVE YOU A BETTER IDEA

Interactive Reports

As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers. And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.

We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21). Events associated with Interactive Reports are: 1. AT LINE-SELECTION 2. AT USER-COMMAND 3. AT PF<key> 4. TOP-OF-PAGE DURING LINE-SELECTION. HIDE statement holds the data to be displayed in the secondary list. sy-lisel : contains data of the selected line. sy-lsind : contains the level of report (from 0 to 21)

Interactive Report Events:

AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.

AT PFn: For predefined function keys...

AT USER-COMMAND : It provides user functions keys.

ANUJ

reward for helpful answers