cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Get Cursor dynpro statement

Former Member
0 Kudos

Hi All

I am display a table control which contains 25 lines but only 7 lines can be visible on the screen. I am providing F4 help to table control fields through PROCESS ON VALUE-REQUEST.

I am using GET CURSOR statment to get the current line of the table control. Here the problem is that the get cursor statment returns the current visible line of the table control and not the actual line number of the internal table used for the table control.

Can anyone advice how to get the current internal table line number.

Thanks

Ravindra Suvarna

Accepted Solutions (1)

Accepted Solutions (1)

former_member186741
Active Contributor
0 Kudos

you need to adjust the to take into account where you are in the table. Use the table control's top_line field, i.e. add tc-top_line - 1 to the line from the get cursor.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ravindra,

1. what u want can be done.

2. In the table control,

take the first field as a BUTTON.

(the button will appear in all rows,

and hence act as a RECORD SELECTOR

which happends in alv grid )

3. give some fcode to it.

4. In pai, use this logic.

5.

module PAI_1000 input.

DATA : SELFIELD(50) TYPE C.

DATA :SELLINE TYPE I.

GET CURSOR FIELD SELFIELD LINE SELLINE.

SELINDEX = INFTCTRL-TOP_LINE + SELLINE - 1.

READ TABLE INFT INDEX SELINDEX.

where INFT = internal table

and inftctrl = table control

regards,

amit m.