cancel
Showing results for 
Search instead for 
Did you mean: 

Copy to windows clipboard

former_member211591
Contributor
0 Kudos

Hello all,

is there any possibility to copy a fields value to the operating system clipboard?

I want to create a button to "simulate" ctrlc, for instance to copy the value of a FormattedTextEdit to an external program (e.g. microsoft wordpad). I don't need ctrlv. Just "copy to clipboard".

Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi,

I don't know whether there is a WD4A-propriatary function for this, but in plain abap you can use either

Class CL_GUI_FRONTEND_SERVICES Method CLIPBOARD_IMPORT

or Function Module CLPB_EXPORT (obsolete).

Implementing respective coding in the action handler of your button should do the trick.

regards, Lukas

former_member211591
Contributor
0 Kudos

Thanks for your reply.

I'll try it.

saravanan_narayanan
Active Contributor
0 Kudos

Hello,

As per this thread, clipboard copy is not possible in web browser based webdynpro application.. Please check it out

BR, Saravanan

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Hi,

>

> I don't know whether there is a WD4A-propriatary function for this, but in plain abap you can use either

>

> Class CL_GUI_FRONTEND_SERVICES Method CLIPBOARD_IMPORT

> or Function Module CLPB_EXPORT (obsolete).

>

> Implementing respective coding in the action handler of your button should do the trick.

>

> regards, Lukas

Don't bother trying either of these approaches. They utilize the SAPGUI for frontend access and will only produce a short dump in WDA.

From within the browser, applications can't just directly access the clipboard. It takes special controls or JavaScript to do so; neither of which are currently available in the Web Dynpro framework.

Answers (0)