‎2006 Dec 20 7:24 AM
HI,
CAN ANYONE KONOW HOW TO GET WHICH IS THE CURRENT SELECTED LINE / ROW IN TABLE CONTROL BY THE USER.
ALSO ON WHICH COLUMN USER PRESS SINGLE / DOUBLE CLICK
I WANT TO TRAP THAT AND WANT TO WORK ON THAT COL. DATA.
THANKS,
MUKESH
‎2006 Dec 20 7:27 AM
hi,
chk these examples on table control-very hlpful
demo_dynpro_tabcont_loop
demo_dynpro_tabcont_loop_at
RSDEMO_TABLE_CONTROL
Regards
anver
‎2006 Dec 20 7:29 AM
Hi Mukesh,
Try,
READ LINE syntax to track user action on the list, e.g. current selected line/ row.
Hope this helps.
Regards,
Patrick
‎2006 Dec 20 7:34 AM
Hi ,
Use <b>GET CURSOR FIELD < fname> LINE <ln> .</b>
It will capture the current cursor position .
Regards ,
Senthil
‎2006 Dec 20 8:00 AM
hi mukesh,
in SE51 table control property u have a property w/SelColumn.
give in some name to that (suppose ROW_SEL)
and to the internal table of ur table control add a field
chk(1) type c.
now in PAI of the table control module.
if row_sel = 'X'.
itab-chk = 'X'
else.
itab-chk = ' '.
endif.
....
....
....
....
modify itab from lt_itab index tabc-current_line.
now if u wnt some user action for this.
in the user command.write this
loop at itab where chk = 'X'. ( this gives the selected row items)
write ur code here.......
endloop.
Hope this gives u a basic idea of what u required.
Regards
- Gopi
‎2006 Dec 20 8:00 AM
hi,
data: v_fnam(10), v_fval(10).
................................
module....
case sy-ucomm
when 'DISP'.
refresh itab.
get cursor filed v_fnam value v_fval
select...... or
read.....
endcase.
this is the way how it should work like you have to first select the filed with v_fname some variable and then u have to get that value in that particular field with v_fval...
I think it would be helpful for you
Regards,
GNK