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
796

which event gets called if we click any button on alv and pls give me the list of events which r used in alv

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
777

hi when ever a button is pressed or if you double click on any line the user command is triggered and it is catched in the SY-UCOMM of the program.

which event gets called if we click any button on alv and pls give me the list of events which r used in alv

6 REPLIES 6
Read only

Former Member
0 Likes
777

Hi

Go through the link given below :

With Regards

Nikunj Shah

Read only

Former Member
0 Likes
777

Hi Ankesh,

Events in alv and their FM The main events in alv and their FM and why we use these:

1. SLIS_PRINT_ALV.

2. SLIS_T_LISTHEADER.

3. SLIS_T_EVENT.

4. SLIS_T_SORTINFO_ALV.

5. SLIS_T_LAYOUT_ALV.

6. SLIS_T_FIELDCAT_ALV.

and in classic reports what is the sequence of events: === Events are

At selection-screen output.

Initialization.

At selection-screen on field

At selection-screen on end of field

At selection-screen on Radiobutton Group R1. (If you have any radio buttons)

At selection-screen on block b1. (If you have any blocks)

Start-of-selection.

Get node. (if the data is retreived from a logical database)

Get node late. (if the data is retreived from a logical database)

Top-of-page. (if the write statement is in the end-of-selection event or we can say that before the first write statement)

end-of-selection.

and fuction modules are

LISTHEADER - Is used to print the header information in the ALV List. Name, Date, Time, ALV Name and other details are called as Header information. EVENT - Basically this is the FM to handle Event's. When the user needs to do some event operation like when double clicking the a particular field we need to perform some operation. These events are captured by this FM. LAYOUT - This FM is used to define the layout of the List. There are many options available in this FM to define the Layout style. FIELDCAT - These are used to populate the List header. We can change them according to our req.

User-defined Text Output Event

Application

print_end_of_list

Define output text to be printed at the end of the entire list

print_top_of_list

Define output text to be printed at the beginning of the entire list

print_end_of_page

Define output text to be printed at the end of each page

print_top_of_page

Define output text to be printed at the beginning of each page

subtotal_text

Define self-defined subtotals texts

Mouse-controlled Actions in the Grid Control Event

Application

button_click

Query a click on a pushbutton in the ALV Grid Control

double_click

Query a double-click on a cell of the ALV Grid control

hotspot_click

Query a hotspot click on columns defined for this purpose in advance

onDrag

Collect information when elements of the ALV Grid Control are dragged

onDrop

Process information when elements of the ALV Grid Control are dropped

onDropComplete

Perform final actions after successful Drag&Drop

onDropGetFlavor

Distinguish between options for Drag&Drop behavior

Processing of Self-defined and Standard Functions Event

Application

before_user_command

Query self-defined and standard function codes

user_command

Query self-defined function codes

after_user_command

Query self-defined and standard function codes

Definition of Self-defined Functions Event

Application

toolbar

Change, delete or add GUI elements in the toolbar

menu_button

Define menus for menu buttons in the toolbar

context_menu_request

Change context menu

onf1

Define self-defined F1 help

All of these can be found under type group SLIS.

  • Events

SLIS_EV_ITEM_DATA_EXPAND TYPE SLIS_FORMNAME VALUE 'ITEM_DATA_EXPAND',

SLIS_EV_REPREP_SEL_MODIFY TYPE SLIS_FORMNAME VALUE 'REPREP_SEL_MODIFY', SLIS_EV_CALLER_EXIT_AT_START TYPE SLIS_FORMNAME VALUE 'CALLER_EXIT',

SLIS_EV_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND',

SLIS_EV_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',

SLIS_EV_DATA_CHANGED TYPE SLIS_FORMNAME VALUE 'DATA_CHANGED',

SLIS_EV_TOP_OF_COVERPAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_COVERPAGE',

SLIS_EV_END_OF_COVERPAGE TYPE SLIS_FORMNAME VALUE 'END_OF_COVERPAGE',

SLIS_EV_FOREIGN_TOP_OF_PAGE TYPE SLIS_FORMNAME

VALUE 'FOREIGN_TOP_OF_PAGE', SLIS_EV_FOREIGN_END_OF_PAGE TYPE SLIS_FORMNAME

VALUE 'FOREIGN_END_OF_PAGE',

