cancel
Showing results for 
Search instead for 
Did you mean: 

capturing event on ALV standard buttons like Append Row and Insert Row

Former Member
0 Kudos

Hello,

I am trying to fill the default values for fields on ALV grid. I tried to use ON_DATA_CHECK event of the ALV Component Usage (FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.). but, when I put the break point in it and press Insert Row button, the cursor does not stop there. Please let me know how can I put the default value for context fields in ALV on pressing Insert Row.

Shall appreciate your response.

Thks & Rgds,

Hemal

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Thanks for the reply. I have already implemented from this link but, it doesn't work for me somehow. I am able to capture the event when I select the row in ALV using on_lead_select event. Now I need to know how do I dynamically change the lead select when I press Append Row or Insert Row button in ALV grid.

Thks & Rgds,

Hemal

Former Member
0 Kudos

Hi,

Try creating event handler for ALV event 'ON_STD_FUNCTION_BEFO' , this event could be triggered when you click on ADD button, try putting a break point there once you have created event handler for it in your component.

Parameter r_param->id should give you the standard event id raised by ALV.

By the way, if your default values are constant values which you want, can't you mention them in context attributes default values...

Regards

Manas Dua

Former Member
0 Kudos

Hi Manas,

Appreciate your response. I will try this. I cannot use default values in Context itself because the one value I need is Delivery Date which has to be 5 days in advance to the current date. Also, another requirement is that user can also change the Default value at Item level and press append. In that case it has to put the default value that is modified by the user. Let me know if you have some other way to work it out.

Thks & Rgds,

Hemal