cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting a row from a Row Repeater

shafiqahmed_khan
Explorer
0 Kudos

Hi All,

How could i delete a row from a row repeater??????

I am using REMOVE_ELEMENT method from IF_WD_CONTEXT_NODE interface... Is this the correct way!!!!!!.

Is there anyother way to do the same?????

Best Regards.

Shafiq Ahmed Khan.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

first u get the index from the context element. with the help of the index u can get that particular element using get element.

then u remove the element .

check this code.

CALL METHOD context_element->get_index

receiving

my_index = lv_index.

CALL METHOD lo_nd_rcf_edu_det->get_element

EXPORTING

index = lv_index

receiving

node_element = lo_el_rcf_edu_det .

CALL METHOD lo_nd_rcf_edu_det->remove_element

EXPORTING

element = lo_el_rcf_edu_det

  • receiving

  • has_been_removed =

.

Declare a parameter context_element in the method of type if_wd_context_element

regards

chythanya

Former Member
0 Kudos

Hi,

REMOVE_ELEMENT of IF_WD_CONTEXT_NODE is for context elements. This will not work for ROW_REPEATER.

You will first have to get the reference to the current view using the GET_ELEMENT method of IF_WD_VIEW, with the element name as the input to the method. (The view element is available in the WDDOMODIFYVIEW method - You should also be able to get it from the WINDOW object reference). Assign the object returned by GET_ELEMENT to an object of type CL_WD_ROW_REPEATER.

Now, use the method REMOVE_ROW_ELEMENT of the class CL_WD_ROW_REPEATER.

This should solve your problem.

Regards,

Wenonah