Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Copy/Paste in I/O field of Dialog Programming

PK29
Advisor
Advisor
0 Kudos
1,020

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.

11 REPLIES 11

former_member519516
Participant
297

I think in SAP there is no such functional

former_member16553
Active Participant
0 Kudos
297

Why can't you simply make the field as non-editable?

Regards,

Girdhari

PK29
Advisor
Advisor
0 Kudos
297

girdhari.mondal - Requirement is to enter the input in the field but that input should not be copied from somewhere

0 Kudos
297

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.

0 Kudos
297

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

FredericGirod
Active Contributor
297

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

0 Kudos
297

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

former_member1716
Active Contributor
0 Kudos
297

pratham89,

No, You dont have that provision.

Sandra_Rossi
Active Contributor
0 Kudos
297

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.

Sandra_Rossi
Active Contributor
0 Kudos
297

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).

michael_piesche
Active Contributor
297

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.