Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding retrive the data from alv grid selected rows

Former Member
0 Kudos

Hi All,

How can i retrive the data of selected rows from alv grid display output with out using class and methods.

7 REPLIES 7

Former Member
0 Kudos

use user_comand option..then use stmt "read table tble itab inot wa index selfield-index"

Former Member
0 Kudos

Hi Anil,

Use select single from ...........

U will get it.

satsrockford
Active Participant
0 Kudos

hi

if u want the row to be selected,

u need to set in layout sel_mode.

that is the only solution.

to retrive data from selected row, there are

methods get_selected_rows.

once u went forward after selecting, if u want to come back with selected rows, u can use

set_selected_rows.

if u want event , u have on_click but by handling that u can do some operations and all which does not match ur question.

regards

Satish

Former Member
0 Kudos

Hi Mahesh,

using user-command u can do that.

case sy-ucomm.

when '&ic1'.

give either read or select stmt & write it in another page or whereever u want to show taht result.

Former Member
0 Kudos

Hi,

The code will be like this ....


FORM user_command USING r_ucomm LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.
  CASE r_ucomm.
    WHEN '&IC1'.
      IF rs_selfield-fieldname =<fieldname>.
        g_tplnr = rs_selfield-value.
        g_index = rs_selfield-tabindex.
        READ TABLE it_final2 INTO wa_final2 INDEX g_index.

0 Kudos

this might be a helpful link for you.

Edited by: ROHIT SHARMA on Oct 15, 2008 8:26 AM

Edited by: ROHIT SHARMA on Oct 15, 2008 8:28 AM

Former Member
0 Kudos

hi

use checkbox in itab.

types: begin of itab,

cbox type c,

end of itab.

and in the layout itab

refer the checkbox fieldname ie cbox.

it_layout-box_fieldname = 'cbox'.

regards

suren.s