Skip to Content
author's profile photo Former Member
Former Member

Mixed Node

Hi,

Can any body explain about mxed node in sap-crm?

Regards,

Suresh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 07, 2014 at 01:36 PM

    Hi,


    A mixed node would contain both value node & model node. Sometimes we need to have a node which can contain some fields which we don't need to persist. For e.g. if you have provided your date of birth , then persisting age is of no use. We can calculate it from your DOB , hence we can have DOB as model field of a model node & show age as value field of a value attribute. Yes I have taken a simple example but there could be a scenario which drives this.

    How to access Mix node


    DATA: lr_mixed_node TYPE REF TO cl_bsp_wd_mixed_node,

    lr_model_node TYPE REF TO if_bol_bo_property_access,

    lr_value_node TYPE REF TO if_bol_bo_property_access.

    IF iterator IS BOUND.

    current = iterator->get_current( ).

    ELSE.

    current = collection_wrapper->get_current( ).

    ENDIF.

    lr_mixed_node ?= current.

    lr_model_node ?= lr_mixed_node->if_bsp_wd_ext_property_access~get_model_node( ).

    ANd from lr_model_node entity you can read the attributes you want from model node.

    Similarly get value node using get_value_node method .

    More 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( ).

    Regards,

    Sumeet

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 27, 2013 at 09:05 AM

    Hi Suresh,

    We have to types of context nodes, Value node and Model node.

    so, context node can be a type model node or value node depends on how we have created.

    Mixed node will come into picture when we try to retrieve data from context node like

    me->typed_context->CONTEXTNODE->collection_wrapper->get_current( ), now the returning parameter will be if_bol_bol_property_access.

    for suppose we need to access the returned parameter as model_node then,

    We apply Mixed_node->get_model_node... like

    If we know it is a value node then,

    mixed_node->get_value_.node... like..

    Finally, mixed node can hold both value node and model node...

    Regards,

    Devender

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.