Skip to Content
Summary:

In our Web Dynpro project it was necessary to search some information in the SAP R/3 system. Therefore we had to create search helps with the OVS. This way was very uncomfortable, because we had to implement a new OVS separately for any search help and so we wanted to use from the R/3 backend. The SAP search helps were already defined as data-dictionary objects including all necessary facts of a search help. We decided to develop a “Generic” search help that uses the definition like input-/output-parameter and hit list layout from the SAP data dictionary. To simplify the usage of the Generic Search Help in a Web Dynpro project it was necessary to create a new plug-in for Eclipse. The goal was that a developer can use standard data dictionary search helps for Web Dynpro without writing additional source code.

By: Albert Maas
Company: SPV Solutions, Products, Visions AG (http://www.myspv.comhttp://www.myspv.com)

Realisation:

image

The implementation of the Generic Search Help for Web Dynpro is separated in two parts:

1. Creating a Web Dynpro component, which has the following tasks:

It gets the information of the search help from the backend (SAP-BAPI, which returns the SAP search help information after suitable preparation).

It arranges the search window and the result window with the received facts dynamically.

It returns the searched data in the correct context node element of the input field from the user interface.

  • 2. Creating a new plug-in for Eclipse that:

applies the created Web Dynpro Component to the developed Web Dynpro application, in which the Generic search help has to be used.

maps the input fields of the user interface (views of the Web Dynpro application) to a existing SAP search help (backend).

adds automatically the initialization and the call of the Generic search help in the source code from the views (generic source code generation).

    Advantages of the Generic Search Help:

    It creates search helps in Web Dynpro without writing a single line of source code.

    It makes it possibility to use the SAP search help-technology including all standard and customer-defined search helps.

    Changing the definition of a search help will also change the behavior in the Web Dynpro application.

      Usage of the Generic Search Help:

      Before the Generic Search Help for Web Dynpro can be used, the User-Interface of the Application must be implemented. For example we have the following Web Dynpro application, which contains flight data:

      image

      The search help plug-in can be used as follows:

      1. Open the New-Wizard (File → new → Other …) and select the SearchHelp Wizard:

      image

      2. In the SearchHelp Wizard select the Web Dynpro Component in which the Generic search help should be used and fill in the logon data of the SAP R/3 system.

      image

      If the logon-test (Button Test_Logon) was successful push the button “Next”.

      3. The next wizard contains a list of all views and associated input fields of the selected component:

      image

      4. A double-click on a line opens the search interface for the SAP search help:

      image

      With the Button “Search” it is possible to find a SAP search help at the backend. With a double-click at the search, the Search help-input field is filled. Finally have to choose the export parameter

      5. After all input fields are mapped to a SAP search help it is necessary to input the logical system names for the RFC-Model:

      image

      6. With the Finish-Button the plug-in apply the search help component in the Web Dynpro Project and change the views, which are using the Generic Search Help. Finally it is necessary to refresh the Web Dynpro project to apply the changes from the workspace:

      image

      7. The new structure of the Web Dynpro project is as follows:


      image

      The Eclipse plug-in created a new Model (GetSearchModel) and a new Component (SearchHelpComp). Additionally the initialization (definition and creation of the search help component) and the call (action, witch opens the search help) of the search help into the TestapplView created.

      After deploying and starting the Web Dynpro Application there’s a new button behind the input fields to start the search help and open the search window:


      image

      The OK-button opens the return window:

      image

      Finally transfer the found value to the input field of the view:

      image

      Installation:

      1. Copy the search help plug-in in to the plug-in folder of the SAP Netweaver Developer Studio.
      2. Include the SAP-Bapi`s in to the SAP R/3 system.

      About SPV:

      Founded in 1983, SPV Solutions, Products, Visions AG is an international operating SAP solution and product house, headquartered in Munich, Germany. The company consults, develops, implements, and optimises information technology systems in the SAP environment as well as branch and client oriented solutions for process improvements. Further more it offers data centre services ranging from ASP to remote administration.

      To report this post you need to login first.

      109 Comments

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

      1. Anonymous
        Hi Dirk,

        I have been using the Plugin for one of my WD java Project and was very happy to use this plugin. But, when I am trying to use this plugin for another project this plugin doesn’t seem to be working fine. When I deploy the project on to the J2EE engine it is throwing a deloyment error saying “Deployment of atleast one item is aborted”. Could you please help me in resolving this problem. I would appreciate your help. Please let me know if this plugin cannot be used for more than one project. That would be a great help.

        Regards,
        Gopal.

        (0) 
        1. David Bann
          Thanks for sending the plugin!

          Does this work with NWDS 7.0? I have installed and used the wizard but I have 1 build error:
          In the view that uses the search help, the generated code is as follows in the wdDoModifyView method:

                /* Generated from SearchHelp_Wizard  */
                                   SearchHelp searchHelp = (SearchHelp)wdContext.currentContextElement().getAttributeValue( “SPV_SearchHelp_fuer_Web_Dynpro”); 
                      searchHelp.changeView(wdThis.wdGetSearchHelpCompComponentUsage(), wdContext.getContext(), “GENERIC”, view, firstTime);
                /* Generated from SearchHelp_Wizard  */

          Error: The method wdGetSearchHelpCompComponentUsage() is undefined for the type IPrivateRequestChangeOfShiftView     RequestChangeOfShiftView.java

          (0) 

      Leave a Reply