on 09-16-2011 7:39 AM
Hi Experts,
I am getting a Guid of an object in my function module. Now i need to get the entity with that guid.
I have the object type of the guid.
I am using the method get_entity of cl_crm_bol_core.
TRY.
lr_core = cl_crm_bol_core=>get_instance( ).
lr_evhist = lr_core->get_entity( iv_object_name = 'BT230_SLSC'
iv_object_id = lv_genil_object_id ) .
CATCH cx_crm_unsupported_object .
ENDTRY.
My problem is that the guid I have, is of type CRMT_OBJECT_GUID. But this method accepts of type crmt_genil_object_guid.
Now how do I convert it.
Please help.
Thanks.
Hi,
Instead use simple query object and pass the guid as search parameter to read the entity as below.
* Create a query service
DATA: lv_query TYPE REF TO cl_crm_bol_query_service.
lv_query = cl_crm_bol_query_service=>get_instance(
u2018UIFSearchConnectionu2019 ).
* Set a search criterion
lv_query->set_property( iv_attr_name = u2018CARRIDu2019
iv_value = u2018AAu2019 ).
* Execute query and receive result
DATA: lv_result TYPE REF TO if_bol_entity_col.
lv_result = lv_query->get_query_result( ).
Thanks,
Rajini A.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
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.