04-24-2008 12:29 PM
Hi all,
In my alv output(grid display) i want to perform certain actions when a line is selected and a button is pressed.
how can this be achieved?
I am using At line selection followed by At user command and have written my logic after At user command,but the control does not go to my code.
Any pointers to this would be appreciated.
Regards,
S.Subasree
04-24-2008 12:45 PM
Hi,
I assume you are using Fm REUSE_ALV_GRID_DISPLAY for displaying your ALV report.
In the Export parameters of this FM, you can find a parameter IT_EVENTS.
You need to populate a table of type IT_EVENT Type SLIS_T_EVENT
populate it with the below entry.
name-USER_COMMAND
form-user_command_alv
You need to do your code in a perform user_command_alv.
The above table is to handle all events in ALV grid. You can pass any event and a subroutine name in that table.
Whenever an event occurs, it will check for a form name against it in IT_EVENTS
that subroutine will be executed when that event occurs.
You can find all events for ALV using Fm REUSE_ALV_EVENTS_GET
At line-selection and at user-command are specific to classical reports only.
Thanks and Regards,
Lakshmi.
04-24-2008 1:15 PM
hi
check this standard program.
it explains the usage of all thre grid events.
BCALV_TEST_GRID_EVENTS