2007 Mar 19 4:30 AM
Hi All,
How do i know the line no of the record selected in the table control.I have declared a table control CONTROLS : t_control1 type tableview using screen 200.But in t_control1-current_line the line no that is stored is always 1.
Thanks,
Rakesh.
Hi All,
How do i know the line no of the record selected in the table control.I have declared a table control CONTROLS : t_control1 type tableview using screen 200.But in t_control1-current_line the line no that is stored is always 1.
Thanks,
Rakesh.
2007 Mar 19 8:53 AM
Hi,
To know the line number of Record u have selected u have to write logic in PAI... Set table control properties wutg selection criteria possible in it.
FOr example refer to following code.
PROCESS BEFORE OUTPUT.
MODULE status_0100.
LOOP WITH CONTROL flights.
MODULE fill_table_control.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL flights.
MODULE read_table_control.
ENDLOOP.
MODULE user_command_0100.
MODULE fill_table_control OUTPUT.
READ TABLE itab INTO demo_conn INDEX flights-current_line.
ENDMODULE.
MODULE read_table_control INPUT.
lines = sy-loopc.
if itab-x = 'X'.
va_current_line_data = demo_conn.
endif.
ENDMODULE.
Hope this will help u.
For more details do write to me.
DARSHAN
Dude don't forget to give rewards.
2007 Mar 19 2:07 PM
Hi,
The t_control1-current_line values changes in the loop but out of the loop it shows alwaya as 1.
Say for example you have selected the 5 row then the X marked against the select/BOX will be seen in the loop. But out of the it will show the alwaya as 1.
That's why you need to modify the internal table.
Br,
Laxmi.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |