2013 Jul 09 10:22 PM
In my dialog program I have screen 50 and screen 100.
Screen 50 is a table control with radio buttons in one of the fields. Every row has a key.
So when the user hits the radio button on 'lets says' row 10 which has key 57 than in screen 100 it will show a table with all the cost centers for that key.
The problem is this: Lets say that key 57 has 30 cost centers and in screen 100 the users scrolls down to see that the last cost center. Now he backs out to screen 50 and hits key 34 which only has 3 cost centers.
Screen 100 now shows the table with the scroller al the way down and no cost centers are displayed. If the user knows to scroll back up there is no problem and he will see the 3 cost centers. But not all users are that smart and I want to display key 34 with the scroller al the way up.
SET CURSOR FIELD 'GS_RO_DETAIL-KOSTL' LINE 1. will not do the trick
Can anyone point me in the right dirction.
Thanks
J
2013 Jul 10 1:29 PM
Hi Jan Ackerman,
Before calling screen 100 from screen 50 write the following statements.
describe table ITAB. "ITAB is the internal table mapped with TC in screen 100
tc_100-lines = sy-tfill."TC_100 is the table control name of screen 100
tc_100-top_line 1.
tc_100-current_line = 1.
call screen 100.
Regards.
2013 Jul 10 12:14 PM
Please check 'Hold Scroll position' in settings section of Attributes tab of screen 100.
2013 Jul 10 1:11 PM
This is due to the un matched table control lines.
the problem can be resolved as :
in the screen 100 in PBO describe the internal table to get the no of lines in the internal table that you want to display and assign the number of lines in to the table control lines.
this issue will be solved.
data: wrk_line_count type i length 3. "as per records
DESCRIBE TABLE it_1000 LINES wrk_line_count.
"assume your table control name is "TCTRL_1000".
TCTRL_1000-lines = wrk_line_count.
2013 Jul 10 1:21 PM
Hi Devnand and Chandramouli, I have tried both your solutions but no effect. Devavand's solution was already in the code. Thank you for your replies.
J
2013 Jul 10 1:29 PM
Hi Jan Ackerman,
Before calling screen 100 from screen 50 write the following statements.
describe table ITAB. "ITAB is the internal table mapped with TC in screen 100
tc_100-lines = sy-tfill."TC_100 is the table control name of screen 100
tc_100-top_line 1.
tc_100-current_line = 1.
call screen 100.
Regards.
2013 Jul 10 1:46 PM