‎2009 Nov 10 7:47 AM
whats the role of method CHECK_CHANGED_DATA here...why should i use it ...cant i update the table w/o using it ?
CASE ucomm.
WHEN '&UPT'.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lv_ref1.
CALL METHOD lv_ref1->check_changed_data.
REFRESH it_upt.
LOOP AT itab WHERE chk = 'X'.
IF itab-chk = 'X'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = itab-vbeln
IMPORTING
output = temp_vbeln.
it_upt-vbeln = temp_vbeln.
it_upt-netwr = itab-netwr.
APPEND it_upt .
ENDIF.
PERFORM update.
ENDLOOP.endcase
‎2009 Nov 10 8:08 AM
IN THE ABOVE PROGRAM I AM UPDATING THE TABLE VIA ALV REPORT....THE USER WILL SELECT SOME ROWS AND UPDATE IT ...
‎2009 Nov 10 8:13 AM
Hi,
What ever the data which are been modified or changed by the user all the data will be appeared in the check_change_data.
so when ever the user interacted with the screen records for action then this will be come in to picture.
‎2009 Nov 10 8:20 AM
Hi,
Whenever any data is modified in the ALV, it will be captured by the Check_changed_data. So in order to update the database table with the updated values, we need to use this.
‎2009 Nov 10 9:57 AM
Hi Raghunandan,
You should not avoid using it.
Because it says whether the data in your editable ALV Grid/List/other has been changed or not..
If you ignore it and try to update all the records in database table/internal table then it will require more memory and work processes as a result it may take long time too...
That's why it's advisable to check whether any changes happend.. if yes then only change the internal table of Database table or do further processing for those records only which have been modified.
Also you have to transfer the changes to the internal table that's why..
One more thing is to do some validation for the data which has been chagned in ALV befor updating it to Database tables or before doing any further processing...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
‎2009 Nov 10 10:36 AM