Hi Hema,
I want to ask the requirement. Do you really want to insert that record into the table which should not be inserted? If yes, you are doing it right by using modify.
Through modify, the data can be inserted making the database inconsistent.
Regards
Purnand