Unable to access Component Controller attributes from Views.

Hi,
  I am unable to access the attributes in component controller from methods in View even by using WD_COMP_CONTROLLER.
Say, I want to access the attribute G_FLAG in component controller from a method in the View Controller by the following code :
  WD_COMP_CONTROLLER->G_FLAG = 2.
Then an error message is showing up saying -  Field G_FLAG is unknown. It is neither in one of the specified tables nor defined by a DATA statement.
What should I do? Plz suggest..

Hi,
Please check the Public check box of the attribute in the component controller.
Hopefully it will solve your problem.
Thanks

Similar Messages

  • How to call Custom or Component Controller methods from View Controller

    Hy Guys,
    how do I call Custom Controller or Component controller methods from a View or Context Controlller?
    thanks in advance
    Jürgen

    Hi Juergen
    Yes it is possible, pls follow the below approach to access the component controller in context node class
    1) since the standard component controller class is protect variable , declare a variable of type component controller in your controller class.
    say for example the public variable you declared is  g_comp_controller
    2)  now redefine the controller class method WD_CREATE_CONTEXT  and add the below lines of code
       g_comp_controller ?= me->comp_controller.
    3) go to context node class  (CNXX)  there declare the varaible which of type controller class (IMPL)  as public variable, for example g_owner
    4) redefine the method  IF_BSP_MODEL~INIT  and write the below code
         CALL METHOD super->if_bsp_model~init
        EXPORTING
          id    = id
          owner = owner.
      g_owner ?= owner.
    5) now the variable   g_owner  that is declared in  (CNXX)   contains reference to your controller class
    6) in  on_new_focus  method access your component controller in the below manner and access the entities also.
    DATA: lv_owner                    TYPE REF TO xxxxx_impl,  " Implementation class
                 lr_comp_cont                TYPE REF TO xxxx_bspwdcomponen_impl, " component controller class
                 lv_entity type ref to cl_crm_bol_entity.
    lv_owner ?= g_owner.
    lr_comp_cont    ?= lv_owner->g_comp_controller.
    IF lr_comp_cont IS BOUND.
       lv_entity ?= lr_comp_cont->typed_context->mdfcampaign->collection_wrapper->get_current( ).
    now lv_entity contains the value of component controller context node.
    Thanks & Regards
    Raj
    Edited by: bmsraj on Sep 27, 2011 3:28 PM

  • Call component controller method from view

    Hi
    I have created an action in view Thus its event handler is "OnActionDoSomething()"
    And, I have a method in component controller "MethodSaySomething()".
    Now, how can I call MethodSaySomething() from OnActionDoSomething().
    OnActionDoSomething()
    // Call  MethodSaySomething() defined in component controller
    Thanks

    Hi,
        To access the methods present in component controller from View , first u need to add the component controller as the required controller.
    open the view controller --> switch to propertues tab --> add the component controller as required controller(click add controller).
    Now in your action handler , write this below code to add the method:
    wdThis.wdGet<COmponent Controller>().MethodSaySomething();
    Hope it helps
    Thanks and Regards,

  • Calling comp controller attribute from iinside view

    HI all,
    I want to know how to call a component controller attribute from inside a View's method?
    any sampe coding..?
    Regards,
    Shanthi

    Well, you can use the wizard. Just call any method from the component controller. The wizard will create you the code including the line how you will get a reference to the component controller, which is the point here.
    After you have the reference to the component controller, let's say lo_component_controller, you can access its attributes like this:
    lo_component_controller->your_attribute
    Then of course delete the unnecessary lines of code.
    Regards,
    Karri

  • Accessing component controller node

    Hi..Experts,
    How to access component controller node from  WINDOW (please give me a sample code ) .
    I want to set data to component controller node.
    please help me.
    Regards,
    Siva

    Hi siva,
       Its very easy u need not to do any extra coding to share data between window context and component controller context.
    Step 1) u create the node in component controller and map this node with window context.
    step 2) Now in any method of window u write the set_attribute or bind_table statement ,your data will automatically transported to component controller .
    So u dont need to do any extra coding for this.
    Hope this will help your requirement.
    regards
    Pankaj Giri

  • How to access a Java class from view controller?

    Hi All,
    I have created a Test.java class file from Navigator view under
    Src --> Packages --> com.sap.MyProject.
    When I try to access the Test class from view controller,
    I getting this error "Test cannot be resolved or is not a type".
    How do I fix this?
    Thanks
    Sundar

    Hi,
    I have created a Test.java class file from Navigator view under
    Src --> Packages --> com.sap.MyProject.
    After this you can goto the context of your View and define the VA goto the type of VA and click on the right side button and go to java native type and type your java file name click you name .
    that means the jave file s assigned to VA.
    U can utilize thrut that VA.
    Thanks,
    Lohi.

  • 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 call a custom controller method from view

    Hi,
    I ve created a simple web service and consumed it in a model. Mapped the input & output parameters to custom controller context which in turn mapped to component controller's context which in turn to view's contexts.
    How to call a custom controller method from view?
    Please explain the syntax.
    Regards,
    Manoj.

    Hi Patralekha,
    Give some idea for the below scenario:
    I ve created a simple web service and consumed it in a model. What I did was
    1) for the input parameters, mapped the node from view->custom controller->model
    2)for the output parameter, mapping from model->custom controller->view.
    It works fine.
    But I don't want to access model nodes directly, rather I want to set the input param in somewhere else (like custom controller) before calling the appropriate method, same for the response also.
    Share me your thoughts.
    Regards,
    Manoj.

  • Accesss the Controller Context from View

    Hi,
    could you please let me know the code to access the Component Controllers Context from View Controller

    Hi Raghava,
    Suppose the following structure is there is Component Controller.
    Vn_DummyNode
      - Va_DummyContext
    To access it from the View Controller, you have to add the Component Controller in the required list of controllers.
    You can access it using the below piece of code
    wdThis.wdGetViewControllerName().wdGetAPI().getContext().getRootNode().getChildNode("Vn_DummyNode", 0).getCurrentElement().getAttributeValue("Va_DummyContext");

  • Unable to find matching navigation case from view ID.  Error 404

    Hi All,
    I basically wanted to jumpstart my ADF exploration so I am following the tutorial at this link. [http://www.oracle.com/technetwork/developer-tools/jdev/ccset22-all-099343.html]
    Everything looks good but when I click the Edit Button, I am encountering an error. What I did was I change the logging mechanism into a FINER in my WLS and from the logs,
    it prints below messages.
    <NavigationHandlerImpl> <getViewId> "JSF1013: Unable to find matching navigation case from view ID '/orders-flow/editOrders' for outcome 'save' and action 'save'
    <ViewHandlerImpl> <executePageToBuildView> About to execute view /orders-flow/editOrders
    <ViewHandlerImpl> <executePageToBuildView> Before dispacthMessage to viewId /orders-flow/editOrders
    <ViewHandlerImpl> <executePageToBuildView> After dispacthMessage to viewId /orders-flow/editOrdersI checked out the taskflow and it is basically calling a task-flow-return component.
    I followed everything but I cant make this example work... Any idea why? I checked out the DB and I notice that it has commited my Edit Transaction but I am getting a 404 on my page. Please help. Thanks.

    Hi Frank,
    I think I got the save control flow case.
    Can you help me check please if I miss something? I uploaded my project at this link. [http://www.4shared.com/file/QFcofTfj/BrowseEditApp.html]
    I am quite not sure if I miss something but I have done this project twice already but got the same result.
    Thanks
    Edited by: Marky on 13.4.2011 5:59

  • Unable to access LAN behind RV042 from QUICK VPN Client once it connects

    Hi,
    Very recently, we had implemented Site-to-Site VPN tunnel between two Linksys RV042 4-port VPN routers. Everybody in our remote site is accessing and sharing the data through this tunnel and it is working fine.
    Now, we have a plan to implement the same for our mobile clients also. For this, we had followed all the basic configuration procedures and user got connected to Quick VPN tunnel. Here is a problem we had observed. The mobile client user is connected to the tunnel, but unable to access the office LAN from the PC.
    What's the problem in configuration? What i have to do?
    Thanks
    VC Gundapaneni

    Hi There.
    have a look over here.
    http://www.linksysinfo.org/index.php?threads/netbios-issues-with-vpn.16170/

  • All of a sudden I am unable to access my college email from any of my apple devices (iPhone, iPad, macbook pro). I am able to access from my husband's HP windows laptop and from a Mac computer at the college.

    All of a sudden I am unable to access my college email from any of my apple devices (iPhone, iPad, Macbook Pro). I am able to get access from my husband's HP windows laptop and from a Mac at the college. Any ideas?

    http://support.apple.com/kb/HT5621
    In short, you have a problem we can't solve.
    I suggest you contact Apple support and make an appointment to get help.  Expect to pay for it.

  • HT1933 I am unable to access my apple account from my iPad... What could the problem be?

    am unable to access my apple account from my iPad... What could the problem be?

    What happens when you try to access it, and you how are you trying to access it ? If you are getting an error message then what does it say ?

  • 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.

  • Call a component controller methods from a view

    Hi,
    I have created a view v1 with context node c1and binded the context node c1 of it with the component controller so that the values entered in the view v1 are available.
    now can i know how to access this values from component controller context node which i binded in a other view......
    Thanks,
    Prem

    Hi Sayan,
    component : BP_HEAD
    View: BP_HEAD/BPHeadOverview
    I have called event EH_ONPOPUP_CLOSED when popup is closed in view BP_HEAD/BPHeadOverview and i get all the values entered in the popup here using below code.
           lr_context_node = gr_popup->get_context_node( iv_cnode_name = 'ZPOPUPCN' ).
           lr_col_wrapper = lr_context_node->collection_wrapper.
           lr_entity = lr_col_wrapper->get_current( ).
           IF lr_entity IS BOUND.
             lr_entity->get_properties( IMPORTING es_attributes = ls_data ).
           ENDIF.
    now ls_data contains all the data entered in the popup ie. - firstname, lastname, house_no, street, city, postal code, country.....
    now it have tried the below code to map/set the entries with the Account management - individual account creation screen.
    data : ls_header         TYPE crmst_header_object_buil,        " BuilHeader
              ls_header1        TYPE crmst_address_buil,                 " BuilStandardAddress
           ls_header-firstname     = ls_data-zfirstname.
           ls_header-lastname      = ls_data-zlastname.   
           ls_header1-house_no     = ls_data-zhouseno.  
           ls_header1-street       = ls_data-zstreet.      
           ls_header1-city         = ls_data-zcity.        
           ls_header1-postl_cod1   = ls_data-zpostcode.    
           ls_header1-country      = ls_data-zcountry.   
           ls_header1-telephonetel = ls_data-ztelno.        
           ls_header1-e_mailsmt    = ls_data-zemail.
           entity ?= me->typed_context->builheader->collection_wrapper->get_current( ).
           IF entity IS BOUND.
             entity->set_properties( EXPORTING is_attributes = ls_header ).
           ENDIF.
           entity1 ?= me->typed_context-> BuilStandardAddress->collection_wrapper->get_current( ).
           IF entity IS BOUND.
             entity1->set_properties( EXPORTING is_attributes = ls_header1 ).
           ENDIF.
    but the problem is both the entity is INITIAL.

Maybe you are looking for

  • Java Access Helper Jar file problem

    I just downloaded Java Access Helper zip file, and unzipped, and run the following command in UNIX % java -jar jaccesshelper.jar -install I get the following error message, and the installation stopped. Exception in thread "main" java.lang.NumberForm

  • On deploy: java.lang.NullPointerException in WsdlCompleterUtil.isAncestor

    Hello, I downloaded JDeveloper 10.1.3.2.0 and Oracle BPEL PM 10.1.3.1.0 yesterday and built simple BPEL process with one single invoke activity. The BPEL process validates in JDeveloper but on deploy I get following stack trace - Process "ZMFFlow" (r

  • Steps for configuring AXIS framework in SOAP adapter

    hi, can anybody tell me step by step procedure on how to configure the AXIS framework in SOAP adapter Also can anybody suggest me an appropriate scenario where AXIS framework can be used regards, loveena

  • File Permissions Are Ignored

    Hi Maccies, There are several user accounts on my Mac. I have a file in /Users/Shared/ where all (user, group, and others) can read & write; and File -> Get Info also says "you can read and write". In actuality, only when I am logged in as the file o

  • Export functionality not working in R12

    HI, We have some custom forms that we have upgraded to R12. But the export funtionality is not working for these forms. When we open the form, standard funtionality like Menu> Record> Last are not working in R12. Any body can please help in this.