Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Best way to copy-paste data from "Mouse selection" grid DW?

Hi, I've got a grid datawindow looking like:

Where apart from the default blue highlighted line of the current row, I have enabled "Mouse Selection" across the fields. I am trying to find the best way to move the selected data cells, if possible all the selected text, but if not, at least one line / one cell, selected with a mouse like on the screenshot, to Clipboard, so it can be copy-pasted into Excel or similar.

I'm trying to capture the data with

ls_selected_data = (this.Describe("DataWindow.Selected.Data"))

this.event ue_setclipboard(ls_selected_data)


(that event simply does Clipboard(passed parameter) )

but not matter what I try, ls_selected_data always remains an empty string, ""

I'm sure I'm missing something really simple to get that selected data, but I cannot see what exactly? For the record, all columns on the datawindow except first and last are not updateble and have a tab order set to 0, to make them inaccessible to users.

Ideally, I would like just to right-click and be able to use native "Copy" facility from the right-click pop-up window. I have already made the pop-up show option "Copy" by extending pfc_prermbmenu() with

am_dw.m_table.m_copy.enabled = true

Cheers for any insight

Not what you were looking for? View more on this topic or Ask a question