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

OOALV

former_member288834
Participant
0 Likes
1,164

Hi All,

My requirement is to get the cursor on ALV Grid.

I wrote the following code but its giving only focus in ALV cell not the cursor.

How to get the cursor in ALV Cell like field in the module pool SET CURSOR FIELD.

Below is the code I wrote but I am not getting the focus on perticuler cell, not the mouse cursor.

Please solve my problem.  

DATA: lt_cell TYPE TABLE OF lvc_s_ceno.

  DATA: lwa_cell LIKE LINE OF  lt_cell.
  lwa_cell-col_id = 6.
  lwa_cell-row_id = 1.
  APPEND lwa_cell TO lt_cell.



  CALL METHOD go_grid->set_selected_cells_id
    EXPORTING
      it_cells = lt_cell.

  call method cl_gui_cfw=>flush.

*
*  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-index = 1.
*  wl_is_column_id-fieldname = 'CHKB'.
*  wl_is_row_no-row_id = 1.
*
*  CALL METHOD go_grid->set_current_cell_via_id
*    EXPORTING
*      is_row_id    = wl_is_row_id           " Row No
*      is_column_id = wl_is_column_id   " Column No
*      is_row_no    = wl_is_row_no.        " Row No.
*
*  DATA : lw_cells TYPE lvc_s_cell,
*         lt_cells TYPE TABLE OF lvc_s_cell.
*
*  lw_cells-col_id = 6.
*  lw_cells-row_id = 1.
**  lw_cells-value  = 'CHKB'.
*  APPEND lw_cells TO lt_cells.
*
*
*  CALL METHOD go_grid->set_selected_cells
*    EXPORTING
*      it_cells = lt_cells.

*    DATA : lw_cells1 TYPE lvc_s_ceno,
*         lt_cells1 TYPE TABLE OF lvc_s_ceno.
*
*  lw_cells1-col_id = 6.
*  lw_cells1-row_id = 1.
**  lw_cells-value  = 'CHKB'.
*  APPEND lw_cells1 TO lt_cells1.
*  CALL METHOD go_grid->set_selected_cells_id
*    EXPORTING
*      it_cells = lt_cells1.

Hi All,

My requirement is to get the cursor on ALV Grid.

I wrote the following code but its giving only focus in ALV cell not the cursor.

How to get the cursor in ALV Cell like field in the module pool SET CURSOR FIELD.

Below is the code I wrote but I am not getting the focus on perticuler cell, not the mouse cursor.

Please solve my problem.  

DATA: lt_cell TYPE TABLE OF lvc_s_ceno.

  DATA: lwa_cell LIKE LINE OF  lt_cell.
  lwa_cell-col_id = 6.
  lwa_cell-row_id = 1.
  APPEND lwa_cell TO lt_cell.



  CALL METHOD go_grid->set_selected_cells_id
    EXPORTING
      it_cells = lt_cell.

  call method cl_gui_cfw=>flush.

*
*  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-index = 1.
*  wl_is_column_id-fieldname = 'CHKB'.
*  wl_is_row_no-row_id = 1.
*
*  CALL METHOD go_grid->set_current_cell_via_id
*    EXPORTING
*      is_row_id    = wl_is_row_id           " Row No
*      is_column_id = wl_is_column_id   " Column No
*      is_row_no    = wl_is_row_no.        " Row No.
*
*  DATA : lw_cells TYPE lvc_s_cell,
*         lt_cells TYPE TABLE OF lvc_s_cell.
*
*  lw_cells-col_id = 6.
*  lw_cells-row_id = 1.
**  lw_cells-value  = 'CHKB'.
*  APPEND lw_cells TO lt_cells.
*
*
*  CALL METHOD go_grid->set_selected_cells
*    EXPORTING
*      it_cells = lt_cells.

*    DATA : lw_cells1 TYPE lvc_s_ceno,
*         lt_cells1 TYPE TABLE OF lvc_s_ceno.
*
*  lw_cells1-col_id = 6.
*  lw_cells1-row_id = 1.
**  lw_cells-value  = 'CHKB'.
*  APPEND lw_cells1 TO lt_cells1.
*  CALL METHOD go_grid->set_selected_cells_id
*    EXPORTING
*      it_cells = lt_cells1.

9 REPLIES 9
Read only

Abhijit74
Active Contributor
0 Likes
1,113

Hello,

There was a method called GET_FOCUS AND SET_FOCUS .

I think you should use set_current_cell_via_id as in your code has been commented.

Thanks,

Abhijit

Read only

0 Likes
1,113

I have tried those methods but not working. thats why I have commented.

i didnt get the solution, those menthods are focussing on the cell but not the cursor.

like SET CURSOR FIELD  I need this requirement on ALV.

Help me.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,113

Its not possible in ALV control.

Read only

0 Likes
1,113

k... Thank you

Read only

0 Likes
1,113

I want to edit a coloumn in ALV tree control, How to do that? I have tried using  field catalog and layout, but its not working ...?

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,113

I'm afraid you'll have content yourself with methods such as GET/SET_SCROLL_INFO and GET/SET_FOCUS.

Regards,

Raymond

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,113

Not possible as per my knowledge. Because you move scroll which is not capturable...

Regards,

Venkat Sesha

Read only

Former Member
0 Likes
1,113

Hi Guru,

You can refer to the program BCALV_GRID_EDIT.

Thanks,

Namrata

Read only

0 Likes
1,113

I have checked the program BCALV_GRID_EDIT, but cursor is not on ALV, its on a I/O field on screen.