cancel
Showing results for 
Search instead for 
Did you mean: 

Delete row from a table and update sequence number

Former Member
0 Kudos

Hi Experts,

I am displaying data in a table in below format

field1 field2

Sequenceno Text

1. ABC

2. BCD

3. EFG

As per my requirment it needs a delete row functionality

that when i select a row and press delete that row should be deleted and sequence no. should be updated.

How this can be done?

any inputs please suggest

Accepted Solutions (0)

Answers (2)

Answers (2)

gill367
Active Contributor
0 Kudos

After deleting the row, update the node data by refilling the sequence attribute

here is the sample code.

data nd type ref to if_wd_context_node.
DATA EL TYPE REF TO IF_WD_CONTEXT_ELEMENT.
nd = wd_context->get_child_node( '<node name >' ).
data size type i.
size = ND->GET_ELEMENT_COUNT( ).
DO SIZE TIMES.
  EL = ND->GET_ELEMENT( INDEX = SY-index ).
  EL->SET_ATTRIBUTE(
  NAME = '<attribute name>'
VALUE = SY-INDEX
   ).

Former Member
0 Kudos

Thanks Sarbjeet

Former Member
0 Kudos

Hi Bhanu ,

Please use the method lead select for the table.

It will work for you.

Regards

Kuldeep

Former Member
0 Kudos

But how will the sequence get updated?