‎2009 Mar 16 12:49 PM
Dear friends,
I am using the table contol to enter the data,
TC is having 5 Rows and 3 cols, After enter the data in first row I will press Enter key then cursur will come into second row first column, which is working fine.
After compliting the total 5 rows ( displayed 5 rows ) if I press the Enter Key the cursur is going to top row, it should come to next line ( I mean to 6th row we can say page down )
I am using the below logic in my PBO
DATA lv_line11 LIKE sy-tabix.
DESCRIBE TABLE gt_scr200 LINES lv_line11.
SET CURSOR FIELD 'WA_SCR200-ZZID' LINE lv_line11.
gt_scr200 is my Internal Table.
Pls let me know to to make the cursur position.
Thanks,
Sridhar
‎2009 Mar 16 12:52 PM
try this:
lv_cursor = lv_line11 + 1.
SET CURSOR FIELD 'WA_SCR200-ZZID' LINE lv_cursor.
.
‎2009 Mar 16 12:52 PM
‎2009 Mar 16 2:06 PM
Hi
Please search the CODE GALLERY with Insertion of data from Table Control to Database table You will get a code.........try to utilize it.
Thanks.
‎2009 Mar 16 2:40 PM
Hi Sridhar,
As you said, TC is dispaling only 5 rows, so the top one is the 1st one. Whenever you want to "page down" you have to scroll your tc, setting new top_line field number.
"in screen flow logic
PROCESS AFTER INPUT.
Loop at gt_scr200.
MODULE some_module.
Endloop.
"in ABAP program
MODULE some_module INPUT.
if lv_line11 = sy-loopc. "if last displayed line reached.
ADD sy-loopc TO tc_structure-top_line. "scroll down, setting new top line
ADD sy-stepl TO lv_line11. "set current line as the new top line
endif.
SET CURSOR FIELD 'WA_SCR200-ZZID' LINE lv_line11. "set cursor at new position (in 6th row )
ENDMODULE.
That should suffice.
Regards
Marcin