Hi Kabil,
Dont use both Insert and Modify statement for updating. Either use Insert statement or Modify statement.
Use Commit statement after updating the Z-table 'ZSEMI'. Then system updates the particular record in Ztable.
COMMIT WORK.
Kindly make sure the following fields are not changed in ZSEMI, these fields are key fields.
- FGDES
- DOCNUM
In order to do modify the key field, it is required to delete the existing record in Ztable 'ZSEMI', and Insert a new record in the Ztable 'ZSEMI'.
Note:
Don't update the Z-table inside loop statement using Work Area. It leads performance issues. Store those values in Internal table and after loop statement, update the Ztable using Internal Table instead of Work Area as shown below.
MODIFY ZSEMI FROM TABLE IT_SEMI.
If you are facing any more problem, please paste the debugging screenshot. It will be useful for us to understand and can give the suggestion.
Thanks for understanding.
Regards
Rajkumar Narasimman.