Application Development and Automation 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: 
Read only

Record selected in the table control

Former Member
0 Likes
524

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.

2 REPLIES 2
Read only

Former Member
0 Likes
504

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.

Read only

Former Member
0 Likes
504

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.