Code to set Core to a particular component. This works if u r writing a stand-alone program or function. If this is not written, then you may not get relations loaded and get issues. You need to put right component set name (in place of 'IUICALL') in below code
DATA: lr_core TYPE REF TO cl_crm_bol_core.
lr_core = cl_crm_bol_core=>get_instance( ).
CHECK lr_core IS BOUND.
TRY.
lr_core->load_component_set( iv_component_set_name = 'IUICALL' ).
CATCH cx_crm_genil_general_error .
ENDTRY.