Application Development 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: 

Check If The Next Field Duplicate

musapmb
Explorer
0 Kudos
345

Hi everyone

Please assist how to write the code to check if the information already exists in the table.

example: if I repeat (Material field) the program has to throw the error indicating that this has already been captured

Thanks

1 REPLY 1

ThorstenHoefer
Active Contributor
313

Hi,

to be sure to have unique keys in your records,
why not using a hashtable with uniq key?

insert wa into lth_table ..

sy-subrc is <> 0 when the record already exists with the same key