2007 May 07 6:50 PM
Hi all,
i am using FM REUSE_ALV_GRID_DISPLAY TO display records.
I am able to select only one row ata time .
i need to use ctrl or shift key to select multiple rows
is there a way that i can select multiple rows with just using mouse and without using shift or ctrl KEYS
tHANKS
2007 May 07 6:53 PM
2007 May 07 6:59 PM
Hi Rich,
i have to select like random rows .
say like 1 ,3 7, 11---
is it posiible.
i saw some standard SAP screens similar to this .
where i can select without using CTRL OR shift keys
let me know
thanks
2007 May 08 1:48 PM
Hi,
declare a variable-name as 'box' of type char in ur internal table which u pass to alv grid fm
sample code
layout settings declaration.
data: wg_gs_layout TYPE slis_layout_alv.
write this stmt befor u call the alv grid fm.
wg_gs_layout-box_fieldname = 'BOX'.
this will help u to select multiple row in random from alv report
2007 May 21 9:45 AM
But after selecting multiple rows how to retrieve the seelcted rows ? In the user_event , i cld see the field 'selfield' of TYPE slis_selfield which holds only one record info ?
2007 May 21 9:55 AM
Hi,
Use the following function in user_command subroutine to know the selected coloumn in ALV.
FORM user_cmd USING ucomm1 LIKE sy-ucomm
selfield TYPE slis_selfield."#ec *
DATA ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref1.
CALL METHOD ref1->check_changed_data.
CASE ucomm1 .
WHEN 'SAVE'.
UPDATE ekko FROM TABLE itab.
COMMIT WORK.
ENDFORM. "user_cmd
2007 May 08 1:04 PM
hi,
we can use
select upto n rows from table itab where <condition>.
example.
data : begin of itab_mara,
matnr like mara-matnr,
enum like mara-enum,
end of itab_mara.
selection-screen : begin of block blk1 with frame title text-001.
select-options : s_matnr for mara-matnr,
selection-screen : end of block blk1.
select upto 5 rows from table itab_mara where matnr in s_matnr.
if the rows which u want to select is not random rows.
reward with points if helpful.