Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Scroll up in table control

Former Member
0 Likes
930

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

1 ACCEPTED SOLUTION
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
891

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.


5 REPLIES 5
Read only

former_member784222
Active Participant
0 Likes
891

Please check 'Hold Scroll position' in settings section of Attributes tab of screen 100.

Read only

0 Likes
891

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.

Read only

Former Member
0 Likes
891

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

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
892

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.


Read only

0 Likes
891

Thank you Arun,  That worked perfectly.  Much appreciated.