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

Set Cursor in ALV Grid

Former Member
0 Likes
1,091

Hi

Is there any way of setting cursor in ALV grid when using Function Module .

When user selects many no of rows and clicks some button ,

I have to set the cursor in a particular cell where data is wrongly entered.

How to set the cursor?

Edited by: PonVignesh Ayyadurai on Dec 22, 2008 8:29 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
749

Use method set_current_cell_via_id of CL_GUI_ALV_GRID . Check code below.

DATA : wl_is_row_id TYPE lvc_s_row,

wl_is_column_id TYPE lvc_s_col,

wl_is_row_no TYPE lvc_s_roid.

wl_is_row_id = p_wl_lines.

wl_is_row_no-row_id = p_wl_lines.

CALL METHOD w_grid->refresh_table_display

EXPORTING

i_soft_refresh = 'X'.

CALL METHOD w_grid->set_current_cell_via_id

EXPORTING

is_row_id = wl_is_row_id

is_column_id = wl_is_column_id

is_row_no = wl_is_row_no.

Hope this helps...

Hi

Is there any way of setting cursor in ALV grid when using Function Module .

When user selects many no of rows and clicks some button ,

I have to set the cursor in a particular cell where data is wrongly entered.

How to set the cursor?

Edited by: PonVignesh Ayyadurai on Dec 22, 2008 8:29 PM

3 REPLIES 3
Read only

Former Member
0 Likes
749

Hi,

Please check this following link will help you to find your answer

http://help.sap.com/saphelp_nw04/helpdata/en/0a/b55327d30911d2b467006094192fe3/content.htm

Read only

Former Member
0 Likes
749

Hi,

That works with classes.

I am using Function module 'REUSE_ALV_GRID_DISPLAY'.

Will the 'GET_SELECTED_...' in 'CL_GUI_ALV_GRID' work for function module?

Read only

Former Member
0 Likes
750

Use method set_current_cell_via_id of CL_GUI_ALV_GRID . Check code below.

DATA : wl_is_row_id TYPE lvc_s_row,

wl_is_column_id TYPE lvc_s_col,

wl_is_row_no TYPE lvc_s_roid.

wl_is_row_id = p_wl_lines.

wl_is_row_no-row_id = p_wl_lines.

CALL METHOD w_grid->refresh_table_display

EXPORTING

i_soft_refresh = 'X'.

CALL METHOD w_grid->set_current_cell_via_id

EXPORTING

is_row_id = wl_is_row_id

is_column_id = wl_is_column_id

is_row_no = wl_is_row_no.

Hope this helps...