Hi JR,
If you are modifying a standard SAP Program you need to look for exits where you can write your code. I assume yours is a custom application so here in the Screen you would be having PBO and PAI Modules.
Code would look like
LOOP AT <internal table>
CHAIN.
FIELD <workarea-field1>
FIELD <workarea-field1>
*-- Validations for Duplicate
MODULE validate_dup ON CHAIN-REQUEST.
ENDCHAIN.
in PAI,
Module Validate_dup INPUT.
<Code here for checking the Duplicates and show appropriate Message>
Endmodule.
Hope this helps.
BR,
Ankit.