How to handle events in webdynpro abap

Hi,
can any body explain how to handle the events in webdynpro abap.
i want to know some concepts in general.
Thanks,

Hi Mahesh,
you can create event handlers under the actions tab in you view. evry event handler has an importing parameter wdevent of type ref to cl_wd_custom_event.
you can also create events in your component controller and they can be handled within your views
check cl_wd_custom_event class for details about what all information you get when an event occurs.
for further details you can check out the following links
http://help.sap.com/saphelp_nw04s/helpdata/en/eb/ed6f4169e25858e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/a9/c751415e3b6532e10000000a1550b0/frameset.htm
also you can try the tutorial at the following link for further clarity
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2eb11b59-0a01-0010-dfa3-8292abdf9c4f
Regards,
Shweta
Message was edited by:
        Shweta R Shanbhag

Similar Messages

  • How to handle Events in OO abap.

    Hii all as im new to SAP and  ABAP , i want to know , what are events all about and how to handle events?
    Like how to guide double click to call a transaction , or to create a hot sopt and then , calling the transaction...........
    Please Help.

    Hi Chandan,
    possibly you are not just new to ABAP but new to obeject oriented programming in general. In oo, you use events to trigger methods that are registered as 'listeners' for the event.
    As I have no idea on your current knowledge, I don't know what I could recommend to start with.
    My personal approach is first to have a task I want to complete and then find and understand the methods to get there.
    Regards,
    Clemens

  • How to exit from a WebDynpro ABAP application and open another url

    Hi Friends,
    How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button?
    Regards,
    Xavier

    Hi,
    First of all you should create outbound plug in the window you are trying to exit with plufg type "Exit"
    Then create method handler in the view with this code
            data lo_view_cntr type ref to if_wd_view_controller.
            data lo_win_cntr type ref to if_wd_window_controller.
            data: l_parameter_list type wdr_event_parameter_list,
                  l_parameter type wdr_event_parameter,
                  l_val type ref to data,
                  l_val_url type REF TO data.
            field-symbols: <fs> type any,
                           <fs_url> type any.
            lo_view_cntr  = wd_this->wd_get_api( ).
            lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).
            CREATE DATA l_val type c.
            CREATE DATA l_val_url type string.
            ASSIGN l_val->* to <fs>.
            ASSIGN l_val_url->* to <fs_url>.
            <fs> = 'X'.
            <fs_url> = 'http://your-link.com'.     
            l_parameter-name = 'URL'.
            l_parameter-value = l_val_url.
            INSERT l_parameter INTO TABLE l_parameter_list.
            lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING plug_name = 'EXIT_PLUG'
                                                                    parameters = l_parameter_list ).
          You can easily change this logic to exit application instead of redirecting to the site
           just changing to
           l_parameter-name = 'CLOSE_WINDOW'.

  • Portal Eventing in Webdynpro ABAP

    Hello,
    I am trying to implement Eventing in Webdynpro ABAP using 2 components ,Com1 serving as the source component and Com2 serving as Target. In Com1 I created a Inputfield and a button ,and then tied an action to the button and called the FIRE method of the IF_WD_PORTAL_INTEGRATION and sent the value in the Inputfield as the eventing parameter.
    In Com2, i subscribed to the event in the wddoinit() method and then defined an action for the same and got the parameter value sent in the Com1 and set the value in the context attribute in the Com2 which is bound to the inputfield.
    But still the value sent in Com1 is not displayed in the Com2 Inputfield.
    Any help would be highly appreciated.
    Thanks.

    >
    SAPEPDeveloper wrote:
    > Hello,
    >
    > I am trying to implement Eventing in Webdynpro ABAP using 2 components ,Com1 serving as the source component and Com2 serving as Target. In Com1 I created a Inputfield and a button ,and then tied an action to the button and called the FIRE method of the IF_WD_PORTAL_INTEGRATION and sent the value in the Inputfield as the eventing parameter.
    >
    > In Com2, i subscribed to the event in the wddoinit() method and then defined an action for the same and got the parameter value sent in the Com1 and set the value in the context attribute in the Com2 which is bound to the inputfield.
    >
    > But still the value sent in Com1 is not displayed in the Com2 Inputfield.
    >
    > Any help would be highly appreciated.
    >
    > Thanks.
    Hi I assume the following, please correct me if my understanding is not correct.
    1.First of all you try this in Portal.
    2.The moment you fire the event, the comp-2 view is active and subscribed to the portal event.
    If the above are true then tell me if the portal eventing enter into the action ?Have you checked in bebug that your action is triggerred on portal_event ?
    If portal event is action handler is called then if you have a importing parameter portal_event_parameter then your input value should be there.

  • How to use messages in WebDynpro-ABAP

    Hi,
        How to use messages in WebDynpro-ABAP.
    Does it has any class to manage messages like IWDMessageManager or we can just use standard SAP Message types.. like E,W,X,I,S..
    I hope it have a message container to display messages.
    Thank U for Ur time.
    Cheers,
    Sam

    Hi Sam,
    U can hard code the message or u can use the Assistance class's text elements to store the messages.
    1) Code to display hard coded message:
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = "Enter the correct Connection ID"
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    2) Code to display message from text element of assistance class:
    lv_text = wd_assist->if_wd_component_assistance~get_text( key = '002' ).
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = lv_text
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    Where Message "Enter the Correct Connection ID" is stored in Text Element with key '002'
    Hope this helps,

  • How to upload file in webdynpro abap alv

    Hello Friends,
    how to upload file in webdynpro abap alv
    Regards
    Narendra
    Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
    Edited by: Thomas Zloch on Jun 6, 2011 11:55 AM

    Hi Narendra,
    You ahve to search before posting. This discussed many times.
    You need to use file upload ui element to upload data. and display in alv.
    Please go thorugh this..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    Re: Upload .xls file in WDABAP
    http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
    Cheers,
    Kris.

  • Javascript server events in webdynpro ABAP

    I am migrating an existing BSP application to webdynpro abap. Few of sections, in existing BSP application, uses java script coding to trigger few server events. For example it uses a flash charts on click of which some filtering logic is written on table. Similar logic needs to be placed for webdynpro. I used Iframe to display this charts. Charts are rendered properly but I am not able to raise the actions or trigger events on server as I don’t have access to parent.document object of my parent view.
    I get access denied/ permission denied error.
    Can’t we trigger server action or event using JavaScript from child IFrame.
    With Regards,
    Nitesh Shelar.

    Hi Nitesh,
    Integrating custom java script is not supported. There are still a few benefits BSP has over WDA. Well, you could put the flash object inside of a BSP application and use portal eventing to communicate with WDA.
    Best regards,
    Thomas

  • Jnet events in Webdynpro ABAP

    Hi ,
    I am urgently looking for the demo WD project in Webdynpro ABAP which demonstrate use of the different events for JNet for example :: CELLS_SELECTED , ROW_SELECTED , NODE_SELECTED .

    Hi Nitesh,
    Integrating custom java script is not supported. There are still a few benefits BSP has over WDA. Well, you could put the flash object inside of a BSP application and use portal eventing to communicate with WDA.
    Best regards,
    Thomas

  • How to handle Event in JACOB API

    Hi,
    I am read the outlook mail using JACOB[Java Com Bridge] API successfully, now i want to handle events for outlook mail using JACOB. and also i can able to catch the new mail event. but i am unable to catch any deleted mail and move mail from one folder to another folder. This is extremely important for my project. so any one please tell me how to handle and catch the Outlook deleted event and move event using JACOB.
    Thanks in Advance,
    With Regards,
    Ganesh

    Windows can be closed in a number of ways and the simplest way to trap them would be to handle Window Closing in code behind.
    This is also the easiest way to show dialogs if that's how you wanted the warning message to appear.
    This:
    chxAllowToClose.IsChecked
    Looks like a checkbox to me, seeing as you have IsChecked.
    That presumably means you already have that bound to a viewmodel and visible to the user.
    You can therefore just test that value from the view.
    If you prefer to hide that instead then there are several options.
    You could have a dependency property and a binding in code behind which binds to the viewmodel. Test that in your event.
    Or
    You could save the value when it changes to application.current.resources.  Since dependency properties and bindings are a bit wordy this is easier.
    Or
    You could have just a variable in the view code behind and use messenger to tell that when the value changes from the viewmodel:
    http://social.technet.microsoft.com/wiki/contents/articles/26070.communicating-between-classes.aspx
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • How to create Radiobutton in webdynpro abap

    Hi experts,
    I am new to webdynpro abap.I have been given 1 scnario in webdynpro abap to develope:the scnario is as follows:
      In first screen there are n no of user are present, i hv to select any user using radiobutton then that user will  able to write some text or message in second screen or view( i hv to decide where user can write text or message).similarly other user which has been selected by radiobutton will able to write text in screen or view belongs to them respectbly. Then if user click on save or delete button the text should be saved or deleted from ztable.
                                                      I think i hv to create TEXTVIEW or TEXTEDIT so that respective user can write text or message in their view or screen. Please suggest me how to prossed.How to create TEXTVIEW & TEXTEDIT & what is its use.
    Secondly please give me steps to create Radiobutton in webdynpro abap.
    Thanks In advance,
    Sanjay

    Hi,
    Refer the Standard comp : wdr_test_events . View - Radiobutton.
    SAP Online help : http://help.sap.com/saphelp_erp2005/helpdata/EN/c0/e8884118aa1709e10000000a155106/frameset.htm
    For TextView and TextEdit :
    Refer this  : http://help.sap.com/saphelp_erp2005/helpdata/EN/6a/a6884121a41c09e10000000a155106/frameset.htm.
    This will give a clear idea with diagram about both these UI element.
    Edited by: Saurav Mago on Aug 21, 2009 8:35 AM

  • How to handle event when the user closing the browser (Urgent Please)

    Hi,
    How to handle the event when user closes the browser....
    i want to display some alter message when user trying to close the browser...
    Please can any one help me how i have to do this...........
    Thanks.

    Finally got this working. You cannot use the stop() or destroy methods. By the time they are called all database connections are gone and you will get a null pointer exception.
    You will have to use the onBeforeUnload method in the html file that calls the applet and use JavaScript to call the save method in java which saves the document:
    <SCRIPT LANGUAGE="JScript" TYPE="text/javascript">
    function Save()
    //i call the applets doSave() method from here in which i save all
    //changes to the database
    top.Tree.document.TestApplet.doSave();
    //this will invoke the default IE message for closing the window
    //when user clicks on the x in the browser
    message = "Your document has been saved."
    return message;
    window.onbeforeunload=Save;
    </SCRIPT>
    //the applets doSave()
    public void doSave()
    //this frame provides user with the message that document is being
    //saved
    final JFrame frame = new JFrame("Saving");
    JPanel contentPane = new JPanel();
    JLabel label = new JLabel(" Please wait, saving document...");
    frame.getContentPane().add(label,BorderLayout.CENTER);
    frame.setSize(250, 100);
    frame.setLocation(300, 400);
    frame.setResizable(false);
    frame.setVisible(true);
    frame.addWindowListener(new WindowAdapter()
    //the frame is just for user's information, so prevent user from
    //closing it or iconifying it.
    public void windowClosing(WindowEvent e)
    frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    public void windowIconified(WindowEvent e)
    frame.setState(frame.NORMAL);
    //call my saveDocument() method that saves everything to the database.
    editorModule.saveDocument();
    //System.out.println("finished calling saving document");
    //once the saving is done the frame with the message disappears
    frame.setVisible(false);
    //System.out.println("setting frame to false");
    //I also had an exit button in my applet, that would perform the same task, however now with the above onBeforeUnload method, the exit message would appear twice, so had to modify my exit button action performed, so that if the exitbutton was clicked the onbeforeunload method would get passed a null value and not do anything.
    private void exitButton_actionPerformed()
    if (DEBUG) System.out.println("Calling exit");
    doSave();
    window.eval("this.onbeforeunload=null;");
    window.eval("top.close();");
    //continue from here if user cancels the closing of the window
    window.eval("this.onbeforeunload=doSave;");
    window.eval("top.focus()");
    window.eval("document.TestApplet.requestFocus()");
    homePanel.requestFocus();
    }

  • How to handle events in Swng

    Hi!
    I would like to know which one of the following is the best way to handle events in Swing application.
    Method 1
    Write annonymus inner classes in the same class
    Method 2
    =======
    Write a seperate class which extends the adapter class of the event handling and create an object of that in the main class and assign it to the components with addActionHandler() method.
    I am trying to use the second one and I have the following design issue.
    I have a class frmMain.java in which I have a frame and to that frame I am adding a panel which consists of 'N' No. of components.
    I want to make this panel added to the frame when I click on a menu item (login) and want to remove the panel from frame when I click on a menu item(logout).
    I have a main class called Application.java where I create the object of my frame(frmMain.java).
    Thanks in advance,
    AV

    1. Your JFrame is now subject to receive action events from anywhere. You will have to be more careful that you respond only to the right events.
    2. If you have a lot of possible consequences to an event(for example, based on button pressed), you'll need a long if...then...else statement to determine what to do based on the source of the event.
    3. With individual ActionListener classes, it's easier to add the same listener to multiple components and no need to worry about source.
    4. Kind of the same thing: With individual classes, the event and its consequences are so tightly coupled.
    End preaching....basically, my style boils down to what I call the tool set vs Swiss army knife rule. Java seems designed around the concept of a large number of specific purpose classes vs a smaller number of multi purpose classes and I think its a design methodology that makes sense, because I believe strongly in functional isolation in my code.

  • How to use Webservice in Webdynpro ABAP?

    I tried searching option for importing WSDL file in WebDynpro ABAP. But I am unable to upload it in my component. In service call wizard I can see only one option i.e. to import Function module.
    We cant use Webservice in ABAP webdynpro?
    Thanks
    Nitesh Shelar

    Thanks Rich for quick answer.
    But my problem is, I have a stand alone WAS without any RFC Function modules and dictionary structures, of backend R/3, on WAS which I wanted to map in my component.
    I strongly believe that in case of stand alone WAS I need to have at least backend dictionary structures to begin with my design. I can’t use wizard, as I don’t have function modules on this system. I have to code for that manually..
    So that is why, I was looking for Webservice option..
    Thanks,
    Nitesh Shelar.

  • How to call webservices in webdynpro abap

    Hi Experts,
    My requirement is I have to call an URL by exporting an XML file to that URL I have to import an XML file again i .e nothing but I have to send  request file in the form of XML and need to get response in the form of XML file from the URL .This total execution should be finished by clicking a button in webdynpro ABAP.
    Regards,
    Satya.

    Hello Satya,
    You may try to find the sample code as follows:
    1. Goto Transaction se80
    2. Select "package" --> enter "SWDP"
    3. goto "embedded packages" -->  "SWDP_DEMO" --> Web Dynpro
    Here, you will get demo applications. Find the most appropriate demo application and try to customize the code according to your requirement.
    Best Regards,
    Raju MJRK

  • How to handle events between two custom components?

    Hi ,
         i want to handle events between two custom components, example if an event is generated in one custom component ,and i want to handle it any where in the application.....can any one suggest me any tutorial or meterial in this concept...
    thanks

    Events don't really go sideways in ActionScript by default. They bubble upward. If you want to send an event sideways, you will probably have to coordinate with something higher up in the event hierarchy. You can send the event to a common ancestor, and then pass it down the hierarchy as a method argument.
    Another option is to use a framework that supports Injection. There are a number around these days. The one I'm most familiar with is Mate, which allows you to handle events and inject data in MXML. Mate is meant to be used as an MVC framework, and you may want to look into it if your application is complex, but you can also use it to coordinate global event handling if you don't need that level of structure.

