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.

2011-03-23

Compliments to the Development Team on IE9

I have to hand it to the IE9 development staff.  They really put out a nice product this time around. 

Load Performance

On my machine, the time to load IE9 has improved noticeably.  I am also impressed by the visibility of add-on “Load time”.  This helps a great deal in determining which add-on is causing performance issues on a machine.
ie9-01

Application Responsiveness

It’s just snappy.  I can’t tell you enough: I’m surprised by how quick the tool is compared to it’s predecessor.  I’ve seen performance improvements in events such as: opening new tabs and switching between tabs, initiating a URL request, and page load time.

Features From Other Browsers

It’s rather obvious that the team implemented a few ideas from existing browsers.  It’s good to see Internet Explorer finally get with the program.  I was happy to see the following enhancements to IE9: tear-off tabs, the address/search bar combined, the “new” New Tab page that shows recent sites.

I like the simplified title bar area that contains the address bar and tabs on one line.  And the status / notification bar that only appears when it’s needed. These types of changes offer more screen real-estate to what the product is intended for: browsing the web.
ie9-02

Developer Tools

Wow – all the information I need packed right here.  Know that most of this was already available in IE8.  The most useful enhancement (to me) is the availability of the Network Traffic logs.  Here you can see the details of each file requested in a URL request.  Nice feature…
ie9-04

What’s missing?

Something I’d really like to see come back: the ability to “hide” an add-on without having to “disable” it.  My biggest qualm is having to approve disabling an add-on.

Overall, Internet Explorer 9 is a very nice upgrade with lots of useful enhancements.  Thanks to all those who worked on its release.

2011-02-24

A Plea for Custom Document Property Manipulation in Excel

In my experience, the capabilities of Microsoft Excel have far outweighed that of Microsoft Word.  It may possibly be my line of work, but I’ve thus far always found that I can accomplish more with Excel’s formulas, references, and especially macros than I could ever hope to get out of a Word document.  Word was great for typing fancy-looking text, but when I required any amount of functionality Excel was always there to save.  Until today…


The Request
Microsoft: please enhance Excel such that I can
  1. Retrieve and manipulate Custom Document Properties using only Formulas (no macros required) in the same way that can be found using Word’s Insert > QuickParts > Field functionality.
  2. Insert these same custom document properties into the header/footer section of a worksheet.

Microsoft Word
For example, in Word, I can choose Insert > Quick Parts > Field > DocProperty.  Then choose any document property maintained and insert a reference to it.
prop01


Limitation of Microsoft Excel
Unfortunately, in Excel a macro must be written in order to retrieve values from the CustomDocumentProperties collection.  A formula can then reference this macro.  In a corporate network with any sort of security policy, this means that users must “enable the macros” for this to function properly.

Function GetProperty(PropertyName As String, PropertySet As PropertyLocation, _
    Optional WhatWorkbook As Workbook) As Variant
(Reference Chip Pearson’s website for GetProperty code.)

Further, I’m unable to insert any auto-updated values into the footer of an Excel worksheet other than the handful of values pre-defined by Microsoft: page number, date/time, sheet name, etc.  In order for this to occur, I need yet another macro to execute Before_Print.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With Worksheets("Sheet1").PageSetup
        .CenterFooter = GetProperty(“Issue.Header.Id”, 2)
    End With
End Sub
Code found by doing a Google search for excel formula in footer.

I’d like to see efforts made to improve the functionality of these items in the next release of Microsoft Excel.

Enjoy!

2010-11-18

VS 2010 Cannot Write Updates to Schema Model Version

So… I started today creating the same sort of SQL Server Database project that I’ve done many times before.  Really simple database – just one table so far.  It’s just going to be a log for a new interface between our ERP system and the new time/activity tracking system being installed.

schema1

The first indication that something was wrong is during the Data > Schema Compare.  After selecting Project vs. Database, I noticed the [Write Updates] button is disabled.  And a friendly looking message informing me that I can’t do what I planned to do next.

