‎2009 Mar 18 1:34 PM
Hi All,
I have designed the table control .. user entering the values in the table control
PBO
<TC>-lines = 10.
but when user enters 5 lines and press the scroller down and immediately press scroll up.. then iam loosing complete data in the table control.
please help me how to get the values on table control
Thanks
reddy
‎2009 Mar 18 1:41 PM
MODULE scroll OUTPUT.
TC_9998-current_line = 1.
DESCRIBE TABLE IT_EKKO LINES l.
TC_9998-lines = l .
Keep Scroll in PBO.
Hope it help TC_9998--> Table Control
IT_EKKO ---> Internal Table
You also can search code gallery using Insertion of data from Table Control to Database table.You get a code snippet. May it helps too.
Thanks & Regards.
sarbajit.
Edited by: Sarbajit Majumdar on Mar 18, 2009 7:15 PM
‎2009 Mar 18 1:41 PM
Hi check wether you have done like:
Remove the Tick under Vertical check box under RESIZING option
in Table Control attributes.It is working.
Else you have to write code in PAI event to store all table control data back to some internal table.
like said by Sarabjit.
.
Edited by: Amresh kumar Panda on Mar 18, 2009 7:12 PM
‎2009 Mar 18 2:54 PM
hi ,
To get the vertical scroll bar in table control.
Describe lines of internal table to extend the table control Vertical
scroll bar
in PBO.
DESCRIBE TABLE < Internal table>LINES w_fill.
<Tablecontrolname>-lines = w_fill.
Regards,
Prabhudas
‎2009 Mar 19 4:32 AM
Hi,
To display a vertical scroll bar in table control use code in the PBO of screen as :-
At screen logic:
PROCESS BEFORE OUTPUT.
MODULE status_8002.
LOOP WITH CONTROL tab_ctrl. "tab_ctrl is table control name
MODULE read_data. "<--read data into table control
ENDLOOP.
In PBO,
MODULE status_8002.
DATA : line_count TYPE i.
DESCRIBE <itab>
LINES line_count.
tab_ctrl-lines = line_count + 25. "<--for vertical scroll bar
ENDMODULE.
Hope this helps you.
Regards,
Tarun
‎2009 Mar 19 4:37 AM
Hi,
to add the vertical scroll bar
you can refer the given below code in PBO.
DATA : LINE_COUNT TYPE I.
DESCRIBE TABLE MOVIE_TAB
LINES LINE_COUNT.
MOVIE-LINES = LINE_COUNT + 3.
Thanks
Arun
‎2009 Mar 19 5:06 AM
Hi Reddy,
You Can try the Following code for Keeping the data entered in table control Intact on scrolling :
In the Flow Logic , include the code :
PROCESS BEFORE OUTPUT.
MODULE VLINE_TABLE.
In the PBO, include the code :
&----
*& Module VLINE_TABLE OUTPUT
&----
text
----
MODULE VLINE_TABLE OUTPUT.
DESCRIBE TABLE ITAB LINES VLINE.
TABLECONTROL-LINES = VLINE.
T_LINES = VLINE.
CLEAR VLINE.
ENDMODULE. " VLINE_TABLE_001 OUTPUT
I hope this helps you.
Thanks & Regards,
Bhavika
‎2009 Mar 19 5:09 AM
‎2009 Mar 19 9:50 AM
‎2009 Mar 19 9:52 AM
in PAI
loop at itab.
a module to pass the data from screen to program
module modify_tc.
endloop.
module modify_tc.
describe table itab lines tc-lines.
if tc-current_line > tc-lines.
append itab.
else.
modify itab.
endif.
endmodule.
‎2009 Mar 26 5:45 AM
Hi ChadraBabu!
Are you still facing problem? If your problem solved , then please mark the thread as ANSWERED.
Regards.
Sarbajit.