Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

ADD_COLLECTION throws CX_BOL_EXCEPTION

$
0
0

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


Viewing all articles
Browse latest Browse all 4552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>