Application Development 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: 

ALV scroll bar

herzelhaimharel_gilor
Participant
0 Kudos

Hi folks ,

does someone know how can control the postion of scroll bar of an alv grid ?

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

Through the instance method "<b>SET_SCROLL_INFO_VIA_ID</b>" of <b>CL_GUI_ALV_GRID</b> class.

code sample:

put this code after calling <b>set_table_for_first_display</b> method


  DATA: row_info TYPE lvc_s_row ,
          col_info TYPE lvc_s_col ,
          row_id TYPE lvc_s_roid  .

    MOVE: 'XXXXX' TO col_info-fieldname .
    MOVE: '150' TO row_id-row_id .
    CALL METHOD grid1->set_scroll_info_via_id
  EXPORTING
*        IS_ROW_INFO =
     is_col_info = col_info
    is_row_no   = row_id .

The above code will position the horizontal scroll at column XXXXXX and vertical scroll at 150th row.

Regards

Raja

1 REPLY 1

athavanraja
Active Contributor
0 Kudos

Through the instance method "<b>SET_SCROLL_INFO_VIA_ID</b>" of <b>CL_GUI_ALV_GRID</b> class.

code sample:

put this code after calling <b>set_table_for_first_display</b> method


  DATA: row_info TYPE lvc_s_row ,
          col_info TYPE lvc_s_col ,
          row_id TYPE lvc_s_roid  .

    MOVE: 'XXXXX' TO col_info-fieldname .
    MOVE: '150' TO row_id-row_id .
    CALL METHOD grid1->set_scroll_info_via_id
  EXPORTING
*        IS_ROW_INFO =
     is_col_info = col_info
    is_row_no   = row_id .

The above code will position the horizontal scroll at column XXXXXX and vertical scroll at 150th row.

Regards

Raja