11-15-2006 10:50 AM
How to read a current line in table control in dialoug program ?
this code required to provide F4 help.
11-15-2006 10:54 AM
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.
11-15-2006 10:57 AM
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.
11-15-2006 11:01 AM
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
11-15-2006 11:05 AM
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
11-15-2006 11:11 AM