Experts,
I am inserting multiple records into database as below,
INSERT DFKKOP FROM TABLE IT_DFKKOP.
Requirement is to capture SY-SUBRC for each record & display it to user(Note: If insert fails, then user wants to take action manually for the same)
One option, that I can think of is to insert 1 record at a time in Loop as below,
Loop at IT_DFKKOP into WA_DFKKOP.
Insert DFKKOP from WA_DFKKOP.
if sy-subrc ne 0.
----> " ls_errorinfo-message = 'Insertion Failed'.
append ls_errorinfo to lt_errorinfo.
else.
----> " ls_errorinfo-message = 'Inserted Successfully'.
append ls_errorinfo to lt_errorinfo.
endif.
Endloop.
Kindly guide me if there is a better efficient option that the above.
Regards,
Aspire