Arun & Ramesh,
Thanks a lot for your replies. As per all your suggestions, I have replaced insert with MODIFY statement. My code looks as below,
Loop at IT_DFKKOP assigning <FS_DFKKOP>.
WA_DFKKOP = <FS_DFKKOP>. " Work area to store old record
<FS_DFKKOP>-XXX = 'New Value'....
Modify DFKKOP from <FS_DFKKOP>.
IF SY-SUBRC EQ 0.
Ls_errorinfo-message = 'Update successful'.
append ls_errorinfo to lt_errorinfo.
Delete DFKKOP from WA_DFKKOP. " Delete Old record as modify statement in my case inserts a new record because I am changing the key field in DFKKOP
else.
Ls_errorinfo-message = 'Update Failed'.
append ls_errorinfo to lt_errorinfo.
endif.
Endloop.
Thanks,
Aspire