‎2008 Dec 04 12:46 AM
HI,
I working on MP.i'm using Table control.i wants to restrict the no of rows of the table control to 20.so that we can scroll down upto 20 rows only,any way? plz suggest.
‎2008 Dec 04 5:05 AM
In PBO
MODULE FIX_TC_LINES.
Coding:
TC-LINES = 20. " Where TC is table control name
Done!!!
‎2008 Dec 04 2:38 AM
Please search.
[Table Controls: Examples with Scrolling|http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm]
‎2008 Dec 04 3:11 AM
Hi,
I have one doubt:
Do you only want to display the first 20 records or
you want to see 20 records in the table view and after the first 20 records, you need to use scroll down to see the rest?
Regards,
Chris Gu
‎2008 Dec 04 3:16 AM
HI Chris,
thanks for the reply, i need only 20 records to be in table control.and the size of the TC is small as u can see only 5 rec at a time and scroll upto 20 records only.hope you got it.
‎2008 Dec 04 3:32 AM
Hi,
Another question, if you only want to display 20 records, then you have to omit the rest ones, will it affect your program?
If not, then a easy way, you delete the records from the internal table , just like:
delete itab from 20. " this means delete records from line 20, so that you can get only 20 recordsthen in the tableview, only 20 records will be displayed.
If you have condition about these 20 records, please let me know.Maybe that solution will not work.
Regards,
Chris Gu
‎2008 Dec 04 3:44 AM
hi i will displaying only 20 records in the TC.now i am able to see blank and non editable columns also when i scroll further.i wants to restrict that Tc should not be scrollable after 20 columns
‎2008 Dec 04 3:39 AM
Hi,
Do this way:---
*---data declarations for table control
CONTROLS: tab_cnt1 TYPE TABLEVIEW USING SCREEN '0310'.
DATA: w_ln TYPE i.
MODULE get_t_ctrl_lines OUTPUT.
DESCRIBE TABLE it_mast LINES w_ln.
*TO MAKE VERTICAL SCROLL BAR TO COME ON RUN TIME
tab_cnt1-lines = w_ln + 20.
ENDMODULE. " get_t_ctrl_lines OUTPUT
Thanks & Regards,
Krishna..
‎2008 Dec 04 5:05 AM
In PBO
MODULE FIX_TC_LINES.
Coding:
TC-LINES = 20. " Where TC is table control name
Done!!!
‎2008 Dec 04 5:10 AM
Hi Kiran,
Please note my understanding is correct
if you want to display only 20 records irrespective of number of records available. then
in PBO
tc-lines = 20.
regards
Ramchander Rao.K
‎2008 Dec 04 5:22 AM
HI Chandra,
i had done this also as it is not working.after the 20th record it will be in non-editable mode and can be scrollable.i just wants the TC to be not viewable or not scrollable after 20.
‎2008 Dec 04 5:29 AM
MODULE FIX_TC_LINES.
Coding:
DELETE ITAB FROM 21.
" This will make sure that only 20 records are there in ITAB which is the internal table whose data is to be displayed
DESCRIBE TABLE ITAB LINES TC-LINES.
Done!!!
‎2008 Dec 04 5:32 AM
HI,
At PBO level you have to change the size what ever u want , if ur want to get only 20 rows at a time then u have to set in PBO.