Hi Vimal,
If I understood your requirement you want to have in hands the ID saved on your latest transaction. Is not it?
Well, you can obtain the unique number using sequences and make the INSERT to database informing the KEY as you have it in hands. With this you solve the issue but it's a bit different than auto incremental logic.
Regards, Fernando Da Rós