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: 

Push Button as a Column in Table Control

Former Member
0 Kudos
5,602

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

guilherme_frisoni
Contributor
1,023

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

guilherme_frisoni
Contributor
1,024

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

0 Kudos
1,023

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.

lars_burdeneu
Discoverer
0 Kudos
1,023

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.