Hi Nitish,
Try below code instead of your code,
Data:
lt_empty_lines TYPE TABLE OF REF TO cl_crm_bol_entity,
lr_entity TYPE REF TO cl_crm_bol_entity.
After getting collection from BTadmini use the below code.
lr_iterator ?= lr_coll->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.
typed_context->btadmini->collection_wrapper->remove( lr_entity ).
lr_entity->delete( ).
ENDLOOP.
Best Regards,
Dharmakasi.