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

ALV

Former Member
0 Likes
381

hi,

what are the events in intractive alv reports.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
363

hi,

if u talking about ALV,Then u can right any code for user command in the form passed in icallbackuser_command in REUSE_ALV_GRID_DISPLAY.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid "'ZINT_ALV'

i_callback_user_command = 'USER_COMMAND' i_grid_title = 'Interactive ALV'

it_fieldcat = fcat

it_events = eve

TABLES

t_outtab = itab

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

READ TABLE itab INDEX sel_field-tabindex.

IF sel_field-fieldname = 'MATNR'.

IF sy-subrc = 0.

t_mat = itab-matnr.

PERFORM build_cat1 USING fcat1.

PERFORM build_eve1.

PERFORM get_data1.

PERFORM dis_data1.

ENDIF.

ENDIF.

SCREEN.

ENDCASE.

ENDFORM. "user_command

Its for Double click (&IC1)...

reward if usefull.

2 REPLIES 2
Read only

Former Member
0 Likes
363

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:

AT LINE-SELECTION

AT USER-COMMAND

AT PF<key>

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.

TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.

In ALV reports one generally uses the ABAP LIST VIEWER for ALV grid or List Display.When using ALV there are FM's that need to be called in order to display the report in grid or list format.

Reward if useful.

Read only

Former Member
0 Likes
364

hi,

if u talking about ALV,Then u can right any code for user command in the form passed in icallbackuser_command in REUSE_ALV_GRID_DISPLAY.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid "'ZINT_ALV'

i_callback_user_command = 'USER_COMMAND' i_grid_title = 'Interactive ALV'

it_fieldcat = fcat

it_events = eve

TABLES

t_outtab = itab

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

READ TABLE itab INDEX sel_field-tabindex.

IF sel_field-fieldname = 'MATNR'.

IF sy-subrc = 0.

t_mat = itab-matnr.

PERFORM build_cat1 USING fcat1.

PERFORM build_eve1.

PERFORM get_data1.

PERFORM dis_data1.

ENDIF.

ENDIF.

SCREEN.

ENDCASE.

ENDFORM. "user_command

Its for Double click (&IC1)...

reward if usefull.