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: 

How to read a current line in table control in dialoug program ?

Former Member
0 Kudos

How to read a current line in table control in dialoug program ?

this code required to provide F4 help.

5 REPLIES 5

Former Member
0 Kudos

Hullo,

Your table control has a field current_line.

You can read the internal table using that <tablecontrol>-currentline as an index.

Hope this helps.

0 Kudos

READ TABLE g_val_disc_maint_itab INTO g_val_disc_maint_wa

INDEX val_disc_maint-current_line.

This is the statement i'm using in POV Module.

The statement is not in the loop.

Former Member
0 Kudos

Hi,

table control will have default field as current_line, so by using this you can read the current line.

in the table control screen element attributes provide variable name for Selection.col.Name: and when ever u needs to read the current line, check the variable is 'X' or not.

Example:

IF LINSEL EQ 'X'.

MODIFY ITAB INDEX TCL-CURRENT_LINE.

endif.

if helpful reward me

thanks,

Murali

Former Member
0 Kudos

Hi,

You can use the variable <tablecontrol>-Currentline as Ebus says but there is a problem with this.Suppose there are 10 records in the table control with only 5 records visible then when u press a page down and press F4 the first record in page 2, <tablecontrol>-Currentline will have value of 1 instead of 6.So you will need to write a small logic for that.

index = ( <tablecontrol>-topline - <tablecontrol>-currentline ) + 1.

read internal table itab at index.

Hope this helps.

Regards,

Vivek

Former Member
0 Kudos

Hello,

Use <tablecontrol>-currentline.

Regards,

Shehryar Dahar