on 01-15-2010 3:17 AM
HI All,
My requirement is that " user should be able to drag and drop one row position to another row position( example: if the user select row 2 and drag and drop it to row5 then the row 2 should move to the row 5 ).
Can anybody knows how to achieve this functionality in WD application
Thanks & Regards,
Ruchi Tiwari
not resolved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
yes .. just set the contents of the ALV table row at index5 with contents at index2 .
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In NetWeaver 7.01, you can do create this functionality with the standard table UI element. The table become both the onDrop target and the drag source. In the onDrop event you just change the position of the context element. If you need some code samples, I can post them.
However this doesn't work on 7.01 for the ALV. The necessary drag and drop events of the underlying table aren't exposed yet. These events and the drag and drop functionality will be added to the ALV in NetWeaver 7.02.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First add both the dragsourceinfo and droptarget info to the table UI element make sure their tags are compatible. Implement the onDrop event of the table. In the onDrop you can place the following code (adjusting for your context names):
data lo_nd_ds_field_catalog type ref to if_wd_context_node.
lo_nd_ds_field_catalog = wd_context->get_child_node( name = wd_this->wdctx_ds_field_catalog ).
data temp type i.
temp = row_element->get_index( ).
lo_nd_ds_field_catalog->move_element(
exporting
from = lo_nd_ds_field_catalog->get_element( )->get_index( )
to = row_element->get_index( ) ).
hi ,
refer Thomas quote in the thread :
on NetWeaver 7.0 Enhancement Package 1. On this release we have a DragSourceInfo UI element:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/e0a9f17e483c84e10000000a42189c/frameset.htm
and a DropTargetInfo UI element:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/e0aa477e483c84e10000000a42189c/frameset.htm
We also have the DropTarget UI element:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e4/a9f9a9b52742d3b0c43b6c671b8f60/frameset.htm
and an onDrop event built into several of the standard UI elements. These new events and new UI elements make Drag and Drop possible. For an overview on Drag and Drop in WDA, read this link:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a5/bf47414eca430794189fbb5919cc2f/frameset.htm
refer the standard WD component WDR_TEST_DRAG_AND_DROP .
regards,
amit
Edited by: amit saini on Jan 15, 2010 5:13 AM
Hi Amit & Thomas,
I am using ECC 6.0 with enhancement package 4 ......but i am not able to see these drag and drop controls in the layout of view.....also when i tried finding class CL_WD_DRAG_SOURCE_INFO it also does not exist ........is it a problem of some missing patch or something else?. Can i be able to drag drop row in a table with this version.
Looking for ur valuble inputs.
Thanks & Regards,
Ruchi Tiwari
Edited by: Ruchi Tiwari on Jan 15, 2010 11:37 AM
If you are actually on ECC 6 EnhP4 (which runs on top of NetWeaver 7.01) then you should have drag and drop. There is only one UI element in the layout toolset related to drag and drop and that is the drop target UI element. You don't need that however for the table row drag and drop. Everything is done in the standard table UI element. You should have a standard event onDrop in the table UI element. You also should be about to right mouse click on the table UI element in the UI element hierachy tree and choose Insert Drag Source and Insert Drop Target. Input the same value in the tags property of the DragSourceInfo and the DropTargetInfo.
If you don't have the onDrop event or the option to insert the Drag Source/Drop Target - then I have to questoin if your system really is ECC 6 EnhP4.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.