Skip to Content
0
Jan 24, 2012 at 09:04 AM

Deletion of records before display in view

59 Views

Hi Experts,

My requirement is to display the open activities on view. I have retrieved all activities for an account through 'BuilActivityRel'.

The header node is BuilHeader and item node is Activity. I need to retain only open activities and delete the rest.

Could you please let me know the process to delete the records from BOL collection.

My code is as follows:

DATA: lv_collection TYPE REF TO if_bol_bo_col,

entity TYPE REF TO cl_crm_bol_entity.

  • get collection of dependent nodes

entity ?= focus_bo.

TRY.

lv_collection = entity->get_related_entities(

iv_relation_name = 'BuilActivityRel' ).

CATCH cx_crm_genil_model_error.

  • should never happen

EXIT.

CATCH cx_sy_ref_is_initial.

ENDTRY.

me->set_collection( lv_collection ).

Regards,

Santosh