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: 

Events of ALV grid when change rows

Former Member
0 Kudos

Hi All,

I have problem. I need process the event when user selects other row. I don't find standarts events.

Could you tell me how I solve this problem?

Thanks a lot.

12 REPLIES 12

Former Member
0 Kudos

You can use the events <b>BUTTON_CLICK</b> and <b>DOUBLE_CLICK</b>.

In event, you receive the selected line.

Former Member
0 Kudos

hi,

Look at the inmplementation of double_click event in the report program BCALV_GRID_03 of development class SLIS.

Happy eventing...:-)

0 Kudos

Unfortunately, I must process event when user uses keyboard.

Thanks a lot.

0 Kudos

Helo Igor,

What do you mean when you say "...when the user uses keyboard.." ? You don't want to do any processing if the user selects the rows with a mouse ?

Usually, the F2 Key would trigger the Double_Click event. Pressing F2 is the standard way the user may select a row, so you should not have a probelm.

If this does not solve your problem, please explain the requirement in more detail.

Regards,

Anand Mandalika.

0 Kudos

Not sure if there is a key_pressed event that could be captured on pressing of any key on the keyboard.

The ALV grid event bind to the mouse movement/click, you could additionally try using the hotspot_click event in case you are not intending to make the user click twice.

To use this event you have to make that particular column a hotspot. this will eliminate the double click, but will also demand that you declare your columns as hotspots, additionally one-click will be required.

0 Kudos

I mean, that user want move from the row to other row by click buttons of keyboard "Up" and "Down".

It's very critical for users.

Thanks a lot.

0 Kudos

How about the user moves the cursor with the up and down keys, and then hits enter? You code a function code for the enter key and then use standard ALV method call to retrieve the row/col where the cursor was placed. You can then retrieve the row and take whatever action you need.

Let us know how it goes.

Former Member
0 Kudos

I think the event DELAYED_CHANGED_SEL_CALLBACK may help you. Don’t forget to call the method REGISTER_DELAYED_EVENT for registering this event. This event works approximately in 3 sec. after the user has changed the row by mouse or by pressing key PgUp or PgDown.

0 Kudos

The event DELAYED_CHANGED_SEL_CALLBACK don't help me. 3 sec. is the big delay.

And users don't want pressing key Enter.

They have a lot of rows for analyse, and they don't want execute the unnecessary actions.

I don't see the good decision...

0 Kudos

Hi,

If you need to perform movement on the basis of keyboard keys, you will have to use Menu Painter, SE41, and assign Function Codes against available Functions keys. Unfortunately the arrows keys are not listed there. You users will have to press any of the listed keyboard keys that you can process in your program.

Regards

0 Kudos

My screen contain 2 ALV grid. In the first ALV I output the operation date. In the second ALV I output the date concerned with date from first ALV.

User want perform movement in first ALV (key Up and Down)and see concerned date in the second ALV.

0 Kudos

Hello Igor,

As long as you want to design your screen in the SAP GUI environment, you cannot have the event triggerring at the arrow butons on the key board.

If you are bent on having the functionality, then the only option I see is for you to use OLE and have a Microsoft (VB or VBA) based fornt-end for the application.

Regards,

Anand Mandalika.