Skip to Content

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

Read GUID of profile set in another component

Hi,

I am trying to read GUID of one component into another. Read it like this: This is marketing scenario where we create segments. Each segment has a GUID attached to it but component SEGED_SET which is meant for segments has no such attribute.

How system is reading GUID for a segment:

wa_object-object_id = lo_entity->get_key( ).

wa_object-object_name = lo_entity->get_name( ).

CALL METHOD cl_crm_genil_container_tools=>get_key_from_object_id

EXPORTING

iv_object_name = wa_object-object_name

iv_object_id = wa_object-object_id

IMPORTING

es_key = lv_guid.

And it works.

Now we have another component SEGED_NOTE which is used by SEGED_SET. I need to read GUID of segment in this component. I put following code:

lo_entity ?= me->collection_wrapper->get_current( ).

CHECK lo_entity IS BOUND.

lo_parent ?= lo_entity->get_parent( ).

CHECK lo_entity IS BOUND.

wa_object-object_id = lo_parent->get_key( ).

wa_object-object_name = lo_parent->get_name( ).

CALL METHOD cl_crm_genil_container_tools=>get_key_from_object_id

EXPORTING

iv_object_name = wa_object-object_name

iv_object_id = wa_object-object_id

IMPORTING

es_key = lv_guid.

But issue here is that lv_guid is not filled as this method reads data from buffer and currently buffer has data only for SEGED_NOTE and not for its parent entity. Please note that object name and object id were correctly retreived.

Is there any other way to read this GUID?

Regards,

Shikha

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question