‎2006 Aug 23 2:19 PM
Hi all,
Good morning all
PROCESS BEFORE OUTPUT.
module no_lines.------1
MODULE STATUS_9100.
loop at itab with control
table_control cursor table_control-current_line.
module get_data.----
2
endloop.
1)data li_lines type i.
describe table itab lines li_lines.
table_control-lines = table_control-lines + 20.
2)
zabc-matnr = itab-matnr.
zbac-maktx = itab-maktx.
I when i first go into the screen 9100 my
table_control-top_line =1
table_control-current_line = 1.
when i fill the data in the table control which can upto 12 records and hit enter then
table_control-top_line =1
table_control-current_line = 1.
the current_line goes from 1 to 12.
when i drag the the vertical bar then
table_control-top_line =2
table_control-current_line = 2.
the current_line goes from 2 to 13
now my internal table has 12 records ,but since the current_line is initially 2 the data from second record of internal table itab is moved into table control.
now my table control has 11 starting with the second record of internal table and an empty row at the bottom.
I am losing the first record.
I need all the records with an empty rows at the bottom
‎2006 Aug 23 3:22 PM
Hi,
Declare
data: v_tc_table_lines like sy-loopc.
<b>and in PBO</b>
module no_lines.------1
1)data li_lines type i.
describe table itab lines li_lines.
<b>No need for this line...</b>
->table_control-lines = table_control-lines + 20.
module get_data.----
2 write the following code.
v_tc_table_lines = sy-loopc.
<b>In PAI</b>
loop at IT_table.
chain.
field X_table-field1.
field X_table-field2
....
module TC_table_modify on chain-request.
endchain.
endloop.
In program.
module TC_table_modify
modify it_table
from x_table
index tc_table-current_line.
So in PAI, the data from the table control gets looped and modified in the table(or you can append this data). and in PBO, the data from the internal table is get looped and the table control is filled.
Hope this helps.
Regards,
Richa
‎2006 Aug 23 3:22 PM
Hi,
Declare
data: v_tc_table_lines like sy-loopc.
<b>and in PBO</b>
module no_lines.------1
1)data li_lines type i.
describe table itab lines li_lines.
<b>No need for this line...</b>
->table_control-lines = table_control-lines + 20.
module get_data.----
2 write the following code.
v_tc_table_lines = sy-loopc.
<b>In PAI</b>
loop at IT_table.
chain.
field X_table-field1.
field X_table-field2
....
module TC_table_modify on chain-request.
endchain.
endloop.
In program.
module TC_table_modify
modify it_table
from x_table
index tc_table-current_line.
So in PAI, the data from the table control gets looped and modified in the table(or you can append this data). and in PBO, the data from the internal table is get looped and the table control is filled.
Hope this helps.
Regards,
Richa
‎2006 Aug 23 3:27 PM
hi,
You need to call the FM SCROLLING_IN_TABLE for scrolling. You need to call it in the tc_table_user_command of the screen. Capture the ok_code and call the FM accordingly.
call function 'SCROLLING_IN_TABLE'
exporting
entry_act = tc_table-top_line
entry_from = 1
entry_to = tc_table-lines
last_page_full = 'X'
loops = v_tc_table_lines
ok_code = 'P+' "This is for scrolling down
overlapping = 'X'
importing
entry_new = l_tc_new_top_line
exceptions
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
others = 0.You can call this FM in a form with ok_code as parameter to handle all page up(P-), page down(P), first page(P--) and last page(P+)
This will give the new top line and retain the data (ie first record)in the internal table.
Hope this solves the issue.
Regards,
Richa.
Message was edited by: Richa Singh
‎2006 Aug 23 6:31 PM
Hi richa,
can you send me your email id so that i can send you my code because i tried both your ways but it doesn't working.
I think the problem is with
table control top line
and table control current because when i scroll down my
table control top line and current line is not 1
waiting for your reply
‎2006 Aug 24 10:23 AM
‎2006 Aug 24 3:35 PM
‎2006 Aug 24 3:55 PM
hi
has anybody faced a similar problem pls do let me know
Thanks