01-30-2015 2:43 PM
Hi Expert,
In module pool I am using alv display in subscreen. I am using cl_gui_alv_grid. which have one editable coulmn to enter quantity.
Now once I execute main screen and its all ALV subscreen. Requirment is cursor should place only that row and coulmn which have remaining qty to enter Or which are in EDIT mode.
I have try using o_grid->set_current_cell_via_id also set_focus method.
But cusrsor not going to ALV editable fields.
Thanks in Advance.
Anupam
01-30-2015 5:18 PM
hi anupam,
Try this following code to move cursor to the specified field.
DATA: ls_row TYPE i,
ls_value TYPE c,
ls_col TYPE i,
ls_row_id TYPE LVC_S_ROW,
ls_col_id TYPE LVC_S_COL,
es_row_no TYPE LVC_S_ROID.
CALL METHOD go_grid->get_current_cell
IMPORTING e_row = ls_row
e_value = ls_value
e_col = ls_col
es_row_id = ls_row_id
es_col_id = ls_col_id
es_row_no = es_row_no.
ls_col_id = 'ERSDA'. "cursor will go this field.
CALL METHOD go_grid->refresh_table_display.
CALL METHOD go_grid->set_current_cell_via_id
EXPORTING is_column_id = ls_col_id
is_row_no = es_row_no.
01-30-2015 5:18 PM
hi anupam,
Try this following code to move cursor to the specified field.
DATA: ls_row TYPE i,
ls_value TYPE c,
ls_col TYPE i,
ls_row_id TYPE LVC_S_ROW,
ls_col_id TYPE LVC_S_COL,
es_row_no TYPE LVC_S_ROID.
CALL METHOD go_grid->get_current_cell
IMPORTING e_row = ls_row
e_value = ls_value
e_col = ls_col
es_row_id = ls_row_id
es_col_id = ls_col_id
es_row_no = es_row_no.
ls_col_id = 'ERSDA'. "cursor will go this field.
CALL METHOD go_grid->refresh_table_display.
CALL METHOD go_grid->set_current_cell_via_id
EXPORTING is_column_id = ls_col_id
is_row_no = es_row_no.
02-02-2015 7:26 AM
Hi ,
Using above code its just highlist the editable field cursor still on main screen field.
02-02-2015 7:51 AM
Hi Abdul,
Try using following method.
CALL METHOD LR_ALV_GRID->SET_SELECTED_CELLS_ID
EXPORTING
IT_CELLS = LT_CELL.
Regards,
Vijay
11-26-2021 1:58 PM
02-02-2015 8:34 AM
Hi Vijay,
Same result . just highlight that row and coulmn.
main problem is I am giving some input to main screen and after executing main screen its giving ALV in subscreen. subscreen is also part of main screen. So my cursor still on main screen input field.
Regards,
Anupam
02-03-2015 2:44 PM
Hi Anupam,
Have you refreshed the ALV after setting cursor position. What I believe is, above method is called with reference of ALV so Sub-screen doesn't matter.
Try refreshing ALV.
grid->refresh_table_display( i_soft_refresh = 'X' ).
Regards,
Vijay
02-04-2015 7:37 AM
Hi Vijay,
First I refresh only after that I use 2 FM . Here is my senario.
********************************
Selection screen
Input 1 Cursor is here
Input 2 then cursor is here Input 3. Execute button
Now its displaying ALV which have 2-3 toolbaar button
Button 1 Button 2 Button 3
Once I execute its calling subscreen ALV and initialy cursor going to first input field of ALV.
Now once I press buttn 1 which have some functionalty after this I am calling same metod's. Now cursor is going to Button 1 only rether go to input field.
Thanks Anupam
02-12-2015 6:54 PM
02-13-2015 7:14 AM
02-18-2015 9:14 AM
Hi Venkat,
Please read ques. I am not talking about screen field. Here something different talking abut editable ALV in subscreen.