on 08-11-2008 7:53 AM
I am getting an exception:
An exception has occurred
Exception Class
CX_SY_MOVE_CAST_ERROR - Source type \CLASS=CL_CRM_BOL_ENTITY_COL is not compatible, for the purposes of assignment, with target type \CLASS=CL_CRM_BOL_ENTITY
Method:
ZL_BT108H_L_DETAIL_IMPL=>EH_ONSEL_PROSPECT
Exception point:
lv_builbcW = lr_builheader->get_related_entities( iv_relation_name = 'BuilMarketingRel').//exception point
method EH_ONSEL_PROSPECT.
CALL METHOD SUPER->EH_ONSEL_PROSPECT
EXPORTING
HTMLB_EVENT = HTMLB_EVENT
HTMLB_EVENT_EX = HTMLB_EVENT_EX
.
DATA : industry(4) type c,
query_service TYPE REF TO cl_crm_bol_dquery_service,
query_result TYPE REF TO if_bol_entity_col,
lr_builheader TYPE REF TO cl_crm_bol_entity,
lv_builbcw TYPe REF TO cl_crm_bol_entity,
lv_builbc TYPE REF TO if_bol_entity_col,
lr_partnerno TYPE string.
query_service = cl_crm_bol_dquery_service=>get_instance( 'BuilHeaderAdvancedSearch' ).
IF query_service IS BOUND.
CALL METHOD query_service->add_selection_param
EXPORTING
iv_attr_name = 'PARTNER'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lr_partnerno.
query_result = query_service->get_query_result( ).
lr_builheader = query_result->get_first( ).
endif.
CHECK lr_builheader IS BOUND.
lv_builbcW = lr_builheader->get_related_entities( iv_relation_name = 'BuilMarketingRel').//exception point
lv_builbcw ?= lv_builbc.
Can anyone please help!!
Regards
Shilpi
Hello Shilpi,
pay attention the types of your CLASS and returning INTERFACE
lv_builbcw ==> CL_CRM_BOL_ENTITY
lr_builheader->get_related_entities(..) ==> IF_BOL_ENTITY_COL
that means that you need to use casting ?=
Good Luck
Eli Steklov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.