Access Value Node
-
Upload
hari-narayanan -
Category
Documents
-
view
212 -
download
0
description
Transcript of Access Value Node
Access Value node
DATA: lr_mixed TYPE REF TO CL_BSP_WD_MIXED_NODE,
lr_entity TYPE REF TO CL_CRM_BOL_ENTITY.
lr_mixed = me->typed_context->your_context_node->collection_wrapper->get_current( ).
lr_entity ?= lr_mixed->if_bsp_wd_ext_property_access~get_model_node( ).
lv_value = lr_entity->get_property_as_string( iv_attr_name = 'DATE' ).
If the attribute is a value node you can access it directly.
lr_mixed = me->typed_context->your_context_node->collection_wrapper->get_current( ).
lv_value = lr_mixed->get_property_as_string( iv_attr_name = 'DATE' ).
The context node that you are using is a mixed node, so from this node you need to get model node so that you can cast the entity into CL_CRM_BOL_ENTITY.
Here's the sample code:
DATA:
lr_mixed TYPE REF TO cl_bsp_wd_mixed_node,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_child TYPE REF TO cl_crm_bol_entity.
lr_mixed = me->typed_context->node_name->collection_wrapper->get_current( ).
lr_entity ?= lr_mixed->if_bsp_wd_ext_property_access~get_model_node( ).
lr_child ?= lr_entity->get_related_entities( ).