View_Controller in methos of componentcontroller

Hi all,
how can i define buttons in an method of an componentcontroller ?
lr_api_comp_controller = wd_this->wd_get_api( ).
    lr_window_manager = lr_api_comp_controller->get_window_manager( ).
*   POPUP Window vorbereiten
    lr_popup = lr_window_manager->create_window(
    modal               = abap_true
    window_name         = 'W_SAVE' 
    title               = 'Speichern der geänderten Daten'
    close_button        = abap_true
    button_kind         = if_wd_window=>co_buttons_okcancel
    message_type        = if_wd_window=>co_msg_type_question
    close_in_any_case   = abap_true ).
*   Buttons definieren und deren Aktionen
    lr_view_controller = wd_this->wd_get_api( ). "Here is the Problem
    imp_view_controller = wd_this->wd_get_api( ).
    lr_popup->subscribe_to_button_event(
    button = if_wd_window=>co_button_ok
    button_text = 'Seichern'
    action_name = 'CHANGES_YES'
    action_view = lr_view_controller ).
    lr_popup->subscribe_to_button_event(
    button = if_wd_window=>co_button_cancel
    button_text = 'Nicht speichern'
    action_name = 'CHANGES_NO'
    action_view = lr_view_controller ).
*   POPUP Window aufrufen
    lr_popup->open( ).
Errormessage:
The result of the functional method isn't possible to convert to the type to LR_VIEW_CONTROLLER.
Other method "CREATE_POPUP_TO_CONFIRM"  throws the same error.
Any idea ?
Thanks in avance.
--Bernd
Edited by: Bernward Henkel on Sep 6, 2010 4:07 PM

HI,
As you are creating a window pop up you will always have an option top create buttons in the view embded in the window which is used for pop up.
Instead of standard buttons use the buttons created by you in the vie. Remove the standard buttons.
To rmove the standard buttons :
pass button_kind = if wd_window=>CO_BUTTONS_NONE in the create window method
on the buttons palced in you view write the code such that you call the component controller methods to update the data.
If you do it in the way in thaty case no need to subscribe to the button events.
Regards,
Madhu
Edited by: madhu reddy on Sep 7, 2010 10:52 AM

