2005 Nov 27 10:13 AM
hi,
i am using the function 'REUSE_ALV_GRID_DISPLAY' and would to know in the user_command form when user is selecting a column, like the functionality of row_selected.
in my program i need the user to choose a column and push a button. i must know in the user command form what column was selected and if it is chosen and not just the head marked.
thank you,
Roi Grosfeld
2005 Nov 27 11:52 AM
Hi
You need to call the FM REUSE_ALV_GRID_LAYOUT_INFO_GET in your user-command.
In this fm there's the parameter ET_MARKED_COLUMNS where you should get out the informations you need.
Max
Message was edited by: max bianchi
hi,
i am using the function 'REUSE_ALV_GRID_DISPLAY' and would to know in the user_command form when user is selecting a column, like the functionality of row_selected.
in my program i need the user to choose a column and push a button. i must know in the user command form what column was selected and if it is chosen and not just the head marked.
thank you,
Roi Grosfeld
2005 Nov 27 11:52 AM
Hi
You need to call the FM REUSE_ALV_GRID_LAYOUT_INFO_GET in your user-command.
In this fm there's the parameter ET_MARKED_COLUMNS where you should get out the informations you need.
Max
Message was edited by: max bianchi
2005 Nov 27 12:06 PM
hi, in the USER_COMMAND form, you can do like following:
data: it_mark type SLIS_T_FIELDCAT_ALV.
CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
IMPORTING
ET_MARKED_COLUMNS = it_mark[].
call this function in USER_COMMAND form, the selected column will be stored in it_mark.
Hope it will be helpful
thanks
2005 Nov 27 11:43 PM
Hi there,
the form used to process the user_command event has a parameter which you can use to determine which column was selected (fieldname) and which row too (tabindex).
Eg, the following only operates if the Customer number or Name columns have been acted on and reads the underlying internal table based on the index....
FORM user_command
USING i_ucomm LIKE sy-ucomm
i_selfield TYPE slis_selfield.
CASE i_selfield-fieldname.
CUSTOMER OR CUSTOMER NAME.......
WHEN 'KUNNR' OR 'NAME1'.
READ TABLE t_dtl ASSIGNING <detail> INDEX i_selfield-tabindex.
CHECK sy-subrc = 0.
..........................
Regards
neil
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |