Skip to Content
Although the WD-ABAP (Web Dynpro for ABAP) sample application “WDR_TEST_EVENTS” does not compile correctly (in the NW2004s release we’re running on a trial basis), it nonetheless can be used to create your own tutorials for different types and combinations of controls (table, tree, etc.)  For example, I wanted to clone and modify the TREE_WITH_TABLE view in WDR_TEST_EVENTS to use in another tree/table application.  To do this, all one has to do is:  a) create a new WD-ABAP component;  b) copy the view you want from WDR_TEST_EVENTS (e.g. TREE_WITH_TABLE) to your new component you created in (a);  c) embed the view in the window of your new component.   Also:  1) IF the view “current view” appears as a view in your window, just delete it – this is part of the control selection machinery in the original WDR_TEST_EVENTS app.  T think this happened as a result of the view copy, but I honestly don’t remember.  2) As I recall, you also have to delete a plug/handle, since the tree view is now “stand-alone” in your new component, and doesn’t fire based on external selection of the “TREE_WITH_TABLE” event”.   Having done (a-c), activate your new component and create a new app for it.  You are now ready to go.  One word of forewarning – some of the examples in WDR_TEST_EVENTS are coded very “quick and dirty”.  For example, the TREE_WITH_TABLE does not refresh the table on different tree double-clicks as I would expect it to, and also does some table-fills from double-clicks where I wouldn’t expect it to.    But once you have something up and running and working, it is easy to see from the documentation how to change it up to make it do precisely what you want.  So:  1) kudo’s and hosannahs to the SAP Developers who came up with WDR_TEST_EVENTS.  2) could someone post a comment indicating how they got WDR_TEST_EVENTS to compile/activate correctly.  (It would be nice to see what each event does without having to clone it as in (a-c) above; some of the events are clear from their names, but some of the events have names that aren’t all that explanatory.
To report this post you need to login first.


You must be Logged on to comment or reply to a post.

      1. David Halitsky
        Gareth – Thanks for taking the time to confirm what happened to us with WDR_TEST_EVENTS.

        One work-around is WDR_TEST_UI_ELEMENTS.  However, the handling of the individual views is more abstract – they’re not declared up front and therefore have to be teased out of a lot of complex code that generates them from the SAP metaclasses and metadata.

        If I want to learn a particular view element, I copy it from WDR_TEST_EVENTS into a new component as described in my original post.  This can be done despite the fact that WDR_TEST_EVENTS is inactive on delivery and doesn’t activate without errors.

        But if I want to learn tray>tree>detail navigation/display and dynamic generation of view elements, I use WDR_TEST_UI_ELEMENTS.

        It is extremely instructive to compare the up-front view-declaration in WDR_TEST_EVENTS with the dynamic view generation in WDR_TEST_UI_ELEMENTS.  One gets a real feel for the kind of class infrastructure you really need to do things dynamically and generically in WD-ABAP.


Leave a Reply