Application Development and Automation 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: 
Read only

DATA_CHANGED Event - How Can I get SENDER Objects?

former_member282589
Participant
0 Likes
1,384

Hello.

Currently I'm building a code which makes changing ALV data(to be extended - base itab) without ENTER or clicking other line, so When I click the 'SAVE' button(for example), It uses the 'changed alv data', not 'original data, which are hidden by changed data'.

The problem is, I use data_changed event to other alv - so I have to divide each event, by SENDER objects.

When I do some reseach - data_changed objects doesn't support SENDER.



In short - How can I recognize which objects call data_changed event without SENDER?

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
1,078

What? The SENDER parameter is valid for any instance event, so it works for the event data_changed. Defining the method handler:

METHODS on_data_changed 
FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING sender. " <==== indicate SENDER here

Hello.

Currently I'm building a code which makes changing ALV data(to be extended - base itab) without ENTER or clicking other line, so When I click the 'SAVE' button(for example), It uses the 'changed alv data', not 'original data, which are hidden by changed data'.

The problem is, I use data_changed event to other alv - so I have to divide each event, by SENDER objects.

When I do some reseach - data_changed objects doesn't support SENDER.



In short - How can I recognize which objects call data_changed event without SENDER?

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
1,079

What? The SENDER parameter is valid for any instance event, so it works for the event data_changed. Defining the method handler:

METHODS on_data_changed 
FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING sender. " <==== indicate SENDER here
Read only

1,078

What? I didn't know it's valid for any instance. Thanks for notice.