cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding alv

Former Member
0 Kudos
58

Hi all,

Right now i am working with one object,for that i need to prepare a alv report by using classes and objects and the end user may select one row or more than one row or all rows and click the button on application tool bar then these (the selected record(s)) records will upload into sap database with the help of call transaction.can anybody give suggessions how to capture selected records information in alv and how to select morethan one row in alv grid.I know the double click event in alv, is it useful or can i go for another technique.I am waiting for your replies.

regards,

Bujji.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Murali,

You don't need another column for the check box. I am assuming that you are using a GRID control.

You can use the method GET_SELECTED_ROWS of the class cl_gui_alv_grid, using which you get the row numbers of the rows selected in an internal table.

Loop at that internal table and you can do the processing.

Regards,

Ravi

Note : Please reward the posts that help you.

Answers (4)

Answers (4)

Former Member
0 Kudos

probably the report

BCALV_GRID_05

can help you

bye

enzo

Former Member
0 Kudos

Hi,

move:'A' to eg_layout-sel_mode ,

Do You know how to use the events of CL_GUI_ALV_GRID??

You have to use the event USER_COMMAND, the click in the button will start this event.

Into the code of the event, u have to use the method GET_SELECTED_ROWS, it is gonna return to you the list of indexes of the lines selectds.

att,

Alexandre Nogueira

former_member188685
Active Contributor
0 Kudos

this will enable multiple row selection.

<b>GS_layout-NO_ROWMARK = 'X'.</b>

and after selecting

Using class <b>GET_SELECTED_ROWS</b>

you will get the selected rows.

Regards

vijay

Former Member
0 Kudos

Hi,

Set 'SEL_MODE' of layout structure to 'A' .

Check this link for other options.

http://help.sap.com/saphelp_46c/helpdata/en/ef/a2e9eff88311d2b48d006094192fe3/frameset.htm

then call GET_SELECTED_ROWS method.

regards,

suresh

Former Member
0 Kudos

Hi Murali,

ALV MULTIPLE RECORD SELECTION.

-


1. This requires minor modifications/enhancments in

ITAB

ALV Layout

2. The itab which u are displaying,

in that ADD ONE MORE COLUMN (say : checked type c)

3. In the layout for alv,

alvly-box_fieldname = 'CHECKED'

(The above will inform the alv that

it will show checkbox either ticked/unticked

as per the value of field CHECKED in ITAB)

4. When the alv is displyaed, checkboxes shall

also be displayed, the user can select them.

After that u can loop thru ITAB and detect

the field value of 'CHECKED' = 'X' or Space.

Hope the above helps.

Regards,

Amit M.