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

Capture modified Internal table in Editable ALV

Former Member
0 Likes
1,014

Hi.,

I created an Editable ALV using set_table_for_first_display method. I have a button SAVE., When I change the contents in ALV and press SAVE, I want to display the changed contents.

But When I change the contents in ALV & click the SAVE button, my internal table has the old contens.!! Plese help me how to get the modified contents.

Thanks,

Regards,

Ram

1 ACCEPTED SOLUTION
Read only

Kiran_Valluru
Active Contributor
0 Likes
483

Hi.,

take one more internal table itab_old ., before calling set_table_for_first_display method ,

itab_old[] = itab[].

now when you press save button,

In PAI.,

when 'SAVE'

CALL METHOD o_grid->check_changed_data. " here o_grid is reference to cl_gui_alv_grid

" after this method then internal contains the modified values

IF itab[]  NE  itab_old[].
     
     * do your processing here.,
   
   endif.

hope this helps u.,

Thanks & Regards,

Kiran

Hi.,

take one more internal table itab_old ., before calling set_table_for_first_display method ,

itab_old[] = itab[].

now when you press save button,

In PAI.,

when 'SAVE'

CALL METHOD o_grid->check_changed_data. " here o_grid is reference to cl_gui_alv_grid

" after this method then internal contains the modified values

IF itab[]  NE  itab_old[].
     
     * do your processing here.,
   
   endif.

hope this helps u.,

Thanks & Regards,

Kiran

2 REPLIES 2
Read only

Kiran_Valluru
Active Contributor
0 Likes
484

Hi.,

take one more internal table itab_old ., before calling set_table_for_first_display method ,

itab_old[] = itab[].

now when you press save button,

In PAI.,

when 'SAVE'

CALL METHOD o_grid->check_changed_data. " here o_grid is reference to cl_gui_alv_grid

" after this method then internal contains the modified values

IF itab[]  NE  itab_old[].
     
     * do your processing here.,
   
   endif.

hope this helps u.,

Thanks & Regards,

Kiran

Read only

0 Likes
483

Hi.,

Thanks. This solved my issue.. Thanks for your quick response.,

Thanks,

Regards,

Ram