cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop Between Tables

Former Member
0 Kudos

We have 2 table and would like to drag an object from one table (cell) to another. It seems this is impossible at the moment. Dragging works if you add an icon to the first table but the DropTarget element apparently cannot be placed in a table. Why this limitation?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

A table can have both Drag Source Info and * Drag* Traget Info . Just right click on the table in edit mode to add the above said options. For Drag and drop to take take place the tag present in the Drag source info and drag target info should match.

Have a look at

Link:[Example|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b09cc9d7-5403-2d10-f6a1-8705ea280c4e?quicklink=index&overridelayout=true]

Also look at the standard component WDR_TEST_DRAG_AND_DROP.

Kindly post back if you face any issues

Regards

Karthiheyan M

Former Member
0 Kudos

Thanks for the tip. It seems the whole table can serve as a drop target but not individual cells. Is there anyway to determine which cell was dropped onto? WDEVENT has a parameter "ROW_ELEMENT" which looks promising...

saravanan_narayanan
Active Contributor
0 Kudos

Hello Marc,

there is no direct solution for this.. check the below thread and try Multipane or row repeater

[;.

BR, Saravanan

Former Member
0 Kudos

Hi ,

I guess you cannot determine which cell was dropped but you can identify the row that was dropped.

Also while creating the event for onDROP ,check transfer UI Event transfer parameters which will add more parametrs like DATA , ID ,WD_CONTEXT_EVENT ,tags ,mime type....

With these parameters you can surely get the row that was dropped.

Regards

Karthiheyan M

Former Member
0 Kudos

Yes, I can now get the row:

lo_drop ?= wdevent->get_object( 'ROW_ELEMENT' ).
IF lo_drop IS BOUND.
 lv_i = lo_drop->get_index( ).
 READ TABLE lt_lefttable INTO ls_item INDEX lv_i.
...

But the UI display is undesirable. It does not show the user the row but either above or below the row. It seems this feature is for inserting rows not for dragging and dropping...

Former Member
0 Kudos

Hi,

You can use work around like

Use Row repeater(target) instead of table and in the row repeater have an image(Like basket) as drop target info , so by now you can achieve dropping a table row into the row of row repeater.

Regards

Karthiheyan M

Former Member
0 Kudos

I see this has already been answered in the negative: