Passing Data Between Views:Custom Controller

Dear Experts,

I am not able to pass data between views.I read many threads in this forum, but still clueless.

Here is my requirement, Create a Custom component with 2 views. View one will have Service Request No and and View two will have some fields related to that service request.(Note I am not using a Search and Result page)

I have created a Custom Component and created 2 views and a view set and created custom controller (HeaderCuCo) , I am using BTAdminH in the model node. Binded the 2 views with the custom controller context node(BTAdminH).

When I Enter the serivce request number and press 'DISPLAY' button, it should give me values of that service request in view 2.

In the event handler EH_ONDISP ,I have written the below mentioned code.(This Event handler is triggered from Viewset)

DATA: lr_cuco type ref to ZL_ZRP_DETA_HEADERCUCO_IMPL,

lr_entity type ref to cl_crm_bol_entity.

lr_cuco ?= me->get_custom_controller( 'ZRP_DETAIL/HeaderCuCo' ) .


lr_entity ?= lr_cuco->typed_context->btadminh->collection_wrapper->get_current( ) .

CHECK lr_entity IS BOUND .

lr_cuco in BOUND, but lr_entity in not bound,

What I am missing? should I write this code in DO_PREPARE_OUTPUT of the view 2 also ??

please advice me ..




Hi Roopas,

You can get the entered value in FORM_FIELDS, not sure its the right approach, but its simple.Get the Entered value here and pass it to the Query you are using.



0 View this answer in context