Hi Suresh,
Write your code in DO_PREPARE_OUTPUT or DO_INIT_CONTEXT.
eg. Try this code
method DO_INIT_CONTEXT.
CALL METHOD SUPER->DO_INIT_CONTEXT.
data : lr_entity type ref to CL_CRM_BOL_ENTITY.
lr_entity ?= me->typed_context->context_node->collection_wrapper->get_current( ).
IF lr_entity is bound.
call method lr_entity->SET_PROPERTY
exporting
IV_ATTR_NAME = ‘ATTR_NAME’
IV_VALUE = ‘VALUE’.
ENDIF.
endmethod.
GET_ATTR_NAME method
DATA: current TYPE REF TO if_bol_bo_property_access.
DATA: dref TYPE REF TO data.
if iterator is bound.
current = iterator->get_current( ).
else.
current = collection_wrapper->get_current( ).
endif.
IF current is bound.
Value = ‘N’.
ENDIF.
endmethod.