Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II

Applies to:
Duet Enterprise 1.0. For more information, visit the. Duet Enterprise Home Site

Summary
This article explains how to implement a custom handler to transfer SAP business data from SAP workflow to Microsoft SharePoint and Office 2010. Data can be exposed as XML payload of SharePoint approval task, so that it can be consumed by using SharePoint Designer or Visual Studio. The article shows an example of creating an outbound custom handler for a sales order approval workflow.

Author:

Edward Lu

Company: SAP Labs LLC Created on: 1 January 2011

Author Bio
Xiaosheng (Edward) Lu has been working for SAP since 2001. He joined SAP as a RIG consultant. Since then, he has been working on numerous projects including different releases of Netwever platform, Business Suite SRM, and new technologies including Duet Enterprise and Gateway. He is now working as an Information Worker solution manager in Palo Alto. Before joining SAP, Edward worked as a technology consultant for a San Francisco based consulting firm.

SAP COMMUNITY NETWORK © 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

...............................................Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Table of Contents Introduction ........................................sap..................com | BPX ..........................................................................................sap............................................................................... 3 Workflow Pattern Customization .................. 8 Copyright.............com 2 ...................................uac................... 3 Implement Duet Enterprise Workflow Outbound Custom Handler to Transfer Business Data ...boc...........................................................com | UAC ....... 6 Register the Business Property for the Sales Order Approval Site ............................................................ 5 Register the XPROP in SCL Server .............................................. 7 Related Content ..................sap..........................bpx....................................sdn.............................................................................................................sap........... 9 SAP COMMUNITY NETWORK © 2011 SAP AG SDN ......................com | BOC ................................

Log into your SAP system where your workflow resides. Below is only example code. Next click on the Copy button. Implement Duet Enterprise Workflow Outbound Custom Handler to Transfer Business Data In this example. 1. But custom development. The code will vary depending on your workflow template container structure. SAP COMMUNITY NETWORK © 2011 SAP AG SDN .sap. in the format of XML payload of SharePoint approval task.0 is Duet Enterprise workflow. such as customer ID to SharePoint task site via XML payload. The benefit of sending the data as XML payload is to allow developer to access that data from SharePoint Designer or Visual Studio. Perform the below couple tasks. 4.com 3 . The configuration steps have been covered in the Duet Enterprise install and deployment guides. The Sales Order ID is passed to structure ls_vbap_data-vbeln. There are two types of work required for exposing a SAP user decision workflow task to SharePoint – configuration and custom development.sdn. start by copying the default outbound custom handler S_OSP_WF_PAT_DEFAULT_CH_OB.uac. has not been covered in the official configuration document. In SAP backend. The purpose of this document is to fill the gap and explain how to implement a custom handler to transfer data from SAP ERP workflow to Duet Enterprise SharePoint and Outlook 2010. you develop an outbound custom handler to retrieve the relevant customer ID and populate XPROP structure with that customer ID. In the custom handler ZSALES_ORDER_CH_OB. which accounts for the exposing of SAP business information to SharePoint task in assisting the decision making process. 2.boc. you could pass business properties to the XPROP structure so that the data will be sent as XML payload to SharePoint environment.sap.sap.bpx.sap.com | UAC . Specify the new name of the function module such as ZSALES_ORDER_CH_OB and select your own function group. I demonstrate the option to pass business properties. Start transaction SE37 and enter S_OSP_WF_PAT_DEFAULT_CH_OB as the function module name. The core capability allows exposing of SAP user decision workflow to Microsoft SharePoint and Outlook 2010. To create your own custom handler. 3. XPROP is a key-value structure delivered with Duet Enterprise workflow in SAP backend.Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Introduction One of the core capabilities in Duet Enterprise 1.  Retrieve the Sales Order ID from the workflow container.com | BPX . so that it can be consumed by using SharePoint Designer or Visual Studio. In this part II document for Duet Enterprise workflow I will explain how to implement a custom handler to transfer SAP business data from SAP workflow to Microsoft SharePoint and Office 2010. Create the workflow outbound custom handler in the SAP system where your workflow resides (not the SCL system). In your own custom handler.com | BOC .

LOOP AT lt_client_gpw_info INTO ls_client_gpw_info WHERE recp_role_id = 'APPROVER' AND gpw_object_sub_type = 'BND'.  Retrieve business properties such as customer ID by using Sales Order ID. LOOP AT lt_partners INTO ls_partners. APPEND ls_workitem_detail TO et_workitem_detail.  Activate the function module.boc.sap. ENDIF. ls_client_gpw_info-task_details-xprop_list = lt_xprops. MODIFY lt_client_gpw_info FROM ls_client_gpw_info.sap.com | BPX . ENDIF.sap. ls_xprops-name = 'CUSTOMERID'.  Fill XPROPS structure with Customer ID *-----Filling of xprops CLEAR ls_xprops. ENDLOOP. SAP COMMUNITY NETWORK © 2011 SAP AG SDN . READ TABLE lt_container2 INTO ls_container WITH KEY element = 'ORDER'.sdn. APPEND ls_xprops TO lt_xprops.Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II CALL FUNCTION 'SAP_WAPI_READ_CONTAINER' EXPORTING workitem_id = ls_workitem_detail-parent_wi_id TABLES simple_container = lt_container2. ls_customerid = ls_partners-customer. CLEAR lt_xprops[]. *** Set Client info to Workflow Pattern structure ls_workitem_detail-client_gpw_info = lt_client_gpw_info. ls_vbap_data-vbeln = ls_container-value+20(10). ENDLOOP. IF ls_client_gpw_info-gpw_object_type = 'EMAIL'. ls_xprops-value = ls_customerid.com | UAC .bpx.sap. ELSEIF ls_client_gpw_info-gpw_object_type = 'TASK'. IF ls_partners-partn_role = 'AG'.uac.com | BOC . ENDLOOP.com 4 . lt_client_gpw_info = ls_workitem_detail-client_gpw_info. *********************************** *---Get Customer ID for Sales Order *********************************** CALL FUNCTION 'BS01_SALESORDER_GETDETAIL' EXPORTING salesdocument = ls_vbap_data-vbeln TABLES return = lt_return order_partners = lt_partners.

