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: 

Hotspot not working when EDIT is active

WillyDO
Explorer
0 Kudos

Hi,

I have a problem with an ALV OO, I'm using hotspot and edit, but not on the same field and when I click on the hotspot field it always retrieve index = 1. I commented edit functionality and hotspot works fine but the requirement is to have both. Any suggestion? Thanks!

19 REPLIES 19

Sandra_Rossi
Active Contributor
0 Kudos

It's not possible. Use double click instead.

0 Kudos

Hi, thanks for replying, I also tried to use dobleclick but same result, it always returns index = 1 even though I clicked other row. 

0 Kudos

It's a bug in your program then. Or if it's not, check SAP notes or contact SAP support.

0 Kudos

By the way, there are lots of SAP demo programs, try them to check what line is returned by the double click.

raymond_giuseppi
Active Contributor

Read first 2799015 - ALV Grid: Transfer of incorrect line for hotspot in editable grid (SAP_BASIS 753 and +) and similar notes.

0 Kudos

This note is for the case a new line hase been added.

0 Kudos

The correction of this note correct the displatch method of OO class in case of clicks (row/col, button, double-click) to update some frontend tables and prevent errors.

0 Kudos

Thanks for reply, that note says it's for 753 to 754, current client is 757. Thanks!

 

thomas_mller13
Participant
0 Kudos

Add a toolbar button, mark line and handle toolbar event.

0 Kudos

Thanks for reply, we had that solution as a workaround but client still wanna try with hotspot.

0 Kudos

What parameter are you using: e_row_id or es_row_no? In es_row_no you should get the right index.

0 Kudos

Both are giving back index = 1

0 Kudos

No, it works: 

thomas_mller13_0-1713299092771.png

I have an example of a editable ALV which contains a hotspot on a non-editable field. I click on the hotspot an a popup with the text opens.

The field with the hotspot has to be non-editable.

 

 

0 Kudos

Only status field is editable

WillyDO_1-1713306221016.png

 

then I click on 4th row to take me to AS03

WillyDO_2-1713306296005.png

now the fieldname is right, but index still 1 though I clicked 4th row.



0 Kudos

Remove the checkbox property from the field and paste your code.

Sandra_Rossi
Active Contributor
0 Kudos

"but client still wanna try with hotspot."

As you desperately ask for a clickable editable hotspot field, a trick is to have the hotpot field not editable by default, make it editable when you enter the field by tabulation and make it not editable again when you leave it (still by typing tabulation), but it's a trick and I doubt it will work very well, and you'll spend a lot of time to make it work more or less correctly (if even possible).

A more simple solution which will always work, is to have a toggle button to make the column of hotspots editable or not editable.

0 Kudos

The hotspot field is not editable.

0 Kudos

I already answered "It's not possible. Use double click instead." I meant to have a hotspot field by default, and to change it to a non-hotspot editable field either by tabulation or by any button (ABAP code will change the definitions of fields).

Sandra_Rossi
Active Contributor
0 Kudos

If something does not work as you expect, you should check the SAP notes or contact SAP support.