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: 

Cursor jumps to top of the screen after modifying cell

Former Member
0 Kudos
2,002

Hi,

I have a customer screen with several subscreen (with ALV's), and in one of them if user press the ENTER after changing a cell, the cursor comes to the first field of the main screen. On my computer, this does not happen.

This episode is bad because the screen measure a height greater than the total height of the computer screen, soon becomes very annoying for the user.

A colleague told me that may be related to the Patch Level of the SAP in user PC be different from mine, but I'm not sure.

In the program (in PAI and PBO code of screen and in screen elements) also has no instruction to redirect the cursor after a modification.

Thank you any help or comments,

Daniel

4 REPLIES 4

krishnendu_laha
Active Contributor
0 Kudos
462

Hello,

It's not related to patch level, because believe user is using same SAP system as like you...

I think it is due to the behavior that ALV can not hold the current selected position.

Please try below code after catching the user command of enter:

  • Holding the row position

lwa_stable = zcl_cs=>true.

CALL METHOD rf_alv_overview->refresh_table_display

EXPORTING

is_stable = lwa_stable.

Hope it will help you.

Former Member
0 Kudos
462

Hi Daniel,

Check the settings of the user in SAP. You do this by clicking on the icon on the toolbar which is the furthest to the right or ALT+F12 (any screen will do). Go to options and then to the second tab "Cursor". Check the settings of the Automatic TAB at Field End.

Maybe this is being activated for the user?

Not sure in case you make changes if you first need to log off and back on to have your changes take effect.

Kind regards,

Robert

Former Member
0 Kudos
462

Hi,

Unfortunately none of the solutions presented solved the problem.

Thanks anyway.

Former Member
0 Kudos
462

Hi,

I solved the problem using these two methods:

CALL METHOD grid_pp->get_current_cell

IMPORTING

E_ROW = e_row

  • E_VALUE = lv_e_value

E_COL = e_col.

CALL METHOD grid_pp->set_current_cell_via_id

EXPORTING

is_column_id = column_id

is_row_no = row_no.

Thanks,

Daniel