Go to transaction SIMGH.boc. which is indicated by counter 1 in this example.sap.sdn. Make sure to include and call the SAP default outbound custom handler “S_OSP_WF_PAT_DEFAULT_CH_OB” the last. search and display IMG structure Duet Implementation Guide. SAP COMMUNITY NETWORK © 2011 SAP AG SDN .com | BOC . Register the new outbound custom handler – “ZSALES_ORDER_CH_OB”.com 5 .sap.Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Workflow Pattern Customization Include the “ZSALES_ORDER_CH_OB” as outbound custom handler for your workflow pattern customization.com | BPX . 3.uac. which is indicated by counter 2 in this example. Call the “ZSALES_ORDER_CH_OB” outbound custom handler first. 2. 1.com | UAC .sap.bpx. Choose “Workflow Pattern Customization”.sap.

com 6 . Go into menu structure “Microsoft SharePoint Integration Activities”.bpx. For example. Consumer Type = “SHAREPOINT_INT” Task Name = “SalesOrder” Property Name = “CUSTOMERID” External Field Name = “1” SAP COMMUNITY NETWORK © 2011 SAP AG SDN . 1.uac. register Customer ID as business property for Sales Order Approval. 2.sap.sap. Create new entry for CUSTOMERID for Sales Order approval. Go to transaction SIMGH.com | BPX .Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Register the XPROP in SCL Server In the SCL server (not the ERP system).com | BOC . 4. 3. you need to register the XPROP business properties for each workflow approval template.com | UAC .sdn.sap. Click on “Maintain Workflow Context Data”.boc.sap. Search menu Microsoft SharePoint Integration Activities.

com | BPX .sdn. you learned how to:  Pass business properties from SAP to SharePoint as XML payload for Duet Enterprise Workflow approval SAP COMMUNITY NETWORK © 2011 SAP AG SDN . In this document. Once the site is created and you send the sales order approval workflow task to SharePoint.bpx.uac. you need to register the business property CUSTOMERID passed from SAP.sap.com 7 .boc.sap.com | BOC .sap.sap. the customer ID value can be retrieved from the XML payload using SharePoint Designer. This can be done by adding external business property as shown on the below screen.Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Register the Business Property for the Sales Order Approval Site When you create a new approval site for Sales Order.com | UAC .

sap.com | BOC .com 8 .com | BPX .5 workflow approval blog How to decide if my workflow fits Duet Workflow Template? For more information.uac. Duet Enterprise Home Site SAP COMMUNITY NETWORK © 2011 SAP AG SDN .Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Related Content Duet 1.sdn.bpx.boc.com | UAC . visit the.sap.sap.sap.

System z9.com | BOC .com | BPX . DB2 Connect. BusinessObjects. Netfinity. ByDesign. the Adobe logo. POWER5+. z9. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Acrobat. Linux is the registered trademark of Linus Torvalds in the U. All other product and service names mentioned are the trademarks of their respective companies. Inc. Excel. System z. World Wide Web Consortium. POWER. Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Crystal Reports. and Motif are registered trademarks of the Open Group. JavaScript is a registered trademark of Sun Microsystems. z/OS.boc. ICA.sap. Data contained in this document serves informational purposes only. System x. SAP Business ByDesign. xSeries. without representation or warranty of any kind. PartnerEdge. VideoFrame. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only. if any. MVS/ESA. POWER6. System Storage. and other countries..A. System z10. z10. System p. iSeries.sdn. Outlook. GPFS. Crystal Decisions. OS/390. Windows. Power Architecture.Transfer Data from SAP to Microsoft SharePoint and Outlook 2010 – Duet Enterprise Workflow Part II Copyright © Copyright 2011 SAP AG. Duet. BladeCenter. and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. MetaFrame. Massachusetts Institute of Technology. Business Objects and the Business Objects logo. System i. PowerVM. R/3.sap. S/390. Inc. IBM. pSeries. zSeries. Microsoft. RETAIN. z/VM. and PowerPoint are registered trademarks of Microsoft Corporation. Redbooks. S/390 Parallel Enterprise Server. SAP COMMUNITY NETWORK © 2011 SAP AG SDN . Citrix. PowerPC.S. AS/400. OS/400.sap. Java is a registered trademark of Sun Microsystems. National product specifications may vary. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. Adobe. Business Objects is an SAP company. OS/2. RACF.com 9 . i5/OS. OpenPower. DB2 Universal Database. Inc. used under license for technology invented and implemented by Netscape. PostScript. Oracle is a registered trademark of Oracle Corporation. and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Xcelsius. System i5. UNIX. HTML. The information contained herein may be changed without prior notice. POWER6+. System p5. eServer. Nothing herein should be construed as constituting an additional warranty. HACMP. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services. and SAP Group shall not be liable for errors or omissions with respect to the materials. These materials are subject to change without notice. POWER5.bpx. SAP NetWeaver. AIX.com | UAC . and MultiWin are trademarks or registered trademarks of Citrix Systems. Web Intelligence.sap. All rights reserved.uac. SAP. XML. Parallel Sysplex. X/Open. Intelligent Miner. DB2. in the United States and in other countries. XHTML and W3C are trademarks or registered trademarks of W3C®. and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S. Program Neighborhood. WebSphere. WinFrame. BatchPipes. OSF/1.

Sign up to vote on this title
UsefulNot useful