Hello All,
I am facing with a problem while I am trying to add an entity to the collection.
As you in the following code. I have been trying to add the records from the ZZTABLE to the entity list.
Any help would be appreciated.
data lr_col type ref to if_bol_bo_col.
data: ls_data type ref to data.
data: lr_ent type ref to cl_bsp_wd_value_node.
select * from ZZTABLE
into table it_ZZTABLE
where parent_id eq gv_guid.
create object lr_col type cl_crm_bol_bo_col.
create data ls_data type ZZTABLE.
create object lr_ent
exporting
iv_data_ref = ls_data.
loop at it_ZZTABLEinto lv_ZZTABLE.
lr_ent->set_properties( lv_ZZTABLE).
lr_col->add( lr_ent ).
endloop.
me->typed_context->ZZCONTEXTNODE->collection_wrapper->clear( ).
try .
I got the error in this code block.
me->typed_context->ZZCONTEXTNODE->collection_wrapper->IF_BOL_BO_COL~ADD_COLLECTION( lr_col ).
catch cx_root.
endtry.
Regards,
Merve