‎2009 Nov 05 6:31 AM
i created ztable ..for inserting data into that table i used module pool programming....my requirement is to avoid the same data inserted... i got error message whevever i insert same data in table...what i do for this problem
‎2009 Nov 05 6:40 AM
Hi,
You need to put a validation on the Save event and check whether a record already exists with the same Primary Key. You can throw your own error message to the user in such case.
Hope this helps.
Regards,
Himanshu
‎2009 Nov 05 6:41 AM
set Primary key in you table.
check whether that entry already exists in the table before insertion.
Its Better you can go for table maintenance.
‎2009 Nov 05 6:58 AM
Hi Dhanu,
What i understand from the issue, you need to mark one field as a Mandatory field and that should be your primary key.
When user enters the same entry, it will sort with the Primary key and if it already exist it will display an error message saying that 'Entry already exist'
Ex : If table-mandatory = S_mand (Where user enters the value)
message 'Entry already exist
endif.
Please refer to the link below :
Hope the information is helpful.
Regards,
Kittu'
‎2009 Nov 05 9:58 AM
Duplicate deleted. Please avoid posting the same entry in the forums.
‎2009 Nov 05 10:08 AM
Hi Dhanu,
Use DELETE ADJACENT DUPLICATES FROM TABLEbefore going to the ZTABLE (That is you delete the internal table itself.)
Please Try this.
Regards,
K.Karthikeyan.
‎2009 Nov 05 10:51 AM
Hi,
When you use 'Modify' stmt instead of 'Insert' stmt, an entry with existing key will update the existing entry and an entry with new key will be inserted i.e. you will not get the error for the same entry.
‎2009 Nov 05 12:22 PM
Hi,
check the following points
1) check whether your table has primary key or not
2) put validation before inserting new record and use insert command do not use modify command
Thanks & Regards,
Sateesh.
‎2009 Nov 05 12:34 PM
Hi Dhanu,
Just get the data from ur ztable into internal table itab and compare it with ur internla table jtab..
delete the records from jtab which exist in the itab.
then insert ztable from table itab .
thnx
RK
‎2009 Nov 05 1:08 PM
Use addition ACCEPTING DUPLICATE KEYS with an INSERT statement.
Hope this will be helpful.