cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and drop function in web dynpro

Former Member
0 Kudos

Hi Experts,

I have an ALV table.

I want to drag the row from a standard table to the ALV table.

I can drag the row but I can't drop the row in ALV table

The following code is written in method WDDOINIT in the view.

Code

Data lo_cmp_usage type ref to if_wd_component_usage.

   lo_cmp_usage =   WD_THIS->wd_cpuse_ALV_TABLE( ).

   if lo_cmp_usage->has_active_component( ) is initial.

     lo_cmp_usage->create_component( ).

   endif.

   DATA:

    lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,

    l_value TYPE REF TO cl_salv_wd_config_table,

    lr_table_settings TYPE REF TO if_salv_wd_table_settings,

    lr_input_field type ref to cl_salv_wd_uie_input_field,

    value TYPE REF TO IF_SALV_WD_DROP_TARGET_INFO.

   DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

   lo_INTERFACECONTROLLER = wd_this->wd_cpifc_alv_table( ).

   l_value = lo_interfacecontroller->get_model( ).

   CALL METHOD l_value->IF_SALV_WD_DRAG_AND_DROP~CREATE_DROP_ROW_TARGET_INFO

     EXPORTING

       id      = 'ALV_TABLE'

       name    = 'from'

       enabled = abap_true

       tags    = 'from'.

   l_value->if_salv_wd_drag_and_drop~set_drop_row_name( 'from').

   l_value->IF_SALV_WD_DRAG_AND_DROP~SET_DROP_ROW_NAME_FIELDNAME( 'fight_no').

I have created an event handler method for the drop but the method never gets called

(the event handler on click also have same problem) .

Pls help whats missing?

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi ,

Can u confirm while you attempt to drop a row , What is the icon you get with the cursor ? ( Is it a red icon ?)

Drag and drop works with tag source/target . With which we can control what data can be dropped into the target .

So that , we specify both at source and at target ,similar tag values . Only after matching the tag the event for drop raises.

Regards,

Karthiheyan M


Former Member
0 Kudos

This is my setting of drag source and the tag is same as the drop target's one.

When I try to drag, some cells doesn't show and symbol or icon, just the same curser,

while some cells will show the 'red stop' icon as below.

Former Member
0 Kudos


Hi ,

So it is clear that the drop target is not accepting.

In the link https://scn.sap.com/thread/1619267  Thomas stated that " Drag and Drop with ALV is not possible until NetWeaver 7.02.  If you are on NetWeaver 7.01 you can do drag and drop with the regular table UI element, but not with the ALV. "

I assume you were in 7.02 or higher ,

Check the below links

http://scn.sap.com/thread/1580661

https://scn.sap.com/thread/1619267

Component : WDR_TEST_DRAG_AND_DROP

Regards,

Karthi M

Former Member
0 Kudos

I believe that Im in 7.02 or higher,

enclosed is the screenshor of the component version

former_member184578
Active Contributor
0 Kudos

Hi,

In method CREATE_DROP_ROW_TARGET_INFO, are the name and tags in small ? 'from' or 'FROM'

Also use the following methods:

l_value->if_salv_wd_drag_and_drop~set_drop_row_name( 'FROM' ).

l_value->if_salv_wd_drag_and_drop~set_drop_row_name_fieldname( ' ' ).

Hope this helps u,

Regards,

Kiran

Former Member
0 Kudos

Hi,

What is the Configuration your using currently.

There is no drag and drop functionality in Web Dynpro before NetWeaver 7.0 Enhancement Package 1.  In order to have that functionality on your ERP system you would need to be at ERP 6.0 Enhancement Package 4.

former_member222068
Active Participant
0 Kudos

Hi,

We don't this functionality in Web Dynpro ABAP. Drag and drop functionality of UI elements from tools kit to Layout or changing of columns in the layout is available.

But not between two different UI elements

Thanks & Regards,

Sankar Gelivi