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

Push Button as a Column in Table Control

Former Member
0 Likes
7,572

Hi,

I want to insert PUSH BUTTON as a column in table control as & on clicking the pushbutton,

I want to retrieve the corresponding data from that row of the table control.

I dont want to use the field W/SELCOLUMN because i want to process PAI of the screen immediately after clicking the pushbutton.

pls help me....

1 ACCEPTED SOLUTION
Read only

guilherme_frisoni
Contributor
2,993

Hi,

insert your button through layout editor and assign a Fcode for it.

In your PAI you will have sy-ucomm assigned when button click.

Then, just use


      GET CURSOR LINE li_line.

to get line number of button click and use a read table ro get the line of yout IT.

Regards,

Frisoni

3 REPLIES 3
Read only

guilherme_frisoni
Contributor
2,994

Hi,

insert your button through layout editor and assign a Fcode for it.

In your PAI you will have sy-ucomm assigned when button click.

Then, just use


      GET CURSOR LINE li_line.

to get line number of button click and use a read table ro get the line of yout IT.

Regards,

Frisoni

Read only

0 Likes
2,993

Hi Frisoni,

The Table controll with push button is working but after scrolling(vertical) the table control the push button is not able to pick

the clicked row no. I mean while debugging I noticed that the statement GET CURSOR LINE LI_NO is not able to pick the right entry/row of table control after scrolling table control to see more data. Pls help.

Read only

lars_burdeneu
Discoverer
0 Likes
2,993

Hi,

to get the correct line use this

  get cursor line h_line.

check sy-subrc = 0.

h_cursor = tc_name-top_line + h_line - 1.