SLIS_EV_PF_STATUS_SET TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET',

SLIS_EV_LIST_MODIFY TYPE SLIS_FORMNAME VALUE 'LIST_MODIFY',

SLIS_EV_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST',

SLIS_EV_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE',

SLIS_EV_END_OF_LIST TYPE SLIS_FORMNAME VALUE 'END_OF_LIST',

SLIS_EV_AFTER_LINE_OUTPUT TYPE SLIS_FORMNAME VALUE 'AFTER_LINE_OUTPUT', SLIS_EV_BEFORE_LINE_OUTPUT TYPE SLIS_FORMNAME VALUE 'BEFORE_LINE_OUTPUT',

SLIS_EV_SUBTOTAL_TEXT TYPE SLIS_FORMNAME VALUE 'SUBTOTAL_TEXT'.

Also do a sdn search .....

Mohinder

Read only

Former Member
0 Likes
777

when you double click on any cell, then double_click event will trigger. But coming to Functions there is no double click event. Every thing will be handled by USER_COMMAND event.

For classical alv the below are the events.

slis_ev_item_data_expand   type slis_formname value 'ITEM_DATA_EXPAND',
slis_ev_reprep_sel_modify  type slis_formname value 'REPREP_SEL_MODIFY',
slis_ev_caller_exit_at_start type slis_formname value 'CALLER_EXIT',
slis_ev_user_command       type slis_formname value 'USER_COMMAND',
slis_ev_top_of_page        type slis_formname value 'TOP_OF_PAGE',
slis_ev_data_changed       type slis_formname value 'DATA_CHANGED',
slis_ev_top_of_coverpage   type slis_formname value 'TOP_OF_COVERPAGE',
slis_ev_end_of_coverpage   type slis_formname value 'END_OF_COVERPAGE',
slis_ev_foreign_top_of_page type slis_formname
                                       value 'FOREIGN_TOP_OF_PAGE',
slis_ev_foreign_end_of_page type slis_formname
                                       value 'FOREIGN_END_OF_PAGE',
slis_ev_pf_status_set      type slis_formname value 'PF_STATUS_SET',
slis_ev_list_modify        type slis_formname value 'LIST_MODIFY',
slis_ev_top_of_list        type slis_formname value 'TOP_OF_LIST',
slis_ev_end_of_page        type slis_formname value 'END_OF_PAGE',
slis_ev_end_of_list        type slis_formname value 'END_OF_LIST',
slis_ev_after_line_output  type slis_formname value 'AFTER_LINE_OUTPUT',
slis_ev_before_line_output type slis_formname value
                                                   'BEFORE_LINE_OUTPUT',
slis_ev_subtotal_text      type slis_formname value 'SUBTOTAL_TEXT',
slis_ev_grouplevel_change  type slis_formname value 'GROUPLEVEL_CHANGE',
slis_ev_context_menu       type slis_formname value 'CONTEXT_MENU'.

Regards

Vijay Babu Dudla

Read only

Former Member
0 Likes
777

Hi!

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
    ...
     i_callback_user_command           = 'USER_COMMAND'
    TABLES
      t_outtab                          = gt_main
   ...

...

FORM user_command USING r_ucomm LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
  DATA: lt_fc TYPE slis_t_fieldcat_alv,
        ls_fc TYPE slis_fieldcat_alv.

  DATA: lv_repid LIKE sy-repid,
        lv_title(50).

  IF r_ucomm = 'UCOMM'.
    "do something
  ENDIF.

  READ TABLE gt_main INTO gs_main
    INDEX rs_selfield-tabindex.
  CHECK sy-subrc = 0.

  CASE rs_selfield-fieldname.
    WHEN: ... "do something with the ALV fields
  ENDCASE.



ENDFORM

Regards

Tamá

Read only

Former Member
0 Likes
777

Check the Programs...For Different ALV events handling...

BCALV_TEST_FULLSCREEN_EVENTS
BCALV_TEST_GRID_EVENTS
BCALV_TEST_HIERSEQ_LIST_EVENTS
BCALV_TEST_LIST_EVENTS

Read only

Former Member
0 Likes
778

hi when ever a button is pressed or if you double click on any line the user command is triggered and it is catched in the SY-UCOMM of the program.