10-09-2008 7:16 AM
hi all,
im using REUSE_ALV_GRID_DISPLAY in my program,when im selecting the select all button in the top left corner of my grid i need to display a text message, i tried to capture the user command using SY-UCOMM but the value is null so is there any way to do this....
10-09-2008 7:26 AM
Hi senthil,
If the icon mentioned by u is icon with magnifier glass, then its
function code: &ETA. Try this.
Else tell me abt that icon.
IF useful...................
Regards,
S.Senthil kumar
10-09-2008 7:30 AM
hi senthil im not using any icons
the default select all icon is there and its function key also i got
'&ALL' but the thing is this key is not captured at the run time in sy-ucomm is there any other way...
10-09-2008 7:50 AM
Hi,
In you table declare one field which will indicate which rows are selected. I.e.
data: begin of table occurs 0,
"your fields here
selrow type c,
end of table.
"now in alv layout set field as the one which will row status of selection
ls_layout-box_fieldname = 'SELROW'.
Then caputre &ALL sy-ucomm in USER_COMMAND subroutine.
NOTE!
This is not triggering AT USER-COMMAND program event.Instead write such form:
FORM user_command USING f_ucomm TYPE sy-ucomm
ls_selfield TYPE slis_selfield.
if sy-ucomm = '$ALL'. "All button
...
ENDIF.
ENDFORM. "USER_COMMAND
"and direct FM to use this subroutine when event is raised
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
...
i_callback_user_command = 'USER_COMMAND'
...
Regards
Marcin