Skip to Content

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

How to get value from one context node to another context node in different views

Hi gurus

I have the following problem.

I have 2 context nodes (context node1 and context node2) in views different. the context node1 is bound to the component controller.

I need get a data from context node1 in the getter_method of an attribute from context node2.

I know how to get a reference to the component controller,you can do it as follows.

lr_controller TYPE REF TO CL_BUD_BSPWDCOMPONEN_IMPL "Implementation class of the component controller

lr_controller ?= me->comp_controller.

but the Access to protected attribute "COMP_CONTROLLER" is not possible.

Can you help me telling me how do I read the data of the context node 1 from the method of the attribute in the context node 2


Felipe Grajales

Former Member
Former Member replied

Dear Felipe,

  One of the step to access component controller form CNXX class is

           Create reference attribute of type component controller in CNXX class

           say GR_COCO type ref to (component controller )

           Then assign it in DO_PREPARE_OUTPUT.

               me->typed_context->(NODE)->GR_COCO ?= me->comp_controller.


Now you can read your Component controller form your getter or setter method.

Thanks and Regards

Rajarama U

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question