cancel
Showing results for 
Search instead for 
Did you mean: 

does't delete final row in alv

Former Member
0 Kudos

hi. friends..^^

i want delete row in alv.

I can delete first row and second row ... final - 1 row.(r_param->t_deleted_rows is not initial)

But...I can't delete final row.(r_param->t_deleted_rows is initial)

how to delete final row?

vesion 2004s

METHOD on_alv_delete .

  DATA : ls_row LIKE LINE OF r_param->t_deleted_rows.
  DATA : ls_lecture TYPE REF TO zlecture.
  FIELD-SYMBOLS : <fs_lecture> TYPE zlecture.

  LOOP AT r_param->t_deleted_rows INTO ls_row.
    ls_lecture ?= ls_row-r_value.
    ASSIGN ls_lecture->* TO <fs_lecture>.

    DELETE FROM zregistration WHERE lecture_num = <fs_lecture>-lecture_num
                                AND devide_num  = <fs_lecture>-devide_num.
  ENDLOOP.
ENDMETHOD.

Edited by: Ki-Joon Seo on Aug 22, 2008 12:09 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Check the cardinality of the node that you have bounded, if it is 1:n, then there will be always one default row in it, in your case change it to 0:n.

Regards,

Trikanth

Former Member
0 Kudos

thanks..you reply..but i set cardinality 0...n

both cadinality 0...n, and 1...n is not working..

Former Member
0 Kudos

Hi

Are you using the method <node_name>->Invalidate( ). to delete it's data ?

If not, try using this method in you logic to delete the data.

Regards,

Trikanth