How to populate context node of component controller

Dear People,
Is there any way i could access my custom context node of component controller in the context node class of my custom controller.
I am navigating from one component to another, Upon initial launch everything is working fine, however if i go to home page and come back. the assignment block is coming empty.
In WD_USAGE_INITIALIZE i m binding my custom controllers context node with the component controller's context node of the other component and it works fine when i load the UI. however if i go to home page and come back. the assignment block is coming empty.
Following code is in method of DO_VIEW_INIT_ON_ACTIVATION of the other componenet.
METHOD do_view_init_on_activation.
  DATA:   lv_btstatus_parent TYPE REF TO cl_crm_bol_entity,
        lv_comp_ctrl      TYPE REF TO cl_btstatus_bspwdcomponen_impl.
  CONSTANTS:
        lc_us_header      TYPE crmt_relation_name VALUE 'BTStatusHUserAll',
        lc_us_item        TYPE crmt_relation_name VALUE 'BTStatusIUserAll'.
  lv_comp_ctrl ?= me->comp_controller.
check if relationname has been passed from outside
    gc_relation_name = lv_comp_ctrl->get_relation_name( ).
  IF gc_relation_name IS INITIAL.
  check type of parent to determine relationname
    *lv_btstatus_parent ?= lv_comp_ctrl->typed_context->btstatusparent->collection_wrapper->get_current( ).*
   check lv_btstatus_parent is bound.
    CASE lv_btstatus_parent->get_name( ).
        WHEN 'BTStatusH'.
          gc_relation_name = lc_us_header.
        WHEN 'BTStatusI'.
          gc_relation_name = lc_us_item.
    ENDCASE.
  ENDIF.
CALL METHOD super->do_view_init_on_activation.
ENDMETHOD.
Here lv_btstatus_parent is bound during initial launch, however after navigating back to the same page, its blank leading to exception.
any suggestions would be helpful.
regards,
pradeep

solved myself