Maybe you are looking for

  • Macbook White 13'' Top case cracks

    Hi. I am using Macbook White 13'', late 2009 model, it has got two cracks on the top case (behind the display) on the right and left side, that seems to be a manufacturing problem because I have seen the same cracks on my friends laptop. Can anyone t

  • IPhone not sending iCloud iCal invites to MobileMe iPhone or iMac

    Both my wife and I are using iPhone 4 with iOS 5. I am using Lion on my MacBook Pro with iCloud and she is using a iMac with Snow Leopard and MobileMe. Is there a reason I can't invite her (she doesnt get the notification) from my iPhone to an iCal e

  • Properties lost when widget is updated

    I have created a simple widget using the Widget Factory. I've entered some Properties in Captivate and it works fine. However, after updating the widget in Flash and then clicking Update widget in Captivate, my Properties are gone (although the chang

  • Possible to configure Valet M10 as repeater?

    I have a Linksys E2000 (Cisco 44041?) as my sole wireless access point in my house.  I am needing to extend the range/strengthen the signal to my husband's office in the basement. I do not want to spend $90 on a repeater.  I know some wireless router

  • IPhoto crashes when importing groups of large, scanned images

    I have a folder of 16 scanned images, that range in size from 3 MB to 50 MB (first time scanning and scanned at really high resolution so they could be blown up in books or calendars - have learned better since). iPhoto quits when I try to import the