2020 Feb 14 6:32 AM
Hi Experts
I want to disable Copy/Paste in I/O field of Dialog Programming as customer want to restrict their employees to write the product number in Dialog screen manually. Is there any settings provided by SAP to restrict the Ctrl+C and Ctrl+V functionality.
Thanks in advance.
2020 Feb 14 6:46 AM
2020 Feb 14 7:03 AM
Why can't you simply make the field as non-editable?
Regards,
Girdhari
2020 Feb 14 7:05 AM
girdhari.mondal - Requirement is to enter the input in the field but that input should not be copied from somewhere
2020 Feb 14 7:13 AM
I don't think there is any such kind of functionality available in Dialog programming. However please check if you can disable copy-paste trough GUI settings.
2020 Feb 14 12:34 PM
Yes we have the option to restrict copy-paste using GUI settings but in that case it would restrict copy paste for every I/O field in GUI but I want that it should restrict only specific field
2020 Feb 14 7:25 AM
The only possibility is to set the field invisible. (like the password in the login screen)
or to change the attribute of the field after the user validate it :
Visible -> When click on Enter --> Invisible
2020 Feb 14 8:33 AM
Ok if I go with your approach then how will I distinguish between manually input Matnr and Copied Matnr? Do we have any class provide by SAP
2020 Feb 14 8:32 AM
2020 Feb 14 9:12 AM
The only solution I can think of is to embed an HTML control with an INPUT field and disable paste HTML (search in the web).
I was hoping that the GUI control CL_GUI_INPUT_FIELD could have this option, but NO.
2020 Feb 14 3:17 PM
I am really interested to know why copy/paste should be prevented, and that the user should type the code manually. Usually, copy/paste is preferred to avoid typing errors (or propose the list of possible values if the values are limited).
2020 Feb 14 7:02 PM
If you answer WHY the business desperately needs to have copy&paste not allowed, the community might be able to solve THAT problem with a different solution.