Similar Messages

  • Creating Node for Context in a  component controller disabled.

    Hi, I am trying to create this node, i see the option when I do RightClick the context in the component controller > Create>Node, but i was not able to select it. Am i missing some settings to enable it?
    Appreciate your help.
    Thanks,
    Chinnam.

    hi..
    No worries, this forum will help you
    On top left corner you will find , small icons for change, dispaly..
    just place your mouse over those icons...you wil get the tooltips.
    to build a simple applicatioin
    http://www.****************/Tutorials/WebDynproABAP/SimpleApplication/SimpleApp1.htm
    and to learn webdynpro just go through the below links
    http://www.sdn.sap.com/irj/scn/webdynpro-elearning
    Regards
    Srinivas

  • How to read context node/attribute data of diff UI component of same screen

    Hi,
    I am new to CRM and as well as BSP, Now the requirement is, at the time of Lead creation, when the end user enters customer code and sales area i need to fetch and display the customer group 1 value( VIP,KAM etc) based on the customer's sales area, ( these are sales area specific values).
    but the problem is Customer code is in diff UI component and sales area data is in diff UI component .
    1) customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.
    2) sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.
    3) I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.    
    To display the value in the context node BTLEADH, i need to know the sales area data which is entered in BTORGSET.
    Kindly let me know how to read the data which is in diff UI component of the same Lead creation screen.
    i written following code in context node BTLEADH, atttribute New Zfield, in get method, but not able solve, please guide me.
      DATA: LR_ENT TYPE REF TO CL_CRM_BOL_ENTITY,
                 LR_COL TYPE REF TO IF_BOL_ENTITY_COL.
      LR_ENT ?= ME->TYPED_CONTEXT->BuilHeader->COLLECTION_WRAPPER->GET_CURRENT( ).
      LR_COL = LR_ENT->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BuilSalesArrangementRel' ).
      LR_ENT ?= LR_COL->GET_FIRST( ).
      IF LR_ENT IS BOUND.
        LR_ENT->GET_PROPERTY_AS_VALUE( EXPORTING IV_ATTR_NAME = 'DIVISION'  IMPORTING EV_RESULT =  LV_DIVISION  ).
      ENDIF.
    I'll appreciate if you can provide me some documents to refer.
    awaiting for your responses.
    Thanks
    Bhanu

    Hi Gangadhar,
    I think i have not clearly explained my requirement, let me put it once again. My requirement is, I have to read two UI component data, validate and display some value in one new zfield which is in one of the UI components.
    I need to display customer's sales area specific data like customer group 1 value in that new zfield. for that i need Customer code and as well as sales area data from the screen.
    1) customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.
    2) sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.
    3) I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.
    As per my understanding, in the context node BTLEADH, GET_METHOD of atttribute New Zfield, i have to read customer code from UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT and Sales area data from UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET based on the values, validate and display the data.
    But as per your recent reply you are asking me to write the code in get_property_attribute---division. so i didnt understand.
    Kindly clarify if i am wrong.
    awaiting for your response.
    Thanks
    BHanu

  • How to change Context Node/Subnode parameters?

    How can I change node parameters AFTER I have created them? For instance, I have a sub-node of a lead node. I now want to assign a supply method to the subnode however, I can not edit this now. Is this possible? Thanks!

    Never mind....found it....I have to change it at the COMPONENT CONTROLLER context level...NOT at the VIEW context level. Doh!

  • Error on enhancing context node of component CRMCMP_CAWB

    Hi Experts,
    I am trying to enhance the context node SEARCHQUERY of view creditwbsearchview component CRMCMP_CAWB. While doing the generated context node class is having 1 error.
    This is also causing dump. Can you all please help me how to remove this error. This is bit urgent.

    Might need to raise OSS, cause error is in the standard class.
    Regards,
    Sumeet

  • Cannot access Created Context Attribute from Component Controller

    Hello All,
    I have added a new attribute to a node in my component controller 'LOGONUID' and I cannot access it within my windows within the WDA application.
    DATA lo_nd_url_param TYPE REF TO if_wd_context_node.
      DATA ls_workset TYPE wd_this->element_workset.
      "DATA ls_logonuid TYPE wd_this->element_logonuid.
    I get an error as soon as I try to activate this code in my method in my W_MAIN
    In my component controller I do not see it reference in the SAP generated code in my WD_THIS IF_COMPONENTCONTROLLER?
    * Intf.: ig_componentcontroller
    * Purp.: programming interface for access of this controller within
    *        other controllers of the same component
    *        controller:  <COMPONENTCONTROLLER> of
    *        component:   <zhr_wd_mss>
    * UDate: 20111207 145441
    *=====================================================================*
    interface ig_componentcontroller.
      interfaces: ziwci_hr_wd_mss .
      constants:
        wdctx_context type string value `CONTEXT`.
      constants:
        wdctx_cuifcontext type string value `CUIFCONTEXT`.
      types:
        begin of Element_cuifcontext,
          USERID  type String,
          LASTEVENTOPERATION  type String,
        end of Element_cuifcontext,
        Elements_cuifcontext type
           standard table of Element_cuifcontext
           with default key.
      constants:
        wdctx_messages type string value `MESSAGES`.
      types:
        Element_messages type ZHR_S_MESSAGE,
        Elements_messages type
           standard table of Element_messages
           with default key.
      constants:
        wdctx_workset type string value `WORKSET`.
    I want it to be declared as the constant 'WORKSET'
    thank you
    Edited by: Keith Warnock on Dec 7, 2011 8:55 PM
    Edited by: Keith Warnock on Dec 7, 2011 8:56 PM

    > I have added a new attribute to a node in my component controller 'LOGONUID' and I cannot access it within my windows within the WDA application.
    >
    >
    >
    > DATA lo_nd_url_param TYPE REF TO if_wd_context_node.
    >   DATA ls_workset TYPE wd_this->element_workset.
    >   "DATA ls_logonuid TYPE wd_this->element_logonuid.
    >

    >
    This declaration is not right. There is no element logonuid, you  have the attribute inside a node. workset is a node and thats why you can declare that way.
    easiest way is to declate
    data lv_logonuid type <ddic type> or
    data lv_logonuid type wd_this-><node name>-logonuid.
    You can also use the code generator in (CTRL +F7 ) to get/set attributes.

  • How to get Context Node data in respective HTM page

    Hello Experts,
    My Scenario is as follws: Two views are there one is table view[contain customer data] and another form view[where i require the data]. my requirement is, table view is having customer information with their city names. i need the city name in my form view's .htm
    Both views are having same context node which are bounded via custom controller.
    Could you help me out to solve this
    With Regards
    SRiNi

    Hi,
    this should be very simple as the context nodes are defined as page attributes on your .htm page.
    Example:
    Your Context node is named /TEST/.
    In your .htm page you can access it by:
    <%
    data:
      lr_property type ref to if_bol_bo_property_access.
      lr_property = /test/->collection_wrapper->get_current( ).
    %>
    EDIT:
    In case there is no page attribute, you can use the SET_MODELS method in the view implementation class to set a variable. Be sure to create the variable you want to set on the .htm page in the page attributes first.
    cheers Carsten
    Edited by: Carsten Kasper on Oct 21, 2008 2:44 PM

  • Constructor undefined , while initiating model node in component controller

    Hi Team,
    I am getting constructor undefined error, when i am trying create an object of model node in component contrloller.
    i tried the solution provided in this Undefined constructor and model nodes but it is working.
    can any one suggest me?
    Regards
    Bala

    Hi Akshaya,
    here is my code.
    i am just intatiating the model node in component contrlloer.
    the below method id in component controller.
    public void wdDoInit()
        //@@begin wdDoInit()
    try {
            AnyType_Item atm = new <b>AnyType_Item()</b>
    wdContext.nodeAnyType_Item().bind(atm);
    catch (RuntimeException e) {
         // TODO Auto-generated catch block
          e.printStackTrace();
          wdComponentAPI.getMessageManager().reportWarning(e.getMessage());
    The above bold one is error, saying constructor is undefined.
    regards
    Bala

  • How to populate value node with values?

    Hi Experts,
    I have created a new view with a vlaue node of table type.
    How can I populate values into the value node?
    Which method will be useful?
    Is there any material for Web UI Programing?
    Please help me in this.
    Thanks,
    Adi.

    Hi Adi
    If ZVal is your value node then,
      DATA: lref_entity    TYPE REF TO cl_bsp_wd_value_node,
            lref_bo_coll   TYPE REF TO if_bol_bo_col,
            lref_data TYPE REF TO <<your ZStructure>>,
             ls_data type <<your ZStructure>>.
    ls_data-<<field1>> = 'XYZ'
    ls_data-<<field2>> = 'XYZ'
         CREATE OBJECT lref_bo_coll TYPE cl_crm_bol_bo_col.
          CREATE DATA lref_data.
          CREATE OBJECT lref_entity
            EXPORTING
              iv_data_ref = lref_data.
          lref_entity->set_properties( ls_data ).
          lref_bo_coll->add( lref_entity ).
          typed_context->ZVal->set_collection( lref_bo_coll ).
    Hope this was helpful.
    Best Regards,
    Lakshminarayana

  • How to start / stop nodes without domain-controller / automatically on Win?

    Hi,
    we have a distributed installation of CMSDK 9.0.4.
    We have installed a 9.2.0.4 Database on Solaris and we are using the 10g(9.0.4) Infrastructure on Solaris with it.
    The first installation of CMSDK uses a J2EE-MidTier installation on the Solaris server and contains the CMSDK domain controller and a normal node with nfs protocol server running.
    The other installations are done on Win2003 Blades. Currently we are using two Blades. On each there is a J2EE-MidTier installation and within these we have installed CMSDK with HTTP-Node and normal node. We are using NTFS-Server within the normal nodes.
    The Blades are within one Domain and we have NLB-Cluster activated for both.
    The whole thing sounds complex, but it works fine. We only have some trouble regarding start/stop of the nodes:
    1. If the solaris backend fails, our cluster-configuration tries to stop and start cmsdk. While stopping cmsdk, all nodes - even those on the Win-Servers - are stopped. But starting does not bring em up again automatically.
    2. If a Windows Server is booted, the normal node does not start automatically.
    3. If one Windows Server is not available, the ifsctl check takes a very long time because it's trying to get information from the missing one.
    Is there a way to restart the domain controller and node on solaris without stopping the nodes on Windows?
    How can we start the windows nodes automatically after reboot?
    Is there a way to probably start the nodes without being managed / guarded by the domain controller?
    Thanks for help,
    Alex

    Try adding this script to your /etc/init.d directory:
    #!/bin/sh
    ifsctl start << EOF
    <ifsctl password>
    EOF
    Replace <ifsctl password> with the password that you would give at the prompt.
    It will complain about Inappropriate ioctl for device, but it works.

  • Instantiating Model Node in Component Controller with new Abstractlist()

    Hi All,
    We have the following issue.
    When we instantiate a Node - Po_Items using Element.setPo_Items( new AbstractList() )
    We get an error "The Type AbstractList Cannot be instantiate" .
    So how to successfully instantiate AbstractList()  so that ultimately the BAPI_NODE_INPUT can be instantiated.
    Best Regards,
    Roby...

    Hi Murtuza,
    Thanks alot for the response.
    I tried initializing Node using
    Element.addPo_Items(new Bapiekpoc());
    But its not getting initialized and I get following errror when I run the application.
    500   Internal Server Error
    Web Dynpro Container/SAP J2EE Engine/6.40 
    Failed to process request. Please contact your system administrator
    Is there any other way to initialize the Po_Items Node which which is inside the Model Node BAPI_PO_CREATE_INPUT.
    BAPI_PO_CREATE_INPUT ( Model Node )
        -- Po_Items ( Subnode which is an input table inside the BAPI )
    Thanks again & Best Regards,
    Roby....

  • Mapping from component controller context and view context

    Hi to all experts.
    im trying to create my first webdynpro . Im stuck up here please help me .... How to map the node from component controller context and view context i have searched the forum....got the answers as Drag and Drop...But it is not working ....

    Hi
    Check out this links and check saptechnical site
    WDA in SAP Help
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7c/3545415ea6f523e10000000a155106/frameset.htm
    Web Dynpro for ABAP in SDN
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9 [original link is broken]
    Developing ABAP Applications Using Web Dynpro
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/d41b25d2216babe10000000a1553f6/frameset.htm
    Web Dynpro ABAP: Development in Detail
    http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm
    WDA Sample programs & tutorials
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    Web Dynpro ABAP Demonstration Videos
    /people/thomas.jung/blog/2006/06/20/web-dynpro-abap-demonstration-videos
    Web Dynpro ABAP Wiki's
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/main&
    New to Webdynpro
    Thanks,
    Tulasi Palnati

  • How to work with the component controller.

    I Created a Z component.
    In that component controller i ceated a context node by using value node with BUT000 with the attribute NAME_ORG1.
    I created a view in the same component.
    In the view i created a Context Node BUT000 wiht NAME_ORG1.
    I bind this view context node with compnent controller context node.
    I want set the value from the view context node to component controller context node. How it is possible?
    I created another Z component.
    I created compoent controller like same context node above.
    I created the view also.
    I want display the first compoent controller data in the second component controller.
    How it is possible.
    For one component to another component we can pass the data based on component controller only?
    Please give me how i can set/display the component controller context node with the data?
    Thank You.
    Regards,
    B. Krishna.

    Hi Manish.
        Thank you for reply Manish. I need some more information.
    I created ZCOMP1 with view V1 and ZCOMP2 with view V2.
    In both component controllers I created Context node by usng NAME_ORG1 of BUT000.
    I provide the Navigation link from ZCOMP1 to ZCOMP2 as well as ZCOMP2 to ZCOMP1.
    In Run Time Repository I provied two components as a INTERFACE VIEWS and
    I provide ZCOMP2 as component Usage in ZCOMP1 as well as ZCOMP1 as a Component Usage in ZCOMP2.
    Now, what ever data I entered in ZCOMP1 like NAME_ORG1 is "HELLO" then
    This infomation I want display in ZCOMP2 - V2.
    In ZCOMP2 method  wd_usage_initialize
    I write like this.
    IF IV_USAGE->USAGE_NAME = 'CompUsage'.
        iv_usage->bind_context_node( iv_controller_type  = cl_bsp_wd_controller=>co_type_component
                                       iv_target_node_name = 'BUT000'       
                                       iv_node_2_bind      = 'BUT000' ).    
      ENDIF.
    But it is displaying the Exception like this
    Cannot display view ZCOMP2/MainWindow of UI Component ZCOMP2
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - The view controller or custom controller "" was implemented incorrectly 
    Method:  CL_BSP_WD_COMPONENT_USAGE=>IF_BSP_WD_COMPONENT_USAGE~BIND_CONTEXT_NODE 
    Source Text Row:  24
    Please tell me how to solve this Problem.
    Regards,
    B. Krishna.

  • Issue in Binding Custom controller to Component Controller

    Dear All,
    I have enhanced a standard component ERP_H.
    I created a custom controller with context nodes BTSTATUS, BTSTATUSH
    I enhanced the component controller with context node BTSTATUS, BTSTATUSH
    Now when i try to bind the custom controller to component controller using this code in the context class of my custom controller
    bind to component controller
      owner->do_context_node_binding(
               iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_COMPONENT
               iv_target_node_name = 'BTSTATUS'  " component controller context node
               iv_node_2_bind = BTStatus ).
    its not working since this context node in component controller is not the standard one but the custom added one.
    Am i missing something, or is there any way to bind customer context node in custom controller to customer context node in component controller.
    regards,
    pradeep

    Hi pradeep,
        Try the other way round go to the context class in the component controller and paste the following code in the
    create_contextnode( context node = name of the node to be linked).
    *owner->do_context_node_binding(
            iv_controller_type = cl_bsp_wd_controller=>co_type_custom   <-----linking from component to custom
            iv_target_node_name = 'BUILHEADER' "target node: component controller node
            iv_node_2_bind = BUILHEADER ). "source node: current node.
    See if this works.
    Thanks

  • Read a View Context's node's element and assign from Component controller

    Hello Experts,
    I'm new to JAVA WD.
    Here is my scenario.
    I have to use an Adobe form in a WDJ. The input parameters and the output parameters of the DC are defined in a method in the Interface Controller method.
    The context of the Component Controller has the following structure
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    Then the mapping between the Component controller and the interface controller is done so that the Interface controller also has the context structure as
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    So now the interface controller and the component controller are bounded correctly.
    Now I bind the view also with the Component controller as below.
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    But since i need to use an Adobe interactive form inside this view, the datasource for the form cannot be the root context node but some other node. So I replicated the same structure in the view context so as to make the fields visible in the Adobe form context. Now the context looks as below.
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    ---DATA_NODE
    -----StartDate
    -----EndDate
    -----AbsenceType
    Now my question is, how do i map the result from the Adobe form into the context of the view??
    What code should i write and where should i write to achieve this?
    I need to do the following. But dont know how to write the code for this.
    Context.StartDate = Context.DATA_NODE.StartDate
    Context.EndDate = Context.DATA_NODE.StartDate
    Context.AbsenceType= Context.DATA_NODE.AbsenceType
    Please help!
    Any help will be greatly appreciated.
    Thanks,
    Sam

    Hello Nikhil,
    I'm stuck with another small issue.
    Let me first explain what I'm trying to do.
    I have a view with the context structure as follows
    Context
    ---DATA_NODE (Node)
    ----Data1
    ----Data2
    ---Data1
    ---Data2
    All i need to do is, at the start of the view, i need to move the data from
    Context.Data1=>Context.DATA_NODE.Data1 and
    Context.Data2=>Context.DATA_NODE.Data2
    Also, at the View Submit button click, I need to move the data from
    Context.DATA_NODE.Data1 => Context.Data1 and
    Context.DATA_NODE.Data2 => Context.Data2
    (I managed to do this submit button click by calling an action->method and wrote the code as you gave earlier)
    wdContext.currentContextElement().setData1(wdContext.currentData_NodeElement().getData1());
    wdContext.currentContextElement().setData2(wdContext.currentData_NodeElement().getData2());
    But I wrote at wdInit() for the view the code in the reverse way, but the values are not getting passed to the Data_Node and hence its not defaulting with the values from the elements of the context.
    This is what I wrote.
    wdContext.currentData_NodeElement().setData1(wdContext.currentContextElement().getData1());
    wdContext.currentData_NodeElement().setData2(wdContext.currentContextElement().getData2());
    Please let me know if I'm doing something wrong here.
    Appreciate your help in advance!
    Cheers,
    Sam

Maybe you are looking for

  • List of values is not displayed in web inteligence report

    I created a web inteligence report and put into my favourite folder. The report consist of a selectable list of values in a prompt but it does not appear in my favourites folder. The users with administrator rights that copied this report into their

  • Multi threadin with VC++

    Multi threadin with VC++ I have some problems with multi threading using the provider OraOLEDB. When I try to execute a CreateCommand for a CCommand<CManualAccessor> in a secondary thread I have a failure inside OraOLEDB.dll. There is no problem if I

  • Work process in SAP BW

    Hi All, I want to know about work processes in SAP BW, as today some ODS activations got failed with the reason" no batch process available". Is there any documents for these work process .(like what is work process, how to main them, etc..) Thanks R

  • Printing Reports on Dot Matrix Printer

    Reports are printing very slowly on Dot Matrix Printer. If any solution Please tell me. [email protected]

  • Refine Edge Tool Not Highlighted to Open - CS6

    Hi Everyone, I have been using CS6 on a mac OSX retina without any issues until today, the "Refine Edge Tool Box" isn't highlighted anymore to open? is there some simple answer to this to reactivate it to open as it should? any helpful info would be