cancel
Showing results for 
Search instead for 
Did you mean: 

how to read value of attributes of different components

Former Member
0 Kudos
458

HI,

I want to read the value of street in account page (ui component-bp_addr) in eh_onsave (ui component-bp_head).

how to read the value of attribute in different componet.

suggest me.

Thanks,

Brahmaji

View Entire Topic
former_member192716
Contributor
0 Kudos

Hi,


Data: lr_ent type ref to cl_crm_bol_entity,
         lr_col type ref to if_bol_entity_col.

lr_ent ?= me->typed_context->buil_header->collection_wrapper->get_current( ).

lr_col = lr_ent->get_related_entities( iv_relation_name = 'BuilAddress' ).

lr_ent ?= lr_col->get_first(  ).

lr_ent->get_property_as_value( exporting iv_attr_name = ....street  importing ev_result = lv_street ).

Regards,

Arun

Former Member
0 Kudos

Hi Arun,

Ii am also facing the same problem.

I am new to CRM and as well as BSP, Now the requirement is, at the time of Lead creation, i need to display the customer group 1 value( VIP,KAM etc), and these are sales area specific values. customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.

sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.

I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.

To display the value in the context node BTLEADH, i need to know the sales area data which is entered in BTORGSET.

Kindly let me know how to achieve above requirement.

As per this thread i applied following code in context node BTLEADH, atttribute New Zfield, in get method, but not able solve, please guide me.

DATA: LR_ENT TYPE REF TO CL_CRM_BOL_ENTITY,

LR_COL TYPE REF TO IF_BOL_ENTITY_COL.

LR_ENT ?= ME->TYPED_CONTEXT->BuilHeader->COLLECTION_WRAPPER->GET_CURRENT( ).

LR_COL = LR_ENT->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BuilSalesArrangementRel' ).

LR_ENT ?= LR_COL->GET_FIRST( ).

IF LR_ENT IS BOUND.

LR_ENT->GET_PROPERTY_AS_VALUE( EXPORTING IV_ATTR_NAME = 'DIVISION' IMPORTING EV_RESULT = LV_DIVISION ).

ENDIF.

Thanks

Bhanu