Problems in component controller

Hi Experts
I have a DC named X under ABC Track.I have created another DC named Y under the same track ABC.
I have copied the component controller from DC X to DC Y.I then renamed the component controller in DC Y and also changed all the dependencies referencing previous controller name to new controller name.I have also added all used DCs and referenced  Bapi structures present in the previous DC.
After doing so i repaired the classpath file and rebuilt the DC .I have even closed the DC and opened it.
But i still face errors in component controller like wdThis ,wdcontext cannot be resolved,IPrivate component cannot be resolved.
Can anyone help me on this

Dear Chandana,
If you want to copy component controller from DC x to y. then I think you should copy _Comp folder of DC X.
then open the DC Y project, remove and paste the _comp folder.
You can find the _comp folders under C:\document and setting\<users>\.dtc\......
Best Regards
Arun Jaiswal

Similar Messages

  • CRM component controller problem

    hi guys,
    Can anybody tell me why i'm having this error,
    Clase excepción: CX_BSP_WD_INCORRECT_IMPLEMENT - Controlador de vista o custom se ha implementado con error
    Método: CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING
    Línea texto fuente: 51
    I think it's related to component controller of my z component,(it seems as if the ZL_ZBP_ERP_ZERPORDERVIEW3_IMPL class had no component controller. ) i cannot preview the view i have created due to this error.
    Please it's very important
    Edited by: Jon Azkorra Olano on Jul 5, 2010 2:25 PM

    Hi jesus,
      Bind ur view context nodes with ur controller context node so that again u need not pass the values from view to the controller. Now u have all the values in the controller itself. Now in the controller method set all these values to the model node.
    sample code to set the values from current context to the model node  (where agenda is my attribute and ztrng_Insert_Inputone is my model node that is bound):-
    wdContext.nodeZtrng_Insert_Inputone().currentZtrng_Insert_InputoneElement().setAgenda(wdContext.currentContextElement().getAgenda());
    (previously u should have model node and context node also mapped). Thus once u set all the nodes, u can execute ur bapi now.
    Regards,
    R.S.Sirisha.

  • Access to an attribute of a value node of a component controller

    Hello experts,
    I'm new to the area of SAP CRM Web Client UI development. My problem is probably very simple and you will surely smile about it.
    I have created my own component with the value node FILE (that consists of five atributes) in the component controller. Unfortunately I have not figured out yet how I can access the value of an attribute.
    The first thing I do not know is where I can find the controller-ID.
    In addition, I get an syntax error Field "TYPED_CONTEXT->FILE->COLLECTION_WRAPPER->GET_FIRST(" unknown in the line with "lo_entity = me->comp_controller->typed_context->file->collection_wrapper->get_first( ).".
    Currently no functionality is included in my code, because firstly I want to understand the basics.
    method OP_FILEUPLOAD.
      data lo_entity       type ref to if_bol_bo_property_access.
      data lv_file_name    type string.
      data lr_file_content type ref to data.
      field-symbols <lv_file_name> type string.
      IF ( comp_controller is INITIAL ).
        get_controller( 'xxxx' ).
      ENDIF.
      lo_entity = me->comp_controller->typed_context->file->collection_wrapper->get_first( ).
      while lo_entity is bound.
        lv_file_name = lo_entity->get_property_as_string( 'FILE_NAME' ).
        lr_file_content = lo_entity->get_property( 'FILE_CONTENT_STRING' ).
        assign lr_file_content->* to <lv_file_content>.
        lo_entity = me->typed_context->file->collection_wrapper->get_next( ).
      endwhile.
    endmethod.
    I hope that I will manage my "problem" with your help!
    Sebastian
    Edited by: Sebastian Lenz on Jun 27, 2011 2:35 PM

    Hi Sebastian,
    The issue is in the following line of your code:
    lo_entity = me->comp_controller->typed_context->file->collection_wrapper->get_first( ).
    The 'typed_context' belongs to your own component controller class and not the standard framework superclass. So, you need to replace this single line of code with something as follows (assuming that your component controller class is ZCL_CUSTOM_BSPWDCOMPONENT_IMPL):
    DATA lr_coco TYPE REF TO ZCL_CUSTOM_BSPWDCOMPONENT_IMPL.
    lr_coco ?= me->comp_controller.
    lo_entity = lr_coco->typed_context->file->collection_wrapper->get_first( ).
    The me->comp_controller reference will refer to the standard framework superclass of all component controllers and this does not have any typed_context attribute with it. The real component controller that gets created when you create a BSP component will have this attribute. That is why you need to first cast it to your own reference type before trying to access its typed_context.
    And if your value node will have only single values, then you can as well do the following to access the attribute ATTRIB1 of context node node1:
    DATA lv_value TYPE string.
    lv_value = lr_coco->typed_context->node1->get_attrib1( attribute path = '' ).
    Basically all attributes can be accessed by above code by using the right getter method.
    Regards,
    Shiromani

  • Assistance class not instantiated in the component controller of an ABAP WD

    I have a very weird problem when trying to launch an ABAP webdynpro I get a short dump, looking into it the assitance class does not get instantiated properly so it falls over.  It used to work, but I don't think I have substantially changed anything with the assitance class just on the layout, although something must have changed.
    In the constructor of the component controller it trys to cast (I think that is the correct term)  the assistance class from the compoent controller as below, Me->f_Alter_Ego->assistance_class is initial so that fails, it then tries to create the assistance class and falls over on create object Me->f_Assist.
      try.
        Me->f_Assist ?= Me->f_Alter_Ego->assistance_class.
      catch cx_sy_move_cast_error.    "#EC NO_HANDLER
      endtry.
      if not Me->f_Assist is bound.
        create object Me->f_Assist.
      endif.
    Extract from the short dump below.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "/1BCWDY/4LYS0NWZ8L8ENKKA93YQ==CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
        The following syntax error occurred in program
         "ZCL_WD_USER_MAINT=============CP " in include
         "ZCL_WD_USER_MAINT=============CM004 " in
        line 7:
        "You can only use "class=>method" with static methods."
    Other ABAP web dynpros in our system are fine.
    I have tried the obvious stuff like removing the assitance class from the WD component and putting it back in again.
    There is obviously somehting I am missing can anyone point me in the right direction or has experienced this before?
    Thanks,
    Tim

    Thanks Thomas,
    I could not see the wood for the trees on that one, I had syntax checked the assitance class ZCL_WD_USER_MAINT, however, that error would have been raised at runtime.
    Anyway all sorted now.
    Cheers,
    Tim

  • Custom vs component controller

    i was trying to use component controller instead of custom controller in the Get Flight List application. but it is not working. can any one tell why?
    when do we use custom controller and when component controller?

    Hai vineet,
    For Normal and simple applications you can use Component controller , If you are using complex application that contains more models and more views , you can share the data by using custom controllers,
    can you breifly explain what's your problem is?
    to get the reponses immediately post this thread on Webdynpro for java forum
    regards,
    Naga

  • Component controller is consuming lots of memory

    Hi All,
    I have an WebDynpro application and a component controller (MyCompController) too where I have written most of the business specific code. The basis team informed that the component controller (MyCompController) is consuming lots of memory.
    Could anybody suggest me how to takle this problem. I dont have any other details and I am new to handle this kind of activity.
    Thanks & Regards,
    Patana

    Hi Patana
    Your controller can consume lots of memory because of lots of unnecessary data is loaded in advance and do not used actually. Try to analyze the following points:
    1. Unnecessary data is loaded into the context nodes in advance. Do not load all the data into the context in wdInit() method (do not fill in all the models too). This is not the right way. Instead try to use supply-functions for each context node with data. Supply-function will be called by Webdynpro automatically only when the data is actually required to be shown on UI.
    2. Unnecessary embedded Webdynpro components are created and loaded in memory in advance. Do not create embedded Webdynpro components manually in wdInit() method. Instead try to setup component usages with Create Mode option = OnDemand. Then Webdynpro will create the components automatically when this is really required.
    BR, Sergei

  • 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

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

  • Problem in component usage

    Hi All
    I am using std component HRASR00_EMPLOYEE_SEARCH in my custom comp. i craated view container ui element, and i done embed view. in view i created controller usage in used controllers of view. but when i am trying to execute i am not getting component usage view?? any problem?
    Thanks,
    kris.

    Hi All
    I am using std component HRASR00_EMPLOYEE_SEARCH in my custom comp. i craated view container ui element, and i done embed view. in view i created controller usage in used controllers of view. same part i done in component controller and window controller as well. but when i am trying to execute i am not getting component usage view?? i have to done any initialization for this component? anyone have any idea in this component?? please help me...
    Thanks,
    kris.

  • Reg:Component Controller Deleted

    Hi,
    I am using a DC which when it is builded frequently giving "Out of Memory" error.This has lead to a very serious problem which is "Component controller got deleted".Can anyone tell me the reason for :
    1)How to rresolve "Out of memory" error?
    2)Reason for deletion of component controller?
    Thanks,
    Durga Rao.

    Hi Durga,
    We faced the same problem. But, in our case we were working in a server environment and due to the tight schedule we could not investigate the issue.
    The possible reason for this is the NWDS eats up all the physical memory available.
    You could try and change some of the java (JVM) for the NWDS or incearse the RAM or virtual memory.
    Regards,
    Kartikaye

  • How to get Component Controller getter function

    I have made a mehtod in a component controller (I am trying to make a web dynpro which uses a webservice). Now I want to use it from my View but I cannot find out how.
    According to some examples I've seen there should be a function like wdThis.wdGet<comp> in the View, but I don't have such a function....:-(

    Hi Jan,
    I think that you must not have made the <b>Delta link</b> of the component Controller with the View. if you would have made the link then definately you would have got the access from the View to teh controller.
    <b>Just go to the Component -> (Select you component)-> (Right Click) -> Open data Moduler.</b>
    A Data Moduler Screen will come. Select the <b>Create Delta Link</b>. And and drag the link from the view to the component controller.
    This should definately solve your problem.
    Regards
    Pravesh
    PS: Please consider rewarding points if helpful or solved.

  • Using popup in Component controller

    Experts,
    I would like to use the create_popup_to_confirm method in component controller so i could reuse them in other views. The problem i have is the "subscription to the button event". I am assuming the subscription should be done at the view level but how do i link it to the "button_kind" which is at the controller level ?
    Thanks
    ASujo

    For the susbscribe to button event  action should be aexisting in one view. and that you need to assign.
    you can assign it in comp controller also.
    but actions you have to create in the view.
    and for reusing the function for creating pop up, create some parameter in it
    like 1. for view controller
          2. for action names.
    then assign the buttons to the events using these paramters.
    thanks
    sarbjeet singh

  • ALV and component Controller Context.

    Good morning experts,
    i use an alv to display a context from the component controller. The ALV is editable.
    My problem now is that changes to the ALV never reach the node.
    Where are my changes and what must i do to write them to the node.
    Thank you and best regards
    René

    Hi Rene,
    You need to create an event handler method (say for example CHECK_DATA_CHANGE) for the event ON_DATA_CHECK of the ALV.
    You would have to first call the DATA_CHECK method of the ALV component. This method checks if any data has changed in the ALV and then triggers the ON_DATA_CHECK event if it finds that something has changed in the ALV. Create an eventhandler method for the ON_DATA_CHECK method and within this method write the code for modifying the context attributes to reflect the new ALV data.
    Call this DATA_CHECK method from WDDOAFTERACTION so that whenever any action is performed the system would check if any data has changed in the ALV & then eventually execute your eventhandler method resulting in the context node getting updated. Hope that this is clear for you now.
    method WDDOAFTERACTION .
      DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      lo_interfacecontroller->data_check( ).
    endmethod.
    Regards,
    Uday

  • Component controller being used instead of cust controllers

    Hi masters
    I have to maintain an application developed by another consultant. He put all the business logic, all the methods etc inside de component controller instead of create cust controllers, is it a problem ?

    which best practice says that?
    following is from JA310 training material.
    >Before implementing a custom controller, consider carefully whether its presence will simplify or
    >complicate the overall architecture of your application. Custom controllers should only be added in
    >situations that will optimize or simplify the architecture of your application.

  • Open window code in Component controller

    Hello,
    My requirement is to show the pop up window for search help which is reuseble for all view.for that i have created one method in component controller which can be used by all view.
    I have created one window "TEST_WINDOW" and embedded a view name as "TEST_VIEW".
    By following code window is opened properly but after adding  subscribe_to_button_event method i m facing null pointer error.
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window       TYPE REF TO if_wd_window.
      DATA l_api type ref to if_wd_view_controller.
      lo_api_component  = wd_this->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window   = lo_window_manager->create_window(
                         window_name            = "TEST_WINDOW"
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                         button_kind            = if_wd_window=>co_buttons_ok
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok
    lo_window->open( ).
    I have added following code.Code for "ok" button action .Code created  'a_selected_material' action is properly created in TEST_VIEW view but null pointer is getting in this line lo_window->subscribe_to_button_event(
    lo_window->subscribe_to_button_event(
                   button            = if_wd_window=>co_button_ok
                   action_name       = 'a_selected_material'
                   action_view       = l_api
                   is_default_button = abap_false ).
    Please help me out for this issues.
    Thanks & ragards
    Abhilasha Dahare.

    Hello all,Thanks for your reply.
    My problem is solved.I created on context attribute VIEW_ID of type if_wd_view_controller.
    i get the reference from view from method wdmodify view.
    DATA: lo_api TYPE REF TO if_wd_view_controller.
      IF first_time = 'X'.
        lo_api = wd_this->wd_get_api( ).
        DATA lo_nd_view_details TYPE REF TO if_wd_context_node.
        DATA lo_el_view_details TYPE REF TO if_wd_context_element.
        DATA ls_view_details TYPE wd_this->element_view_details.
        DATA lv_view_id LIKE ls_view_details-view_id.
        lo_nd_view_details = wd_context->get_child_node( name = wd_this->wdctx_view_details ).
        lo_el_view_details = lo_nd_view_details->get_element(  ).
        lo_el_view_details->set_attribute(
          EXPORTING
            name =  `VIEW_ID`
            value = lo_api ).
      endif.
    and pass this context for subscribe_to_button_event method as follow.
      DATA lo_nd_view_details TYPE REF TO if_wd_context_node.
      DATA lo_el_view_details TYPE REF TO if_wd_context_element.
      DATA ls_view_details TYPE wd_this->element_view_details.
      DATA lv_view_id LIKE ls_view_details-view_id.
      lo_nd_view_details = wd_context->get_child_node( name = wd_this->wdctx_view_details ).
      lo_el_view_details = lo_nd_view_details->get_element(  ).
      lo_el_view_details->get_attribute(
        EXPORTING
          name =  `VIEW_ID`
        IMPORTING
          value = lv_view_id ).
    * creating ok button
      lo_window->subscribe_to_button_event(
                 button = if_wd_window=>co_button_ok
                 action_name = 'A_SELECTED_ROW'
                 action_view = lv_view_id
                 is_default_button = abap_true ).
    and for  Action &OBJECT_ID& does not exist  error i change method name in caps before that i wrote method in small case.
    Thanks alot
    Abhilasha Dahare

Maybe you are looking for