Skip to Content

Capture external copy event in ABAP


A user selects some data in word or excel or some other non-sap application and then copies that data to the clipboard. Is there any way in ABAP to capture that event or message ?

I'm not talking about using sapevt or BP_EVENT_RAISE, I'm talking about a listener in an Abap class that will detect a windows copy event.

Thanks and regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 13, 2017 at 12:59 PM

    Hi Rich,

    Have you tried method CLIPBOARD_IMPORT of class CL_GUI_FRONTEND_SERVICES?

    Although you will need to parse data in desired format.


    Gaurav Chaudhary

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Gaurav,

      Thanks for the reply

      Yes, I use that method when I am actually processing a 'paste' request. The problem is not importing data into SAP from the clipboard but telling whether there is any data there in the first place. (See my reply to Raymonds answer below).


  • Jun 13, 2017 at 01:26 PM

    Using CL_GUI_TIMER to periodically try some CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_IMPORT would not be very satisfactory...
    So you could look for a copy of "SAP GUI Scripting API for the Windows and Java Platforms" to implement an Event Listener?

    Add comment
    10|10000 characters needed characters exceeded

    • Morning Raymond!

      Your example exactly shows the problem. Whilst it may not be a PAI as such it still screws the screen up. I'll continue digging for a little while and If I find something I'll add it to this thread.

      Thanks for your help and suggestions though!