cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete selected row from table.....?

Former Member
0 Kudos

Hi,

I have a table which contains 6 columns and 1 row initially.... when ever i click on add button one row will add dynamically and i will enter data in those columns and i will click on save to save the data into the R/3.... its working well.....

Now i want to delete selected row from my table before click on save button.....

how to delete the selected row from a table....?

please help me

Thanks & Regards

Ravi Shankar B

Accepted Solutions (1)

Accepted Solutions (1)

former_member182374
Active Contributor
0 Kudos

Hi RaviShankar B,

Since the table is usually bound to a node, you can use the following code:

int leadSelect = wdContext.node<node name>.getLeadSelection();

IPrivate<view name>.I<node name>Element myElement = (IPrivate<view name>.I<node name>Element) wdContext.node<node name>.get<node name>ElementAt(leadSelect);

wdContext.node<node name>.removeElement(myElement);

Omri

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

IF you are using Webdynpros for ABAP

create a delete button on the toolbar of the table and associate a action delete_row to it.

Use method remove_element to remove the selected row

eg: node_flight->remove_element( ELEMENT =

elem_flight ).

Read the node attributes after deleting the row and compare it with the already existing Interanl table holding the data and then remove the record from the Internal table and Populate the same values again in your table.

Regards,

Reward points if its of some help.

Ismail.