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

Another table control issue...

Former Member
0 Likes
382

I have a table control which has two fields: Table Name and Field Name. I have a listbox for Table name field and F4 for field name. Depending on the table name chosen, F4 shows the relative field entries. Now problem is coming when all the rows on the screen are filled and user do a scroll down. now since I am reading the table name to call F4 for field name using Tablectrl-currentline, it is giving me wrong value for table name. Also I have to take care of th efact that user can modify existing entry also.

Anybody???

Thanks in advance

Reagards,

Arpit

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
366

I think you will need to add the TOP_LINE value and the CURRENT_LINE value of the table control together to get the actual row of the internal table.

Regards,

Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
367

I think you will need to add the TOP_LINE value and the CURRENT_LINE value of the table control together to get the actual row of the internal table.

Regards,

Rich Heilman

Read only

0 Likes
366

Yes, you will want to do something like this. It worked for me in one of my table control programs.



data: cursorfield(20) type c,
      cursorline      type i,
      cursorvalue(20) type c,
      cursorindex     type i.


* Read the line of the table where user has requested F4 help
  get cursor field cursorfield line cursorline value cursorvalue.
  cursorline = ( cursorline + tablecon-top_line ) - 1.
  read table internal_table index cursorline.


Regards,

Rich Heilman