Hi,
I managed to do it using your advice.
Below is the used code:
DATA : lr_iterator TYPE REF TO if_bol_bo_col_iterator,
lt_empty_lines TYPE TABLE OF REF TO cl_crm_bol_entity,
lv_edit TYPE string.
lv_edit = me->view_group_context->is_view_in_display_mode( me ).
IF lv_edit EQ ABAP_FALSE.
lr_iterator = me->typed_context->zbtx_ctr_appr->collection_wrapper->get_iterator( ).
lr_entity ?= lr_iterator->get_first( ).
WHILE lr_entity IS BOUND.
IF lr_entity->is_send_active( ) EQ abap_false.
APPEND lr_entity TO lt_empty_lines.
ENDIF.
lr_entity ?= lr_iterator->get_next( ).
ENDWHILE.
LOOP AT lt_empty_lines INTO lr_entity.
me->typed_context->zbtx_ctr_appr->collection_wrapper->remove( lr_entity ).
lr_entity->delete( ).
ENDLOOP.
ENDIF.
Thank you.
Have a lovely day ahead!
Best,
Elena