Use Web Dynpro For ABAP, Workflow and The UWL To Revolutionize Decison Processing
Use Web Dynpro For ABAP, Workflow and The UWL To Revolutionize Decison Processing
[ CHRISTINA CRONE
Jon Cocks SAP NetWeaver Development Boeing Service Company November, 2009
[ MIKE STOKO
[ BOB GAUTHIER
[ 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.
[ Agenda
Introduction
Key Learning Points Background
The Solution
Building a Web Dynpro for ABAP solution integrated with the UWL and Workflow/Webflow engine
[ Agenda
5. Integrating the Webflow/Workflow engine
Decision Options On Action Event Handling Configure workflow task to launch WD4A Application
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
This presentation assumes some knowledge of Workflow, the Universal Worklist (UWL), and Web Dynpro for ABAP (WD4A).
Information Services
BBSN
Stryker Comm-on-move
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
FCS Support
[ Agenda
Introduction
Key Learning Points Background
The Solution
Building a Web Dynpro for ABAP solution integrated with the UWL and Workflow/Webflow engine
[ 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
[ Agenda
Introduction
Key Learning Points Background
The Solution
Building a Web Dynpro for ABAP solution integrated with the UWL and Workflow/Webflow engine
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.
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
[ 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)
[ Agenda
Introduction
Key Learning Points Background
The Solution
Building a Web Dynpro for ABAP solution integrated with the UWL and Workflow/Webflow engine
Make sure you add the WI_ID as a parameter on the Window HANDLESTART event handler
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.
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.
The underlying business object is not currently locked (ex: the user could be currently editing the Purchase Requisition).
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 [ 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.
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
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
Customize the Decision Options as appropriate. Keep in mind how the workflow engine interprets each decision option as a numeric value. Ex: Approve = 0001.
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.
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).
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
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
Menu
Always clear the cache after registering item types. Tip: Make it a habit to clear both the cache and the expired items
You should now see a button appear allowing you to launch the Web Dynpro from the Universal Worklist
Real Experience. Real Advantage.
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
Use an appropriate XML editor to edit the contents of the XML configuration downloaded Examples:
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.
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.
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.
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.
[ Agenda
5. Integrating the Webflow/Workflow engine
Decision Options On Action Event Handling Configure workflow task to launch WD4A Application
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
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.
[ Agenda
5. Integrating the Webflow/Workflow engine
Decision Options On Action Event Handling Configure workflow task to launch WD4A Application
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
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
[ Further Information
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
[ Questions?
57
Thank You!