Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Retreive values in relation

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

Tags:
Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question