Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

code to display error msg if duplicate entry

Former Member
0 Likes
964

I have an upload program to upload csv file to itab, and i need a sample code for the employee id to give me an error message if a duplicate employee id is found during execution.

3 REPLIES 3
Read only

Former Member
0 Likes
675

rather than this it is better to delete the duplicate entries after data coming to the internal table .......

Read only

Former Member
0 Likes
675

DELETE ADJACENT DUPLICATES FROM itab COMPARING <yourempid>.

if sy-subrc = 0.

message.

endif.

Read only

Former Member
0 Likes
675

After Upload you can delete the Duplicates comparing the employee Id.

It Will be Possible only when you use OLE and read the file records line by Line. I am not sure of the error Handling with OLE control. It may lead to some performance issues..