Skip to Content
0
Former Member
May 20, 2010 at 07:38 AM

Data in collection is overwritten

39 Views

Hi,

I am creating a collection in 'ON_NEW_FOCUS' of a context node. This node has a custom BOL as base entity.

DATA: lo_tabline TYPE REF TO zcrmkst_tg_chlog ,

lo_valuenode TYPE REF TO cl_bsp_wd_value_node.

DATA: lr_chlog_col TYPE REF TO if_bol_bo_col.

CREATE OBJECT lr_chlog_col

TYPE

cl_crm_bol_entity_col.

*Create the tabline structure taking the custom fields in consideration

CREATE DATA lo_tabline.

*use the custom structure to build the value node based on the new

*fields we adding

CREATE OBJECT lo_valuenode

EXPORTING

iv_data_ref = lo_tabline.

*****************Read data in structure ls_log_disp in between*************

lo_valuenode->set_properties( ls_log_disp ).

lr_chlog_col->add( iv_entity = lo_valuenode

iv_set_focus = abap_true ).

Here I am facing an issue that entries in lr_chlog_col are overwritten by last read entry all the time. Is it because lo_valuenode is declared as type value node? Structure ZCRMKST_TG_CHLOG is the structure of custom BOL.

Please suggest.