Similar Messages

  • Session method and call transaction methos which one is the sap recomonded

    hi
    PLease give me the answer to these questions.
    session method and call transaction methos which one is the sap recomonded why .
    2) if we want to maintain BDC program in all the systems.wt to d0

    Hi Revethi,
    Here is the difference between the Session and Call Transaction method.
         Session
    Session method supports both small amount of data aswell as large amount of data
    2) data processing is asynchronus and data updation is synchronus.
    3) it process multiple apllication while perfomaning validations.
    4) in session method data will be updated in data base only after processing session only.
    5) system provide by default logfile for handling error records.
    6) it supports both foreground aswell as background process
    in bdc we use FM ... bdc_open_group " for creating Session
    bdc_insert " adding transaction and bdcdata table for updating database
    bdc_close_group " for closing Session
          Call Transaction
    Call transaction exclusively for small amout of data
    2) it supports only one apllication while perfoming validations
    3) there is no default logfile, We can explicitly provide logic for creating logfile for handling error records.
    we can create logfile by using structure....BDCMSGCOLL
    4) it doesn't support background processing.
    5) data processing is synchronous and Data updation is Synchronous( default), in
    this method also supports daya updation in asynchronus process also.
    Syntax:
    Call transaction <transaction-name> using BDCDATA
    mode <A/N/E> update <L/A/S>
    messages into BDCMSGCOLL.

  • How can i call a bean methos using h:commandlink or h:commandButton?

    Hi
    i want to call a methos in the bean class throught h:commandbutton action
    my code is
    <h:commandLink action="#{sample.tryStuff1}" immediate="true" rendered="true">
    <h:outputText value="add" />
    </h:commandLink>
    <h:commandButton id="ad"
    action="#{sample.tryStuff1}"
    immediate="true"
    value="add"
    type="SUBMIT"/>
    what does immediat do here
    i am trying both ways but its not calling the methosd.
    what am i doing wrong?
    my config file
    <managed-bean>
    <description>sample</description>
    <managed-bean-name>sample</managed-bean-name>
    <managed-bean-class>com.actsys.web.sample</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    please help
    thansk in advance

    have you tried the following?
    <h:commandLink value="add" action="#{sample.tryStuff1}"  />Also, it might be good to know if you are actually getting to the action method tryStruff1, what does sys.out show if you have it in the first line of the action method?
    If you are getting to the action method, then there is probably an issue with your navigation handler.

  • How to call View Method from ComponentController ?

    Hallo Experts,
    Is there a possibility to call a method of View(Controler) from the ComponentController ? Component is still the same.
    Greetings
    Wojciech

    Hi Wojciech,
    as already said by Gopi, the methods of the view should not be called outside the view! Of course you could store a reference to the view inside the comp_controller, but the right way is to inform the the views in case of changes! Just use events to notify view about changes and trigger changes inside the event-handler (which are inside the views).
    Best regards,
    Stefan

  • How to call view-controller method out of componentcontroller

    Hello all,
    my component implements a component-interface with method BACK.
    Thus my componentcontroller has the interface Method BACK.
    When triggering BACK from an foreign component, the implementation within the componentcontroller is called. So far so good.
    Now I want to POPUP_AND_CONFIRM when BACK is hit. But this POPUP_TO_CONFIRM requires me to create an action. But I can't create an action within the componentcontroller.
    I could realize the POPUP_AND_CONFIRM within the components view. But how can I call a view-method out of the componentcontroller?
    Or does anybody have a better solution? (Maybe I could implement BACK within the view, but how to connect the componentcontroller-back-method with the views back-method?)
    Thank you very much in advance...
    Regards
    I. Durmaz

    You should never attempt to call view methods from outside the view.  It is possible to register popop event handlers to methods of the component or custom controllers.  From the online help:
    For a few special cases it is useful to register event handlers for component controllers or custom controllers on the button events of a dialog box. For these cases, a special POPUP_TO_CONFIRM attribute of type IF_WD_POPUP_TO_CONFIRM_N has been implemented in the IF_WD_WINDOW interface. This interface provides precisely the methods with which event handlers for component and custom controllers can be registered on events of the dialog box.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/47/b9487e01602fe2e10000000a42189d/frameset.htm

  • Risk analysis in GRC 10 error "Subnode COMPONENTCONTROLLER.1.SEARCH.RESULT"

    HI
    We have configured Risk analysis application within GRC 10. Also have executed the sync jobs. Now when i try to do SOD analysis i am getting an error "FPM application started without configuration" . this comes even before opening the link to SOD analysis is even open and this error comes for all type of SOD analysis like for user and role and HR object.
    I check the logs file and in logs system is complaing that "Subnode COMPONENTCONTROLLER.1.SEARCH.RESULT_TABLE" does not exist.
    Any idea why we getting this error message?
    Parven

    HI
    Connector is working fine as sync jobs are running perfectly.
    we have done the mimimum configuration setting as suggested by SAP guide ie Parameter 1023, 1024,1025 and 1026
    For activating BC sets i think we need to do that only when you using out of box SOD rules. In our case we are using customised SOD rules. So i think we dont need to activate the BC set.
    any other suggestion
    Parveen

  • How to get OutboundPlug from Window in ComponentController?

    Hi @ll,
    I have a WebDynpro Compoment Controller and I like to fire the OutboundPlug "CloseWindow" (Type: Exit) in one of my method in the ComponentController? I created my OutboundPlug in the window component and assigned also in my Interface View.
    So the Problem is, that I didn't get the choice to select OutboundPlug in ComponentController.
    My expectation is to close the window.
    Could somebody help me?
    Thanks a lot.
    BR
    Armin

    Import them as you would from any digital camera.
    http://manuals.info.apple.com/enUS/iPod_touch_iOS4.1_UserGuide.pdf

  • About create a new find() metho in cmp Ejb.

    I have created an Entity CMP from a table (with JDeveloper9irc) mapped to the emp (employee) table in the SCOTT schema. And I want to creat an other new find metho such as find_by_field_name1(....) .
    How to do?

    This aint a Bug.. to get Jan 29 as a required date you need to write:
    var day:Date = new Date(2009,0,29);
    The second parameter should be '0' instead of '1' to get any date in the month of Jan
    Let me know if it helps

  • Access to context of COMPONENTCONTROLLER (ABAP)

    Hello,
    I need to access componentController from one of the view that I have.
    How can I do it?
    Thank you.

    WD_COMP_CONTROLLER
    is declared automatically
    and is available in all methods.
    so WD_COMP_CONTROLLER->method is possible.
    Use code wizard to add. Simple ...
    If you want access to the context of controller,
    the either create a method in the controller that
    reads the controller context and call that method as above
    or better, just map the context in view to the component
    controller so that data is automatically copied to local view context.
    Regards
    Phil

  • Call View Method from Componentcontroller?

    Hello @all,
    how can i call a view method from the componentcontroller?
    Regards
    Chrisp

    Hi Chrisp,
    Which method of the view you want to call from component controller. It is always better to create methods in component controller or custom controller to use in different views that inhance perfomance for views.
    Hope it helps
    Regards
    Arun

  • Call view method from componentcontroller method

    hello,
    how can i call a view method from componentcontroller method?
    thanks
    marcus

    Hi Marcus,
    As you said instance of view is already there when you are creating component controller's instance. So you work is done. You have to have event handlling mechanism.
    1. Create an event in your componentcontroller (Used component).
    2. Have a interface method in the same component controller. Now from you component you can call this method right.
    3. In the implementation of this interface method fire the event which you have created in step 1.
    4. Write eventhandler for this compnent's event in the view where actuall method is.
    So the moment u will call interface method of component it will fire component's event and it turn this event will be caught by the event hadler u have written in view.
    5. Now in implementation of this view's eventhandler call the view's required method.
    And job is done.
    Only thing event hadler of view will work only in case view is initialized in memory. As you said you have the view instance so no probs..
    Ask in case of any doubt.
    Regards,
    Neha Modi

  • OOABAP-How to access the protected methos from a class

    How to access the protected methos from a class..There is a built in class..For tht class i have created a object..
    Built in class name : CL_GUI_TEXTEDIT
    method : LIMIT_TEXT.
    How to access this..help me with code

    hi,
    If inheritance is used properly, it provides a significantly better structure, as common components only
    need to be stored once centrally (in the superclass) and are then automatically available to subclasses.
    Subclasses also profit immediately from changes (although the changes can also render them invalid!).
    Inheritance provides very strong links between the superclass and the subclass. The subclass must
    possess detailed knowledge of the implementation of the superclass, particularly for redefinition, but also in
    order to use inherited components.
    Even if, technically, the superclass does not know its subclasses, the
    subclass often makes additional requirements of the superclass, for example, because a subclass needs
    certain protected components or because implementation details in the superclass need to be changed in
    the subclass in order to redefine methods.
    The basic reason is that the developer of a (super)class cannot
    normally predict all the requirements that subclasses will later need to make of the superclass.
    Inheritance provides an extension of the visibility concept: there are protected components. The visibility of
    these components lies between that of the public components (visible to all users, all subclasses, and the class itself), and private (visible only to the class itself). Protected components are visible to and can be used by all subclasses and the class itself.
    Subclasses cannot access the private components  particularly attributes) of the superclass. Private
    components are genuinely private. This is particularly important if a (super)class needs to make local
    enhancements to handle errors: it can use private components to do this without knowing or invalidating
    subclasses.
    Create your class inse24 and inherit this CL_GUI_TEXTEDIT
    class in yours. You can then access the protected methods.
    Hope this is helpful, <REMOVED BY MODERATOR>
    Edited by: Runal Singh on Feb 8, 2008 1:08 PM
    Edited by: Alvaro Tejada Galindo on Feb 19, 2008 2:19 PM

  • Read context of window in componentcontroller

    Hello colleagues,
    we have the requirement to read an application parameter (user_id) from an iView in our WDA-component. I followed the steps provided in this thread :
    Webdynpro ABAP url-parameters
    Now I'm able to read the context of the correponding user-attribute of the window in method handledefault. Furtherone we would like to use the userid in the componentcontroller but currently I got stucked by reading the context in a method (f.i. wdoinit) of the componentcontroller even I mapped the context of the window in the componentcontroller. Is there a limitation that the context of a window can not be read in the componentcontroller?
    Thanks in advance
    Michael

    Hi,
    If u have an attribute and u can read by this code from the component controller in any method u create
    wdThis.wdGetContext().currentContextElement().getAttributeAsText(IPrivate<View Name>.IContextElement.<Attribute name>);
    To pass parameter between applications follow this thread
    interapplicationnavigation:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial%20on%20inter-application-navigation%20-%2015.htm
    Regards,
    Vijayakhanna Raman

  • How to view COMPONENTCONTROLLER interface 's implement class

    Every WDA has COMPONENTCONTROLLER  ,and it has  interface, How to view class implemented this interface?

    >
    Abhimanyu Lagishetti wrote:
    > WDA is stored as meta data, there are no objects generated in the system when you activate your web dynpro component, the classes are generated at runtime only
    >
    > Abhi
    Actually that's not true.  The interfaces get built as you are editing the component and compile like any other class when you activate. They are just hidden from the class builder to keep people from messing around with them directly and to keep from cluttering up the object navigator. They have to be built as you go otherwise SAP would have had to build a special syntax checker and code parser for the ABAP Code Completion for WDA (which we didn't do).
    You can view the interfaces however.  There is a button on the toolbar (or you can press CTRLSHIFTF1 or the menu path GOTO->Controller Interface).
    http://www.flickr.com/photos/tjung/2740591187/
    It displays the interface in a dialog window:
    http://www.flickr.com/photos/tjung/2741429324/
    Also in ABAP 7.1 and higher, the interace is also visible via the code completion via the implementation of the interface in WD_THIS.
    http://www.flickr.com/photos/tjung/2740610915/

  • How to change generation date of absence quota with Time Evaluation methos

    Hi all,
    IS there any way to change generation date when TIme Evulation generate absence quota?
    Currently system will use last day of month as generation date, Validity and Duduction period set correctly.
    Base entitlement relate with Monthly,
    Accrual period setting in selection rule is Month
    Example: system generation absence quota in PT60 with 1 day Normal Leave Entry date 31.06.2011
    Valid from 01.06.2011 to 31.12.2012 ; Deduction from 01.06.2011 to 29.02.2012 (extras 2 month)
    Can we change ENtry date to 28.06.2011 , because in the last day of month they did not yet have quota but they need it for advance (approver from his/her Manager) ...
    Thanks,
    R1V

    Hi,
    The best way i think is to have negative deductions for the quota.
    This time as it is on 28 you want to push it to 2 days earlier and later if there is another person with a day as 25, you need to again change the generation date isnt it.
    Instead, if you have the negative deductions, you need not worry about the generation date.
    Hope this helps.
    Cheers,
    LG

Maybe you are looking for

  • Reporting a problem with firmware and secondary ca...

    Hi there, I would like to report a problem with the 202.12.11 firmware for the Nokia E75. My secondary camera works fine with the normal camera application until I make a video call. The picture for the video call using the secondary camera is just w

  • No iView available

    Hi I am having an issue with the Enterprise Portal, whenever I click on the Purchaing documents under purchasing tab, I get an error "no iView available for system "SAP_ERP_Procurement": object "purchaserequisition".. The Portal is connected to SRM a

  • Limiting the number of threads that are created

    I am trying to write a web crawler as a way of learning about multi-threading and I have hit a stumbling block (probably my design). The way the application I have started works is that I provide a single URL, which is passed to a thread and that thr

  • Mail.app 3.6 won't connect to my POP3 server over a proxy

    I updated to 10.5.7 the other day, and now Mail.app will not connect to my POP3/SMTP server via my proxy. This is a big problem for me as I work remotely a lot. My setup - I use Proxifier (www.proxifier.com) and an SSH proxy so I point my Mail.app at

  • Micro Sim cards in Italy and India

    I am going abroad from the UK and want use my IPad1 can anybody recommend a sim card for Italy (Venice short of WiFi cafes, sensibly) Plus India in January