Hi VK ,
I have used below code to add entities in collection from iterator but i think same thing as you done and it is working fine for us.Try to call add method once with interface.
data lr_bo_coll | TYPE REF TO cl_crm_bol_bo_col, |
lv_entity | TYPE REF TO if_bol_bo_property_access. |
CREATE OBJECT lr_bo_coll.
IF lr_col_iterator IS BOUND.
CALL METHOD lr_col_iterator->get_first | |
RECEIVING | |
rv_result = lv_entity. | |
. | |
WHILE lv_entity IS BOUND. | |
CALL METHOD lr_bo_coll->if_bol_bo_col~add | |
EXPORTING | |
iv_entity = lv_entity. | |
CALL METHOD lr_col_iterator->get_next | |
RECEIVING | |
rv_result = lv_entity. | |
ENDWHILE. |
ENDIF.
me->typed_context->zprclayout->collection_wrapper->set_collection( lr_bo_coll ).
Regards Harish Kumar