“You cannot write updates to the target when you compare the specified types of schema models.”

error1

To date, the Google results haven’t been much help for this error message.  A few hits on queries, but only one solution – from someone accidentally using the Data Tier Application Component project instead of SQL Server 2008 Database project.  DAC projects cannot write updates.

I spent a little more time pushing and prodding VS 2010 and I finally got this error message out of it as well:

“SQL01275: The version of the source and the target schema do not match.  You can compare these schemas, but you cannot write updates to the target schema.”

error2

Okay – fine.  Searches for “SQL01275”, “version of schema do not match”, etc. were turning up nil.

I tried comparing Database vs. Database – no problem: [Write Updates] was enabled.  Proof: the functionality can still work.

I tried comparing Database file (.dbschema) vs. Database – again the error.  Taking this as a clue, I went to examine the .dbschema file.

<?xml version="1.0" encoding="utf-8"?>
<DataSchemaModel FileFormatVersion="1.2" SchemaVersion="1.1"
  DspName="Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider"
  CollationLcid="1033" CollationCaseSensitive="False">

Notice the 2nd line has another tip.  The schema version of my VS 2010 Database Project file is version 1.1.  Got caught in another red herring.  And finally posted this thread at MSDN Forums.

Jeff


UPDATE

Unbeknownst to me, I was importing a SQL Server 2005 database into a SQL Server 2008 Database Project.

Solution: In the Project > Properties, change the Project version to SQL Server 2005 and [Save].

project_version

Then unload and reload the database project.  Opening the Schema Comparison again, produces the expected result.

good

2010-10-20

Developing Mobile Applications for SAP

I skipped breakfast this morning at SAP TechEd 2010 to get to this hands-on lab (CD162) 40 minutes early. The hope was to get a no-show spot left by one of the approximately 50 registered attendees. One other person still beat me to the door. Right now, I'm second on the waiting list.





I made it!  Good lab too; it was worth the wait.  The important take-aways of this course were (1) learning how to use a set of SDOE_* transactions that are used to design the data structures and rules that are exported and consumed by the mobile application development environment; and (2) understanding how to consume the the published XML data structures in an application developed in Visual Studio C#.


Creating Distribution Rules
Transaction SDOE_WB is available in SAP Netweaver Mobile 7.1.  It is the Workbench used to create your distribution rules for mobile devices.  Here you indicate the data structures and configure rules used to determine what instances of those data structures are passed on to the mobile devices.


Developing on the SAP/Sybase Co-Innovation Stack 
After designing the data model to be consumed by the mobile application, you will need to export the model as an ESDMA bundle.  This is used by the Sybase Unwired Platform (SUP) to generate code in C# or Java (possibly others).  The generated code handles passing data and messages between the mobile device local database and the SAP backend database.  This allows you, the developer, to focus on the mobile application's business logic and design.

Looking forward to my first project.

UPDATE: I've since learned that there is many different ways (released and unreleased) to do mobile development.  Most of which are complicated at best.  The post above is just one small piece of one way to get a mobile application up and running.

2010-10-19

SAP TechEd 2010 Keynote

Vishal Sikka presented the keynote session at SAP TechEd 2010 in Las Vegas. The important take-aways for me were:

SAP Netweaver 7.3 Release
Information about the upcoming release of SAP Netweaver 7.3.

Coalescing mobile application strategy
A presentation was given on a 2-minute development project published to an iPad using the Gateway Consumption Toolset.  Looking forward to attending additional sessions this week regarding mobile development.

I had a conversation with an SAP Labs technician to learn more about this.  This is a device (think Google Search Appliance) that contains the hardware and software in one appliance.  It integrates well into existing system landscapes in that it can sit next to an SAP R/3 and/or SAP BW system and replicate a predefined set of data from either or both systems to be presented to end users in an in-memory, high-performance method.