‎2008 Nov 21 7:11 AM
Hi All,
Iam facing a problem with table control in Module Pool.
For Example: If i have 10 records in ITAB and my table control can display 5 records at a time , remaining records we can see by scrolling the vertical scroll bar of table control.
But when i scroll the vertical scroll bar of table control, the data inside the table control is not scrolling i mean the first 5 records can only able to see though if i scroll the table control.....
Please tell me how to rectify this..
Many Thanks in Advnace........
‎2008 Nov 21 7:14 AM
Hi Easwar,
Please ensure that your itab contains 10 records.
Then in PBO
before the loop at itab with control tc.
endloop.
you must have a standard module.
in that module
describe table itab lines tc-lines.
regards
Ramchander Rao.K
‎2008 Nov 21 7:21 AM
hi,
use this in PBO
tabdata ->table control name
tabcounter is the integer variable.
it_det is the internal table name
TABDATA-CURRENT_LINE = 1.
DESCRIBE TABLE IT_DET LINES TABCOUNTER.
IF TABCOUNTER = 0.
TABDATA-LINES = 100.
ELSE.
TABDATA-LINES = TABCOUNTER + 18.
ENDIF.
‎2008 Nov 21 8:49 AM
Hi Eeshwar Baddam,
If your internal table consists more records than the number of rows displayed in the table control on the screen.
The in the PBO of screen (in which you are displaying data in the table control), write this code:-
*****************************************PBO OF SCREEN 8001************************************************
MODULE STATUS_8001 OUTPUT.
SET PF-STATUS 'Z_TABCT'.
DATA : LINE_COUNT TYPE I.
DESCRIBE TABLE MOVIE_TAB "(MOVIE_TAB is the internal table)
LINES LINE_COUNT.
MOVIE-LINES = LINE_COUNT + 5. "(MOVIE is name of table control)
*increment the number of lines of the table control so that if you scroll the tabLe control, then you can
*see all the records.
ENDMODULE. " STATUS_8001 OUTPUT
************************************************************************************************************************
Hope this solve your problem.
Regards.
Tarun Gambhir.
‎2008 Nov 21 9:51 AM
In PBO before LOOP and ENDLOOP
MODULE SCROLL.
" Write following code
DESCRIBE TABLE ITAB LINES TC-LINES. "where ITAB is internal table being displayed in table control name TC
‎2009 Jan 10 7:01 AM
Hi,
try this code for enabling vertical scroll for your table control.
Select PBO module status & click on that.
Just you write a code after normal code as:
tablecontrolname-LINES = SY-DBCNT.(this will enable the table control vertical scroll bar.)
Normal code before above statement is(for eg.),
MOVE WA-EBELN TO EKKO-EBELN.
MOVE WA-AEDAT TO EKKO-AEDAT.
Regards,
BBR.
‎2009 Jan 10 10:29 AM
Hi ,
Do the following things in your PBO and PAI event of screen .
PROCESS BEFORE OUTPUT.
module call_screen .
Module LINES .
LOOP AT IT_CIVIL WITH CONTROL TCvLAB CURSOR
TCvLAB-CURRENT_LINE .
ENDLOOP .
PROCESS AFTER INPUT.
chain .
field IT_CIVIL-CIVILIND .
field IT_CIVIL-NAME_TEXT1 .
field IT_CIVIL-SUBCONT1 .
field IT_CIVIL-NAME_TEXT2 .
field IT_CIVIL-SUNCONT2 .
module modify_civil_DATA .
endchain .
*****************************************************
modules :
IN PBO
MODULE LINE OUTPUT .
DESCRIBE TABLE IT_CIVIL LINES LIN .
TCvLAB-LINES = LIN .
ENDMODULE .
IN PAI :
MODULE MODIFY_CIVIL_DATA INPUT.
clear : wa_civ .
move-corresponding it_civil to wa_civ .
read table it_civil index 1 .
if sy-subrc = 0 .
modify it_civil index 1 from wa_civ .
else .
append it_civil .
clear : it_civil .
endif .
******************************
YOUR PROB WILL SOLVED .
PLEASE REWARDS IF SATISFIED .
REGARD'S
NILESH JAIN
‎2009 Jan 10 11:16 AM
Find the no of lines in your internal table using DESCRIBE TABLE itab LINES gv_lines.
Then in PBO, write
tc-lines = gv_lines.
where tc is your table control.
regards,
Jinson