on 09-17-2014 11:47 AM
how to populate obj type of BT component throught its obj id by writing a report in se38
Hi Kiran,
For BTQuery1O the result node would be BTOrder which has crm Guid. So if u need object u need to get from Children (Get_related_entity).
Bol Relation is BTOrderHeader then u ll get BTAdminH it has ObjectType,
Eg code :
Data : ls_parameter TYPE crmt_name_value_pair,
lt_parameter TYPE crmt_name_value_pair_tab,
lr_query_service type ref to cl_crm_bol_query_service,
lr_result type ref to if_bol_entity_col,
lr_children type ref to cl_crm_bol_entity.
ls_parameter-name = 'OBJECT_ID'.
ls_parameter-value = '1105201'.
CHECK NOT ls_parameter-value IS INITIAL.
APPEND ls_parameter TO lt_parameter.
* run query / search for last interactions
lr_query_service->set_query_parameters( lt_parameter ).
lr_result ?= lr_query_service->Get_query_result ()
lr_entity ?= lr_result->get_first( ).
lr_children = lr_entity->get_related_entity('BTOrderHeader').
lv_obj_type = lr_children->get_property_as_value (Iv_attr_name = 'OBJ_TYPE')
Thanks & Regards,
Arunpandi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
I suppose the object type could not be edited through report program as it is usually a read only field and it is populated based on the selected process type while creating the transaction.
Regards,
Karthi M R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
By passing the Object ID to BTQ1Order, we can get the result in a collection.
If u can access the first entity , here u can get the Header GUID details.
Then by navigating through relations you can get the BTHeader/BTAdminH, which will contain the Object type details.
Correct me if my understanding is wrong about your requirement.
Regards,
Ravi
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.