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

How to access custom controller node

Hi,

I want to access custom controller node attributes in view .

Regards,

Ravi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2012 at 07:10 AM

    Hi Ravi,

    For getting the attribute of context node just follow coding which i am providing below.

    DATA lr_dquery_service TYPE REF TO cl_crm_bol_dquery_service.

    data : lr_entity TYPE REF TO cl_crm_bol_entity.

    DATA lr_bol_col_result TYPE REF TO if_bol_bo_col.

    DATA lr_cUCO TYPE REF TO ZL_ZVIVEK11_CUCO_IMPL . " your custom controller's impl class

    lr_cuco ?= me->get_custom_controller( controller_id = 'ZVIVEK11/CUCO' ). " ur custom controller name

    lr_entity ?= lr_cuco->typed_context->RESULT->collection_wrapper->find( IV_INDEX = lv_row_index ).

    --------------------------------------------------------------------------------------------------------------------------------

    Now you have entity you can manipulate it according to your requirement.

    regards,

    Vivek Gupta

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Chandra,

      1) to say exactly you cannot have access to custom controller of another component in a component.

      2) If you want to expose Custom controller context to anothor component, then you can perform below task.

      a) context mapping between custom controller to component controller of same component.

      b) use concept component usage and bind the context node of different component controllers.

      Hope this helps you

      -Regards,

      Devender

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2012 at 06:30 AM

    Hi Ravi,

    Create an attribute in view context node with the same bol entity of the custom controller context node bol entity .

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mahadevi,

      I created a node (node1) in view1, view2 and custom controller and it has the attribute (Number1) . I bind the node1 of custom controller to view1 and view2. Now i want to access the entered input in attribute(Number1) in view1 to view2 using getter and setter methods not do_prepare_output.

      Regards,

      Ravi .

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.