Hi Ankesh,
The answers are below to your questions:
1) How to read context node value from view, from opportunity I have to read BP Partner??
lr_entity = me->typed_context->context_node_name->collection_wrapper->get_current.
lv_value = lr_entity->get_property_as_string( partner_no).
This lv_value contains the value of partner_no.
2) On the basis of this BP Partner I need to fetch relationship (Table BUT050) on the basis of BUT050-PARTNER1 and BUT050-RELTYP I need to fetch BUT050-PARTNER2 , So should I write Select Query or what should be the approach.
First check the relationship name in genil_bol_browser, that which relation you want to access based on table BUT050,then from the below code you can access the relationship.
lv_entity = lv_iterator->get_first( ).
while lv_entity is bound.
lv_children ?= lv_entity->get_related_entities(
iv_relation_name = ‘MyRelation’).
lv_result->add_collection( lv_children ).
Endwhile.
3) After fetching the BUT050-PARTNER2 I have to display it on view , I am using BT111H_OPPT_PR and enhance it with Z Enh Set, The new field should I add it under existing node or create new node.
add a new field in UI in that new node.
4) The new field does not exist in BOL , so should I have to create or enhance anything in BOL or I will just take reference of any other field and create it on view.
If the field does not exist in bol structure, then create a new field with AET so that it will come in UI and will show data.
Please follow the above steps and let me know if you have any issues.
Thanks,
Mamta