2006 Nov 21 8:48 PM
hello friends this is venkat.
i am using a table control to display records from a custom table.
can any one please help me about the following...
i declared table contrlo lines equal to 10.
and my custom table has 30 records.
so i set the my_tab-lines = 40 and my_tab-top_line = 21,
so that i can see the last ten records of the custom table in table control.
now i want to see the previous records by using the vertical scroll bar buttons.
once i click the vertical scroll bar button.. the records in the table control are not scrolling but the PAI is getting triggered...
what is the ok_code when vertical scroll bar buttons are used...
thanks,
Venakt.
2006 Nov 22 11:05 AM
Hi,
Try this,
Tick the vertical scrollable flag of your table control attribute.
And then in PBO module, set the total lines of the table control in TABLEVIEW-LINES.
Please reward if it helps.
2006 Nov 22 11:06 AM
Hello Venkat,
Do like this.
In the PBO event.
<b>Describle table itab index sy-tline.</b>
If useful reward.
Vasanth
2006 Nov 22 11:12 AM
Hi
Try like this
Declare one variable like this.
DATA FILL TYPE I.
Then in PBO of the table control write the code like this
&----
*& Module STATUS_1000 OUTPUT
&----
text
----
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
Here you r filling the fill field with the no of lines in internal table.
DESCRIBE TABLE <internal table name> LINES FILL.
Here assigning that lines to the tablecontrol.
<tablecontrol name>-LINES = FILL.
ENDMODULE. " STATUS_1000 OUTPUT
Regards
Haritha.
Message was edited by:
Haritha Ramayanam
2006 Nov 22 11:28 AM
Hi,
set the more lines than visible line, then you get the vertical scrollbar .
if there are visible lines in table control is 20 lines, then give
tc-lines = 30.
Regards
Vijay