59
MIKE STOKO [ ASUG INSTALLATION MEMBER MEMBER SINCE: 2003 BOB GAUTHIER [ ASUG ASSOCIATE MEMBER MEMBER SINCE:1998 CHRISTINA CRONE [ ASUG INSTALLATION MEMBER MEMBER SINCE: 1999 ] Use Web Dynpro for ABAP, Workflow and the UWL to Revolutionize Decision Processing Jon Cocks SAP NetWeaver Development Boeing Service Company November, 2009

Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

Embed Size (px)

Citation preview

Page 1: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

MIKE STOKO[ASUG INSTALLATION MEMBER MEMBER SINCE: 2003

BOB GAUTHIER[ASUG ASSOCIATE MEMBER MEMBER SINCE:1998

CHRISTINA CRONE[ASUG INSTALLATION MEMBER MEMBER SINCE: 1999

]Use Web Dynpro for ABAP, Workflow and the UWL to Revolutionize

Decision Processing Jon CocksSAP NetWeaver DevelopmentBoeing Service CompanyNovember, 2009

Page 2: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Disclaimer The information in this presentation is confidential and proprietary to SAP and may not be

disclosed without the permission of SAP. This presentation is not subject to your license agreement or any other service or subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation and SAP's strategy and possible future developments, products and or platforms directions and functionality are all subject to change and may be changed by SAP at any time for any reason without notice. The information on this document is not a commitment, promise or legal obligation to deliver any material, code or functionality. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. This document is for informational purposes and may not be incorporated into a contract. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.

All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

Page 3: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda Introduction Key Learning Points Background

The Decision Challenge Challenges with SAP Workflow Senior Decision buy-in

The Solution Building a Web Dynpro for ABAP solution integrated with the

UWL and Workflow/Webflow engine Building a Robust Web Dynpro for ABAP Application

Page 4: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda5. Integrating the Webflow/Workflow engine Decision Options On Action Event Handling Configure workflow task to launch WD4A Application

6. Customizing the Universal Worklist Initial Configuration Customizing the XML

7. Block Users from using the SAP GUI Inbox8. Manage the pop-up window the UWL launches Configuring an EXIT_PLUG Fire the EXIT_PLUG

Page 5: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Key Learning Points Identify Pain Points for using standard SAP GUI based workflow Building a robust Web Dynpro for ABAP application Integration with the Webflow/Workflow engine Customizing the Universal Worklist XML container Block users from using the SAP GUI workflow inbox Manage the pop-up window that the UWL launches for the Web Dynpro for

ABAP

This presentation assumes some knowledge of Workflow, the Universal Worklist (UWL), and Web Dynpro for ABAP (WD4A).

Page 6: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Background – the Boeing Service Company Infrastructure Support Services Facilities-related services for sophisticated

secure facilities Facility systems engineering and analysis SAP ERP implementation and

sustainment SAP Services Partner Design and build of operation centers /

facilities Information Services and Network Operations Mobile satellite broadband communications

and managed network services Message handling systems Design, integration, support

Launch and Range Support Launch and range operations, payload

processing System integration and upgrade, test &

evaluation

BBSN StrykerComm-on-move

Information Services

Spacelift Range Systems FCS Support

Range and Technical Services

CROSS

Infrastructure Support Services

Presenter
Presentation Notes
Boeing Service Company operates, maintains and sustains our customers’ systems. Wholly owned subsidiary of the Boeing Company, BSC reports through IDS, GS&S, and D&GS. Customers include DoD, other USG, commercial, and other Boeing programs SAP as part of a service offering and a service enablement platform Service Delivery and Execution Integration – extending suppliers�and customers
Page 7: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda Introduction Key Learning Points Background

The Decision Challenge Challenges with SAP Workflow Senior Decision buy-in

The Solution Building a Web Dynpro for ABAP solution integrated with the

UWL and Workflow/Webflow engine Building a Robust Web Dynpro for ABAP Application

Page 8: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Decision Making Challenge Successful Decision making

requires: Clarity of key details Access to all the relevant data to make a

decision Access in a timely manner Intuitive design and interface

The SAP Workflow (and Webflow) engine make it possible, but… SAP GUI formatting Business Objects contain values, not

descriptions Senior decision makers aren’t familiar

with the SAP GUI and don’t log in on a regular basis

Misinformation – ex: no extended price

Presenter
Presentation Notes
Decisions need to be made in a timely and accurate way and there needs to be a high level of confidence in the information available. SAP GUI workflow formatting is unnecessarily confusing and highly limited. Limit of 80 characters per line (can cause unusual truncations or unexplainable extra spaces when text wraps). Decision makers rarely go into the actual business transaction itself to verify information and frequently rely solely on the information presented on the initial screen to render a decision. The business objects themselves are limited in the textual content of the information they contain. For example, a business object my contain the User Id of the person making the request but not the actual full name of the user. It is unlikely that a decision maker will know the user Id’s of their employees and very likely wouldn’t know how to go look up a user Id to find out the name of the user. Extending business objects or adding additional business objects to the workflow containers can be cumbersome and require a fair amount of development time. If a business object contains a number of line items (i.e. a purchase order with 25 line items) the SAP GUI workflow text container is not well suited for presenting a random number of line item information on the screen. The text container must have predefined text and formatting with variables for every line item detail. Business decision makers generally already live in the realm of portal applications and business intelligence. They don’t log into the SAP GUI. Thankfully the Enterprise Portal Universal Worklist exposes webflow enabled workflow to the Enterprise Portal.
Page 9: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

More Challenges The Portal’s Universal

Worklist (UWL) is a portal based technology that brings all user work items from a number of systems to a central point of access

Although presented in a web browser, the UWL, suffers from the same challenges

Most decision tasks are overly simplistic (approve or reject) No “reason for rejection” Limited ability to include

alternatives other than the standard “Forward” options

Presenter
Presentation Notes
However, even the Universal Worklist suffers from some of the same challenges as the SAP GUI workflow. Namely, formatting challenges and underlying limitations of the business objects themselves. Additionally, most “Decisions” are presented in a “yes” or “no” manner and provide little or no ability to document a reason for rejection. Although it is simple to add a text box to allow the business decision maker to type in a reason for rejection, it is better and more efficient to provide a drop down list of values representing the most common reasons for rejecting a request. It is also better to be able to store the “Reason for Rejection” in the workflow log or some other audit log. By avoiding free-form text and documenting rejections with standardized reason codes you can provide better metrics on decision making. Goal of usability is to feed results back into SAP Workflow without having to face complexities.
Page 10: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Senior Decision-Maker Buy-In “What are all these buttons?” “It’s too confusing…” “Why didn’t it give me all the

information I needed to make that decision?”

“What do you mean I have to navigate to the transaction itself? What do you mean I needed to “drill-down”? What is ME52N?”

“Why can’t you just give me all the information I need to make a decision on one single screen?”

Page 11: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda Introduction Key Learning Points Background

The Decision Challenge Challenges with SAP Workflow Senior Decision buy-in

The Solution Building a Web Dynpro for ABAP solution integrated with the

UWL and Workflow/Webflow engine Building a Robust Web Dynpro for ABAP Application

Page 12: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Web Dynpro for ABAP Decision Window

Use the Universal Worklist to launch a Web Dynpro for ABAP application decision screen that includes all the information you need to enable decision maker.

Presenter
Presentation Notes
Although the user is still routed through the Universal Worklist, and presented with some basic informaiton, they now “launch” a Web Dynpro application which presents them with all the information they need to make a decision. This Web Dynpro application does not suffer from limitations related to business objects and allows you freedom to present data and information in a more intuitive and appealing way.
Page 13: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Displaying All the Requested Information for the Decision Maker

Add additional information beyond what is contained in the Business Object GL Account / Cost Center Information Extended Price Related Requisitions (by cost center and plant)

Display text and icons to represent information in place of codes and data Meaningful Decision buttons along with drop-down for Reason for Rejection

Presenter
Presentation Notes
You can also consider showing analytical information. Such as how much has already been spent by cost center or GL account, how much has been spent on a particular material year-to-date or how much of the material is currently on hand (if it is inventoried material).
Page 14: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Benefits Fully integrated with the SAP workflow / webflow engine

The Workflow step actually launches the Web Dynpro for ABAP application Using the SAP supplied BAPIs for workflow you can update the workflow

container with the decision and set the workflow step to completed. Integration with the Enterprise Portal’s Universal Worklist enables decision

makers to execute decisions without needing to log in to the SAP GUI No limitation to the information that can be presented to the decision maker

The only limits are creativity in UI design and performance considerations Complete control over the design of the User Interface allowing you to

present the information in an intuitive way Use graphics, icons and other techniques to display information Use the header sections of the groupings to display key information Use tooltips and other techniques to ensure Accessibility concerns are addressed

(i.e. 508 and/or 504 compliance) Can be built today – no need to wait for 7.20 or Business Suite 7.

This solution was built on the following platform: ECC 6.0 SPS 10 (mySAP ERP 2005) EP 7.0 SPS 10 (Enterprise Portal 7.0)

Page 15: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda Introduction Key Learning Points Background

The Decision Challenge Challenges with SAP Workflow Senior Decision buy-in

The Solution Building a Web Dynpro for ABAP solution integrated with the

UWL and Workflow/Webflow engine Building a Robust Web Dynpro for ABAP Application

Page 16: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Start a new WD4A application / define START plug

Insert a new Startup Plug called “Start” on the Window component

Create a new Web Dynprofor ABAP application

Presenter
Presentation Notes
The job of the Start Plug is to use work item ID (WI_ID) to read data from the work item container and reserve the work item.
Page 17: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Create Application and Set START plug

Create a new “Application”

Use the “Start” plug you already defined as the

“Plug Name” for this new application

Page 18: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Define Inbound Parameters Define inbound parameters for the newly created application

TIP: Remove the default value for WI_ID when you

deploy to production

Make sure you add the WI_ID as a parameter

on the Window HANDLESTART

event handler

Presenter
Presentation Notes
The WI_ID parameter only needs a default value for testing purposes. When you are ready to deploy the application to production you should remove the default parameter value for WI_ID. Also be sure to code robustly and check for and handle scenarios where the Web Dynpro application has been launched but no WI_ID has been provided as a parameter. In the HANDLESTART event handler we will use workflow API’s (WAPI’s) to read from the workflow container.
Page 19: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Set the component controller context and build your context nodes

Set up the component controller context for the Window.

Build your component controller context.

The component controller is shared across all views and windows.

Consider these “global” variables and manage them accordingly.

Presenter
Presentation Notes
The component controller context are stored in memory when the Web Dynpro application is initialized. The HANDLESTART event handler depends on the controller context definition and mapping of the context to the window and view   We will receive the work item id (WI_ID) as an inbound parameter to the HANDLESTART event handler, and will set the work item ID, requisition number and item in the “workflowrawdata” and “purreqdata” controller nodes.
Page 20: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

HANDLESTART Event Handling

Data Declarations / Obtain the context nodes

Data DeclarationsObtain the Context nodes

TIP: Before you start processing the workflow item, check that WI_ID is not initial. This will help avoid

unexpected results.

Presenter
Presentation Notes
We found that if you do not check to make sure you have a WI_ID first, and then attempt to enqueue a business object for updating, you can accidentally enqueue all business objects by passing empty values for Requisition and Item number.
Page 21: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

HANDLESTART Event Handling

Obtain the key data from the controller context

Read the work item container.

Obtain the Requisition Number and Line Item number and store in component controller context.

Page 22: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

HANDLESTART Event Handling Reserve the workitem Check work item status and

reserve the work item for processing.

If the work item is already in process, identify the user (wi_aagent) and name of the person (wi_aa_name) who has the work item in process.

Page 23: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

HANDLESTART Event Handling

Check for the following conditions before you allow the user to reserve the workitem: The workitem is in a READY status (ready to be processed)

The workitem could be reserved by someone else; or The workitem may be reserved by the current user (i.e. accidentally opening the work

item in multiple pop-up windows) The underlying business object is not currently locked (ex: the user could be

currently editing the Purchase Requisition). If the workitem cannot be reserved, present an appropriate message to the

processor

Consider adding a button to allow the user to “unlock” the work item – but only if sy-uname = wi_aagent.

Reserve the work item

Presenter
Presentation Notes
Due to the fact that the Universal Worklist opens a new “pop-up” window to run the Web Dynpro for ABAP application, it is possible for a user to double click on the workflow inbox multiple times and open multiple “pop-up” windows. The first pop-up window is the instance of the WD4A application that currently holds the workitem reserved. Consider allowing users to be able to “unlock” the work item, but only when they are the person who currently has it locked.
Page 24: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

The default setting is “framework controlled”. According to SAP HELP this means that “the view data is kept until the calling component is exited.”However, in practical experience, especially working with WD4A applications in a clustered production environment when users “navigate away” from a WD4A application you can occasionally get memory errors. This appears to be caused by inconsistent clean-up of component controller data stored in memory. Consider switching the Lifetime attribute to “when visible”.

View: Setting the Lifetime attribute of your Views

Recommendation: Switch to using “when visible”. View data is then cleaned up when the browser is closed (or navigated away from).

Page 25: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Be sure to add appropriate code to “clean-up” your component controller context when a user closes the browser window or navigates away from the Web Dynpro application within the portal. This is most effectively done on the WDDOEXIT Method of the Component Controller itself.

Handling Component Controller Context Clean-up

Recommendation: Be sure the check the “REASON” the application has been exited. ‘U’ = Browser unload; ‘T’ = Session Timeout; ‘ ‘ = Terminate app using Exit plug

Presenter
Presentation Notes
Although setting the appropriate Lifetime setting on each View should handle cleaning up objects in memory, it is good programming to ensure that your own code makes every attempt to clean up after itself. Hint: if you are getting ABAP dumps referring to shared memory errors, consider adding more robust coding to the WDDOEXIT method of the component controller to clean up any/all context elements. LO_NODE->INVALIDATE
Page 26: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Sample code for cleaning up the component controller context

Handling Component Controller Context Clean-up

Be sure to replace the workitem, if the user hasn’t actually processed the workitem.

Presenter
Presentation Notes
This is also a good time to check to see of the business object reference in the application is still enqueue’d. If it is still enqueue’d by sy-uname, consider dequeue’ing it during the component controller WDDOEXIT method.
Page 27: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application

Consider using View specific context to manage dynamic labeling. Allows the flexibility of dynamic labels with the need to build completely dynamic UI elements (allows the developer to continue to use the “Layout” tab of the View designer to graphically build the user interface).

View Processing: Adding local context to the controller

Add any “local” context elements needed to handle data on the View.

Presenter
Presentation Notes
Again, ensure you clean up any “local” context elements in the WDDOEXIT event for each View. This will also help ensure that appropriate initializations are taking place every time the View launches.
Page 28: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda5. Integrating the Webflow/Workflow engine Decision Options On Action Event Handling Configure workflow task to launch WD4A Application

6. Customizing the Universal Worklist Initial Configuration Customizing the XML

7. Block Users from using the SAP GUI Inbox8. Manage the pop-up window the UWL launches Configuring an EXIT_PLUG Fire the EXIT_PLUG

Page 29: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine

Decision Options in the workflow taskStandard “User Decision” workflow step.

Customize the Decision Options as appropriate. Keep in mind how the workflow engine interprets each decision option as a numeric value. Ex: Approve = ‘0001’.

Page 30: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine

Pass the appropriate decision code for each on action event Approve Button = ‘0001’ Reject Button = ‘0002’

On Action Event Handler: Approve Button

On Reject, check to make sure the user has selected an appropriate “Reason for Rejection” from the drop-down box.

The “Reason for Rejection” can also be passed to the workflow container as a line in the l_contcontainer.

Page 31: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine

Now that we have added the code for our Web Dynpro application to interact with a workflow container, we need to configure the system so that it will launch the Web Dynpro application from the Universal Worklist (UWL).

Launching the WD4A from the Universal Worklist

Page 32: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine

Use the transaction SWFVISU to configure the workflow engine to launch the Web Dynpro for ABAP. This will automatically generate standard XML code to launch the Web Dynpro for ABAP application from the Universal Worklist. The transaction SWFVISU is used to map the specific workflow tasks (TS) to the UWL. This is only a temporary setting since we will be customizing the XML.

Configure workflow task to launch WD4A Application

Page 33: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda5. Integrating the Webflow/Workflow engine Decision Options On Action Event Handling Configure workflow task to launch WD4A Application

6. Customizing the Universal Worklist Initial Configuration Customizing the XML

7. Block Users from using the SAP GUI Inbox8. Manage the pop-up window the UWL launches Configuring an EXIT_PLUG Fire the EXIT_PLUG

Page 34: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Menu path: System Administration -> System Configuration -> Universal Worklist & Workflow -> Universal Worklist - Administration

Register Item Types for All Systems

Since you have configured the system to launch the Web Dynprofor ABAP using SWFVISU, you must register the item types to generate the XML.

Presenter
Presentation Notes
In the UWL admin page, register the system and then clear the cache.
Page 35: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Always clear the cache after registering item types. Tip: Make it a habit to clear both the cache and the expired items

Clear the CacheMenu path: System Administration -> System Configuration -> Universal

Worklist & Workflow -> Universal Worklist - Administration

Presenter
Presentation Notes
To see the XML that was generated with the registry reading transaction SWFVISU, go to UWL admin then select “Click to Administrate Item Types and View Definitions.”
Page 36: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Note: It may take several attempts at refreshing the cache; and/or refreshing your browser cache and browser history to see the new button

Launch Web Dynpro for ABAP

You should now see a button appear allowing you to launch the Web Dynpro from the Universal Worklist

Presenter
Presentation Notes
On occasion, even refreshing the cache and cleared items does not seem to correctly update the Universal Worklist. When this happens, clear your browser cache, temporary files and history and then actually close your browser and re-launch your browser. You may get away with simply refreshing the browser after clearing its cache, temp files and history. The exact version of the browser as well as patch level of the portal ultimately may affect the exact sequence of steps that works best for you.
Page 37: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Select the uwl.workflow.IDES_CORE and confirm that your workflow Task appears and the XML is configured to launch the Web Dynpro for ABAP

Obtaining the XMLMenu path: System Administration -> System Configuration -> Universal

Worklist & Workflow -> Universal Worklist - AdministrationNote: IDES_CORE will be whatever your System Alias has been set up as by the portal administrator.

Page 38: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Select the uwl.workflow.IDES_CORE Scroll down to the bottom of the page and click the Download Configuration button

Download the XML file

Use an appropriate XML editor to edit the contents of the XML configuration downloaded

Examples: Frontpage Adobe Go-Live Ultra Edit Etc.

Presenter
Presentation Notes
I have successfully used Microsoft Frontpage 2003, Adobe Go-Live CS1, and Ultra Edit to edit XML files locally on my desktop. There are numerous other products available that should also work. I’m presenting only those applications that I have actually successfully used.
Page 39: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Delete all entries in the XML file except for the entry for your custom Task.

Save the file as uwl.webflow.custom.IDES_CORE.xml

Customizing the XMLTip: you should only have a single pair of <ItemType> and </ItemType> tags contained within the parent element <ItemTypes>

Presenter
Presentation Notes
Since we will be uploading our custom XML as a high priority it is important that we only configure the XML for the single workflow Task or set of Tasks that we are customizing. In order to do this you must remove all other references to workflow Tasks by removing their corresponding <ItemType> tags.
Page 40: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Change the defaultAction and Action name “launchWebDynpro” to read “ProcessRequisition” This will change the text of the button from “Launch WebDynpro”

to “ProcessRequisition” Adjust the variables controlling the pop-up window.

Adjust the default size and position of the window Adjust whether or not users see menubars, toolbars, etc.

Customizing the XML

Presenter
Presentation Notes
Note: Although I’ve tried using “%20” and other ASCII type codes to force a SPACE between the words Process and Requisition, we could never get the XML to recognize the intent and actually space the words appropriately on the button.
Page 41: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Uploading your Customized XML configurationNote: Do not include the system id in the Configuration name. When you select IDES_CORE from the Adapt to System option it will concatenate the System id to the name of the XML file.

Note: Always select the “High Priority” checkbox on your custom XML configurations. This will ensure that no configuration on the back end will over-ride your customized XML configuration.

Page 42: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist Double-check that your

configuration is set with a “High” priority.

Confirm that your customized XML is uploaded correctly.

Verify your customized XML configuration

Page 43: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Customizing the Universal Worklist

Now that you have customized the XML for the workflow task and set the priority to “high” you can reverse the configuration in SWFVISU. Your XML is a higher priority and will always over-ride any configuration generated by SWFVISU settings.

Verify XML configuration is working and Reverse SWFVISU settings

Note: Don’t forget to clear the cache after verifying that your customized XML configuration has been successfully uploaded.

Presenter
Presentation Notes
Since we’re overriding these settings with our own XML file, ours has high priority.  At runtime, UWL starts searching for work item definitions in files with a high priority and stops when the first definition is found.
Page 44: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Some Minor Loop Holes Remain This work has generated a unique and powerful application allowing

users to make better decisions. However, there are still some loop holes that we need to address

A decision maker can still access the workflow item in their SAP GUI Inbox and execute the decision in the inbox. The SAP GUI Inbox will not launch the Web Dynpro application

A decision maker may reject a request and not supply a reason for rejection Or the decision maker could accidentally “Technically complete” the

workflow step without actually making a decision

The Universal Worklist launches the Web Dynpro for ABAP Application in its own pop-up browser window. The Web Dynpro for ABAP toolset does not allow you to automatically

close the browser window when the user clicks on the Approve or Reject buttons.

Page 45: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda5. Integrating the Webflow/Workflow engine Decision Options On Action Event Handling Configure workflow task to launch WD4A Application

6. Customizing the Universal Worklist Initial Configuration Customizing the XML

7. Block Users from using the SAP GUI Inbox8. Manage the pop-up window the UWL launches Configuring an EXIT_PLUG Fire the EXIT_PLUG

Page 46: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Block Users from Using the SAP GUI Inbox

Redefine the Method PROCESS and code your own implementation

Defining a subtype of the Business Object DECISION

Note: Do not make it a system wide delegation

Note: The Method PROCESS is now ready for your own implementation.

Page 47: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Block Users from Using the SAP GUI Inbox

Using the Workflow Macros to end processing (ex: EXIT_CANCELLED) will result in the work item being reserved. This may not be desirable in a

scenario where the workflow is routed to a group of approvers.

Instead display an appropriate message to the user and then execute the function SAP_WAPI_PUT_BACK_WORKITEM by calling the function SWW_WI_BACK.

Code your PROCESS method

Presenter
Presentation Notes
Although using the macro EXIT_CANCELLED is a quick and easy way to block the user from processing the workflow request. It leaves the work item in a state of “In Process”. When a group is used for approvals, this means that workflow no long appears to the rest of the group as being available for processing. If the user doesn’t “Replace” the work item it will be reserved for their processing only. The code provided in this presentation will not only block the user from processing the work item, but will also ensure that the work item is set back to a “Ready” status and is still available to all processors.
Page 48: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Block Users from Using the SAP GUI Inbox

Edit your Workflow definition and change your generic user Decision to use the ZDECISION Object Type instead of the default DECISION object Type.

Adjust your Decision Task to use the new ZDECISION

Page 49: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Agenda5. Integrating the Webflow/Workflow engine Decision Options On Action Event Handling Configure workflow task to launch WD4A Application

6. Customizing the Universal Worklist Initial Configuration Customizing the XML

7. Block Users from using the SAP GUI Inbox8. Manage the pop-up window the UWL launches Configuring an EXIT_PLUG Fire the EXIT_PLUG

Page 50: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches

Configure an EXIT plug on the Window of the Web Dynpro Application Be sure to set the plug type as “EXIT” Check the “Interface” check-box

Configure an EXIT plug

Page 51: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches

Create a simple html file that calls a javascript to close the current window when the file loads

Upload the html file as an Imported MIME Object to your Web Dynpro application

The html page is now a callable static web page that can be “fired” by a plug within your Web Dynpro application

Create the closewin.html file

Page 52: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches

On the Action Event Handlers for both the Approve and Reject Buttons add the code displayed on the left

Note that you must provide both the Close_Window and URL parameters

Make certain that you have finished processing all other code before you execute the EXIT_PLUG

On Action Event Handler: Approve and Reject

Note: This code may not work for all patch levels of the Enterprise Portal. This was tested and implemented with EP 7.0 sps 10.

Page 53: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches

Now, when a decision maker selects either the Approve or Reject button, the system will process the request, update the workflow, record the reason for rejection and then close the pop-up window.

This method worked on Enterprise Portal 7.0 sps 10, using IE 6.0. A common error message is: “The Triggering of an Exit Plug Using a

Specified URL Is Not Supported in Enterprise Portal” Check your Support Package Stack level as well as SDN and OSS

You may encounter problems with browser restrictions (depending upon the version of IE you are running), and or challenges with the exact code that works for you.

Check SDN (www.sdn.sap.com) frequently (search for key word “EXIT_PLUG”). There are many blogs and forum messages dealing with this topic – many of which offer different approaches to solving this challenge

If you have already implemented either SPS 14 or NetWeaver EHP1 you can take advantage of a new paramater on the EXIT_PLUG for Close Window.

Results

Page 54: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Key Take Aways Identified Pain Points for using standard SAP GUI based workflow Built a robust Web Dynpro for ABAP application Integrated with the Webflow/Workflow engine Customized the Universal Worklist XML container Blocked users from using the SAP GUI workflow inbox Managed the pop-up window that the UWL launches for the Web Dynpro for

ABAP

Page 55: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Further Information SAP Public Web:

SAP Developer Network (SDN): www.sdn.sap.comWorkitems, UWL and Web Dynpro for ABAP by Thomas KosogUsing Exit Plug in Web Dynpro for ABAP by Shabbir AslamHow to close parent window in Webdynpro applications? By Mohammed Anzy

ContributorsJon Cocks, SAP NetWeaver Developer, Boeing Service [email protected] Semerjian, SAP NetWeaver Developer, Boeing Service Company

Recommended BooksPractical Workflow for SAP - 2nd Edition by Ginger Gatling (SAP PRESS -ISBN 978-1-59229-285-1) Proceeds go to Doctor’s Without Borders

Page 56: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

ASUG and SAP: Partners in Education

Be sure to check out more informaiton on ASUG Special Interest Groups (SIGs):

Recommended groups Workflow and Business Process Management Business Integration, Technology and Infrastructure (BITI)

Page 57: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

Questions?

57

Page 58: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

Thank You!

Page 59: Use Web Dynpro for ABAP%2c Workflow and the UWL to Revolutionize Decison Processing

[

Real Experience. Real Advantage.

ASUG and SAP: Partners in Education

ASUG, Americas’ SAP Users’ Group, is the world’s largest, customer-run community of SAP professionals and partners, with more than 50,000 individual members and 1,750 companies represented. ASUG delivers the highest value to member companies, allowing them to maximize their SAP investments.

Some highlighted benefits include: Access to a year-round community for SAP customers and partners Diverse mix of educational topics and events through a variety of formats Exclusive opportunity to influence SAP future product direction Unparalleled networking opportunities with a dynamic professional network Unprecedented partnership with SAP Access to ASUG Special Interest Groups and Chapters