2016 Apr 20 1:15 PM
Hi Friends,
I having a two columns(ID and Description) in a table.
ID is a field.
My requirement is that if we enter a text in the description then ID should populate with auto generated number. I have written the code in PAI if sy-comm ='SAVE'. Before saving, If i press enter then I am getting the "An entry already exists with the same key".
system takes, first column of key filed is taking as blank. second column of key filed is taking as blank and consider both the KEY field values are same display the message. How to rectify it.
Thanks with Regards,
Vallamuthu M.
.
Hi Friends,
I having a two columns(ID and Description) in a table.
ID is a field.
My requirement is that if we enter a text in the description then ID should populate with auto generated number. I have written the code in PAI if sy-comm ='SAVE'. Before saving, If i press enter then I am getting the "An entry already exists with the same key".
system takes, first column of key filed is taking as blank. second column of key filed is taking as blank and consider both the KEY field values are same display the message. How to rectify it.
Thanks with Regards,
Vallamuthu M.
.
2016 Apr 20 1:42 PM
--- ID should populate with auto generated number ----
Where is this logic coded?
Thanks,
Juwin
2016 Apr 20 8:55 PM
Please give more information about the context. But I see message SV000 in your screen capture, so it's probably about a table maintenance dialog (TMD)! Did you directly modify the PAI? That's a bad practice. You should first use the TMD events (user exits). Event 21 can be used to fill values before the unicity check is done.