cancel
Showing results for 
Search instead for 
Did you mean: 

ALV and component Controller Context.

Former Member
0 Kudos

Good morning experts,

i use an alv to display a context from the component controller. The ALV is editable.

My problem now is that changes to the ALV never reach the node.

Where are my changes and what must i do to write them to the node.

Thank you and best regards

René

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Rene,

You need to create an event handler method (say for example CHECK_DATA_CHANGE) for the event ON_DATA_CHECK of the ALV.

You would have to first call the DATA_CHECK method of the ALV component. This method checks if any data has changed in the ALV and then triggers the ON_DATA_CHECK event if it finds that something has changed in the ALV. Create an eventhandler method for the ON_DATA_CHECK method and within this method write the code for modifying the context attributes to reflect the new ALV data.

Call this DATA_CHECK method from WDDOAFTERACTION so that whenever any action is performed the system would check if any data has changed in the ALV & then eventually execute your eventhandler method resulting in the context node getting updated. Hope that this is clear for you now.

method WDDOAFTERACTION .
  DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
  lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
 
  lo_interfacecontroller->data_check( ).
endmethod.

Regards,

Uday

Former Member
0 Kudos

hi Uday,

got it now, thank you. I forgot to register the event ;).

Thanks a lot.

Have a nice day

René

Answers (2)

Answers (2)

uday_gubbala2
Active Contributor
0 Kudos

Hi Rene,

As how suggested by Pranav any changes that you make to the ALV don't get propagated to the context. You can use the DATA_CHECK method to check for any change in the data & then create an event handler for the ON_DATA_CHECK event. Now within the event handler method you can get the modified data from the ALV & reflect the same on to the context.

Regards,

Uday

pranav_nagpal2
Contributor
0 Kudos

Hi,

you have to again bind your node with data in order to reflect changes in node..

regards

Pranav