0% found this document useful (0 votes)
438 views

Use Web Dynpro For ABAP, Workflow and The UWL To Revolutionize Decison Processing

The document discusses using Web Dynpro for ABAP, Workflow, and the Universal Worklist (UWL) to improve decision making processes. It describes challenges with using the standard SAP GUI and UWL for complex decisions, including a lack of relevant information and unintuitive interfaces. The proposed solution is to build a Web Dynpro for ABAP application integrated with Workflow and the UWL to provide all necessary information for decisions on a single screen in an intuitive format. This allows displaying additional context and customizing the user experience beyond the standard SAP options.

Uploaded by

sivakrishnan11
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
438 views

Use Web Dynpro For ABAP, Workflow and The UWL To Revolutionize Decison Processing

The document discusses using Web Dynpro for ABAP, Workflow, and the Universal Worklist (UWL) to improve decision making processes. It describes challenges with using the standard SAP GUI and UWL for complex decisions, including a lack of relevant information and unintuitive interfaces. The proposed solution is to build a Web Dynpro for ABAP application integrated with Workflow and the UWL to provide all necessary information for decisions on a single screen in an intuitive format. This allows displaying additional context and customizing the user experience beyond the standard SAP options.

Uploaded by

sivakrishnan11
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

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

[ CHRISTINA CRONE

ASUG INSTALLATION MEMBER MEMBER SINCE: 1999

Jon Cocks SAP NetWeaver Development Boeing Service Company November, 2009

[ MIKE STOKO

ASUG INSTALLATION MEMBER MEMBER SINCE: 2003

[ BOB GAUTHIER

ASUG ASSOCIATE MEMBER MEMBER SINCE:1998

[ 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.

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

Real Experience. Real Advantage.

[ Agenda
5. 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 Inbox 8. Manage the pop-up window the UWL launches
Configuring an EXIT_PLUG Fire the EXIT_PLUG

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).

Real Experience. Real Advantage.

[ Background the Boeing Service Company Infrastructure Support Services


Infrastructure Support Services CROSS

Facilities-related services for sophisticated

Information Services

BBSN

Stryker Comm-on-move

Range and Technical Services

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

Spacelift Range Systems


Real Experience. Real Advantage.

FCS Support

[ 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

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 arent familiar with the SAP GUI and dont log in on a regular basis Misinformation ex: no extended price

Real Experience. Real Advantage.

[ More Challenges
The Portals 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

Real Experience. Real Advantage.

[ Senior Decision-Maker Buy-In


What are all these buttons? Its too confusing Why didnt 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 cant you just give me all the information I need to make a decision on one single screen?

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

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.
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

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 Portals 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)
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

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 Dynpro for ABAP application

Real Experience. Real Advantage.

[Building the Web Dynpro for ABAP Application


Create Application and Set START plug
Use the Start plug you already defined as the Plug Name for this new application

Create a new Application

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

Real Experience. Real Advantage.

[Building the Web Dynpro for ABAP Application


Build your component controller context. Set the component controller context and build your context The component controller is shared across all nodes views and windows. Consider these global variables and manage them accordingly.

Set up the component controller context for the Window.

Real Experience. Real Advantage.

[HANDLESTART Event Handling


Data Declarations / Obtain the context nodes
Data Declarations Obtain the Context nodes

TIP: Before you start processing the workflow item, check that WI_ID is not initial. This will help avoid unexpected results.
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.

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.

Real Experience. Real Advantage.

HANDLESTART Event Handling


Reserve the work item
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.
Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application 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).

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.
Real Experience. Real Advantage.

Building the Web Dynpro for ABAP Application


Handling Component Controller Context Clean-up
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.
Recommendation: Be sure the check the REASON the application has been exited. U = Browser unload; T = Session Timeout; = Terminate app using Exit plug

Real Experience. Real Advantage.

Building [ Handlingthe Web Dynpro for ABAP Application Component Controller Context Clean-up
Sample code for cleaning up the component controller context
Be sure to replace the workitem, if the user hasnt actually processed the workitem.

Real Experience. Real Advantage.

Building the Web Dynpro Application [ View Processing: Adding localfor ABAPthe controller context to
Add any local context elements needed to handle data on the View.

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).
Real Experience. Real Advantage.

[ Agenda
5. 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 Inbox 8. Manage the pop-up window the UWL launches
Configuring an EXIT_PLUG Fire the EXIT_PLUG

Real Experience. Real Advantage.

[Integrating the Webflow/Workflow Engine


Decision Options in the workflow task
Standard 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.

Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine


On Action Event Handler: Approve Button

Pass the appropriate decision code for each on action event Approve Button = 0001 Reject Button = 0002 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_cont container.
Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine


Launching the WD4A from the Universal Worklist

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).

Real Experience. Real Advantage.

Integrating the Webflow/Workflow Engine


Configure workflow task to launch WD4A Application

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.
Real Experience. Real Advantage.

[ Agenda
5. 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 Inbox 8. Manage the pop-up window the UWL launches
Configuring an EXIT_PLUG Fire the EXIT_PLUG

Real Experience. Real Advantage.

Customizing the Universal Worklist


Register Item Types for All Systems
Menu path: System Administration -> System Configuration -> Universal Worklist & Workflow -> Universal Worklist - Administration
Since you have configured the system to launch the Web Dynpro for ABAP using SWFVISU, you must register the item types to generate the XML.

Real Experience. Real Advantage.

Customizing the Universal Worklist


Clear the Cache
path: System Administration -> System Configuration -> Universal Worklist & Workflow -> Universal Worklist - Administration

Menu

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

Real Experience. Real Advantage.

Customizing the Universal Worklist


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

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

Customizing the Universal Worklist


Obtaining the XML
path: System Administration -> System Configuration -> Universal Worklist & Workflow -> Universal Worklist - Administration
Note: IDES_CORE will be whatever your System Alias has been set up as by the portal administrator.

Menu

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

Real Experience. Real Advantage.

[Customizing the Universal Worklist Download the XML file


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

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

Frontpage Adobe Go-Live Ultra Edit Etc.

Real Experience. Real Advantage.

Customizing the Universal Worklist


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

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
Real Experience. Real Advantage.

Customizing the Universal Worklist


Customizing the XML

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.
Real Experience. Real Advantage.

[Customizing the Universal Worklist


Note: Do not include the system id Uploading your Customized XML configuration name. When in the Configuration 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.
Real Experience. Real Advantage.

Customizing the Universal Worklist


Verify your customized XML configuration
Double-check that your configuration is set with a High priority. Confirm that your customized XML is uploaded correctly.

Real Experience. Real Advantage.

[Customizing the Universal Worklist

Verify XML configuration is working and Reverse SWFVISU settings Note: Dont forget to clear the cache after verifying that your customized XML configuration has been successfully uploaded.

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.

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.

Real Experience. Real Advantage.

[ Agenda
5. 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 Inbox 8. Manage the pop-up window the UWL launches
Configuring an EXIT_PLUG Fire the EXIT_PLUG

Real Experience. Real Advantage.

Block Users from Using the SAP GUI Inbox


Defining a subtype of the Business Object DECISION
Note: Do not make it a system wide delegation

Redefine the Method PROCESS and code your own implementation

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

Block [ CodeUsers from Using the SAP GUI Inbox your PROCESS method
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_WORKITE M by calling the function SWW_WI_BACK.

Real Experience. Real Advantage.

Block Users from Using the SAP GUI Inbox


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

Real Experience. Real Advantage.

[ Agenda
5. 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 Inbox 8. Manage the pop-up window the UWL launches
Configuring an EXIT_PLUG Fire the EXIT_PLUG

Real Experience. Real Advantage.

Manage the [ Configure anPop-up Window the UWL Launches EXIT plug
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

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches


Create the closewin.html file
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

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches


On Action Event Handler: Approve and Reject
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
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.

Real Experience. Real Advantage.

Manage the Pop-up Window the UWL Launches


Results
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.
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

Real Experience. Real Advantage.

[ Further Information

SAP Public Web:


SAP Developer Network (SDN): www.sdn.sap.com Workitems, UWL and Web Dynpro for ABAP by Thomas Kosog Using Exit Plug in Web Dynpro for ABAP by Shabbir Aslam How to close parent window in Webdynpro applications? By Mohammed Anzy

Recommended Books
Practical Workflow for SAP - 2nd Edition by Ginger Gatling (SAP PRESS ISBN 978-1-59229-285-1) Proceeds go to Doctors Without Borders

Contributors
Jon Cocks, SAP NetWeaver Developer, Boeing Service Company [email protected] Kira Semerjian, SAP NetWeaver Developer, Boeing Service Company

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)

Real Experience. Real Advantage.

[ Questions?

Real Experience. Real Advantage.

57

Thank You!

[ ASUG and SAP: Partners in Education


ASUG, Americas SAP Users Group, is the worlds 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

Real Experience. Real Advantage.

You might also like