Hi Kavitha,
Write the Data update logic inside the Table_Control Loop,
But write the Data Saving Logic Inside the USER_COMMAND module
based on the SY-UCOMM value.
Or you can do the same inside the Table_control Loop, just pass the SY-UCOMM value condition as data save.
regards.
Praveer.