2011-05-31

WD Screen Variants – DDIC Changes

overview

<< previous | next >>

The concept of a selection screen variant is something that most SAP users have come to expect, yet this feature is unavailable in standard Web Dynpro.  Below is the next in a series of posts detailing how to bring this necessary feature back to Web Dynpro.  Start here to see the full requirements.

Data Dictionary Changes
First we need a data store. In SE11, create a new table ZES_WDVARI. This table conforms to the specifications of the IMPORT/EXPORT database ABAP command.
ZES_WDVARI

We’ll also need a few additional data dictionary objects:
This structure will be used to hold the content of the data stored into ZES_WDVARI-CLUSTD (raw data) field). 
ZES_VUVVALUES 
This structure includes some additional fields used to display data to the user in the Web Dynpro ALV. 
ZES_VUVVALUES_ALV 
Table type used for class method parameters.
ZES_T_VUVVALUES 
Table of Web Dynpro Select Options will contain a list to all select option screens being considered as part of this variant.
ZES_T_WD_SELECT_OPTIONS

Now that we have the dictionary objects in place, let’s take a look at the development.

overview

<< previous | next >>

2011-05-27

Web Dynpro Selection Screen Variants

Okay – so I know I’m late to the game, but I finally got around to working on my first Web Dynpro Application. I was overall very happy with the tool and end-user presentation. 

This application was a report and as such, made heavy use of select options (WDR_SELECT_OPTIONS) in order to help filter the results.  I was excited to find most all of my standard SAP selection screen features replicated in Web Dynpro.  Still, I found one thing lacking: there is no concept of the selection screen variant.  It’ll take me a while to get this all out, but I intend to provide specific details to recreate my response to this issue. 

Disclaimer: This implementation was built in SAP NetWeaver 7.0 EHP 1 SP3.  I expect change and at some point (maybe already) this will become obsolete.  So far as I can tell, there is no SAP-provided solution to what I perceive as a big miss.

To complete this task, I referenced two other posts
here and here.  Both helped a lot.  However neither had everything we expected from our selection screen variant.

Functional Requirements
There are a number of expectations from this Web Dynpro Component.  Over the next few posts, I’ll be describing my implementation of the following functional requirements:
  • Allow multiple uses of a selection screen variant within the same application.
  • Allow for multiple “screens” (or instances of IF_WD_SELECT_OPTIONS) to be assigned to a single variant.
  • Save selection screen fields into a variant with a specific name, created/modified information.
  • Protect a variant for modification only be one user.
  • Retrieve existing selection screen variant to repopulate field values.
  • Ability to use dynamic date feature found in standard SAP selection screen variants.
  • Delete a selected selection screen variant.
Technical Requirements
  1. DDIC Changes
  2. Assistance Class
  3. WD Component
  4. Main View
  5. Get Variant view
  6. Save Variant view
  7. Dynamic Dates
  8. Component Usage in your WD Application

The End Result

The result of this effort is an unobtrusive triplet of buttons that can be located in your Web Dynpro application.  This small little feature lends tremendous power to your web reports.  And in some cases, it is what your users have come to expect from quality ABAP development.
image

Enjoy.