‎2008 Apr 12 9:26 AM
how to restrict duplicate entries to be entered in a table control...
thanx,
naveen vishal
‎2008 Apr 12 10:17 AM
hi..
after ur PAI table control loop, write another module.
in tht u can declare one temporary int table and copy the original int table to the temp table.
then sort this new internal table and delete adjacent duplicates comparing your key fields.
if sy-subrc = 0.
give some error msg.
else.
do nothing..
endif.
hope this helps...
regards,
naveen
‎2008 Apr 12 10:19 AM
Hello Naveen
You have to evaluate at PAI (i.e. after having entered possible duplicated entries) whether your itab contains duplicates or not.
You see the same behaviour with maintenance views. You can always enter duplicated entries but if you push ENTER or the SAVE button the system throws an error due to the duplicated entries.
Regards
Uwe
‎2008 Jul 04 8:14 AM
well, the solution to it is like this:
a pointer needs to move from 1st row of table control till the current row, for each table control read.
that is, reading the rows only above it, not below ones. That will throw error at appropriate place.
Thanx for msg postings..
Naveen Vishal