title: How to Modify the data inside database table for existing record in ABAP?
body: <p>I have created database table ZSP_EMP_DET inside which I am performing CRUD operations by providing values through screen .</p>
  <p>So I have tried to find if record is already present in table or not and if found update values through screen but values are not getting modified inside DB table.</p>
  <pre><code>    DATA zsp_emp_det TYPE zsp_emp_det.
      DATA gwa_emp type table of zsp_emp_det.
  
      gwa_emp-empid = zsp_emp_det-empid.     &quot;it is a name given to input fields on screen
  
      SELECT * from ZSP_EMP_DET
          where empid = gwa_emp-empid.
  
      IF sy-subrc = 0.
          gwa_emp-fname = zsp_emp_det-fname.
          gwa_emp-lname = zsp_emp_det-lname.
          gwa_emp-loc = zsp_emp_det-loc.
          gwa_emp-designation = zsp_emp_det-designation.
          gwa_emp-bdate = zsp_emp_det-bdate.
          gwa_emp-doj = zsp_emp_det-doj.
      
          MODIFY zsp_emp_det FROM gwa_emp.
      
      
          MESSAGE 'Data Modified Successfully' TYPE 'S'.
      
      ELSE.
          MESSAGE 'Data is not Modified' TYPE 'E'.
      ENDIF.
  </code></pre>