cancel
Showing results for 
Search instead for 
Did you mean: 

Retreive values in relation

Former Member
0 Kudos

Hi

I have retreived two value into the relation through get_related_entities. I have to check the value of the activities listed in the relation. I am able to do so for the first entry through 'get_property_as_value'. but i am not able to get the value for the next entry. there is a method to be called like get_first( ) that could help in looping. Please help me in finding that.

Thanks and Regards,

Radhika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Radhika,

Try doing this way :

DATA: lv_collection TYPE REF TO if_bol_bo_col,

lr_entity TYPE REF TO cl_crm_bol_entity.

lv_collection = entity->get_related_entities(

iv_relation_name = '{Relation Name}' ).

lr_entity ?= lv_collection->get_first( ).

" I think you have already done this

WHILE lr_entity IS BOUND.

" Put your logic of getting the value here

lr_entity ?= lv_collection->get_next( ).

ENDWHILE.

Hope this helps.

Regards,

Vinay

Answers (0)