Your SlideShare is downloading. ×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

WSO2Con US 2013 - Using WSO2 ESB to integrate and SAP ERP


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Using WSO2 ESB to Integrate and SAP ERP Igor Mameshin Accenture
  • 2. What, Where, Why and How? • What? Hybrid Cloud Integration. Most organizations will use hybrid cloud approach, which is a combination of private computing resources and public services, with integration touch points between these environments. – Where? Cloud Based Integration Backbone. Cloud-based infrastructure with a rich portfolio of application adapters that simplify connectivity to external systems such as ERP applications (SAP, Seibel), social platforms (Twitter, Facebook), SaaS (, NetSuite, PayPal), and other integration endpoints. – Why? Allows to implement interoperability between the cloud and on-premise environments. Better than on-premise integration tools. – How? Developed a proof of concept: SFDC to SAP Integration using WSO2 technologies.
  • 3. Service integration and governance are critical to creating an agile cloud IT ecosystem – If governance was a challenge in the past, cloud introduces new and more complex risks – Changing role of IT and the business – risk of IT losing alignment to the business, who are driving cloud services within the enterprise – Service integration and interoperability
  • 4. Hybrid Cloud Management via Broker
  • 5. Accenture Cloud Platform accelerates cloud adoption with the integration and orchestration of cloud services • Aggregate. Comprehensive catalog of services offered through a centralized, online storefront • Integrate. Cloud provider and value-added services are pre-integrated and available via self-service to users • Automate. Services are automated and orchestrated for on-demand request and fulfillment • Manage. Services are monitored and managed with online dashboards, and metered and charged-back centrally
  • 6. Infrastructure Architecture
  • 7. Integration Use Cases Use Case Description SFDC Account to SAP Customer Master Create When an Account Type is updated from Prospect to Customer in, create a new Customer in SAP SFDC Account to SAP Customer Master – Update When a Customer Account is updated in Salesforce, update the corresponding Customer record in SAP Update SFDC Chatter window When a Customer is created or updated in SAP, Salesforce chatter is updated: “Updated customer record in SAP, customer ID ##" Account Account Chatter iPaaS iPaaS iPaaS Customer Customer Transaction Status
  • 8. Integration Approach WSO2 ESB is used as a cloud based integration backbone to pass messages from system to system: – – – Provides agility and flexibility to adopt to future change and growth Location transparency, transformation, routing, protocol conversion Reliable messaging, security, monitoring/management Application-level integration uses the native application's integration frameworks and APIs: – – – It preserves the application's data integrity Allows real-time Integration between Salesforce and SAP Provides application level security and audit trail Salesforce SOAP API, REST API, and WSO2 Salesforce Connector: – – Outbound messaging is part of the workflow rule functionality in Salesforce Workflow Rules send SOAP messages over HTTPS to a designated ESB endpoint SAP JCO API and WSO2 SAP Connector: – – – SAP adapter implements two types of connections: BAPI/RFC and IDoc transport We used IDoc transport due to scalability and performance advantages SAP JCO middleware library establishes connections on TCP port 3300
  • 9. Connector • Download Salesforce connector: • Add Salesforce Cloud connector mediation library in WSO2 ESB ESB Console: Manage > Mediation Libraries > Add Click import link. Click yes to confirm.
  • 10. Connector • New: Salesforce cloud connector in Developer Studio Click on 'Import Cloud Connector' from the project context menu.
  • 11. Salesforce Mediation Library • The WSO2 SFDC mediation library contains a set of ESB templates and it supports following operations. • Log in • Logout • Create • Update • Query and QueryMore • You can invoke any of these operations inside the ESB configuration by using Call Template Mediator.
  • 12. Usage of ESB Templates • Query <call-template target="org.wso2.carbon.mediators.salesforce.query"> <with-param name="salesforce.query.queryString" value="select name from account”/> </call-template>
  • 13. Usage of ESB Templates • Login <call-template target="org.wso2.carbon.mediators.salesforce.login"> <with-param name="salesforce.password" value=“XXXXcP55iu429U343vUEDVQnug6wd"/> <with-param name="salesforce.username" value=“"/> </call-template> • Create <urn:create xmlns:urn = "" xmlns:urn1 = ""> <!--Zero or more repetitions:--> <urn:sObjects> <urn1:type>?</urn1:type> <!--Zero or more repetitions:--> <urn1:fieldsToNull>?</urn1:fieldsToNull> <urn1:Id>?</urn1:Id> <!--You may enter ANY elements at this point--> </urn:sObjects> </urn:create> <call-template target="org.wso2.carbon.mediators.salesforce.create"/>
  • 14. Configure SAP Connector on WSO2 ESB • Install SAPJCO library • Configure SAP Endpoint Properties JCOCLIENT.dest JCOSERVER01.server • Configure new ESB Transport <transportSender name=”idoc” class=" r"/>
  • 15. Configure Salesforce Outbound Messages • Login to Salesforce.Com • Click User name | Setup | Create | Workflow & Approvals | Workflow Rules and create a new workflow rule that fires when a candidate is created or when a candidate is edited and did not previousl meet the rule's criteria.
  • 16. Salesforce Workflow Rules
  • 17. Define Salesforce Outbound Messages
  • 18. ESB Proxy to receive Salesforce message
  • 19. Map Salesforce and SAP IDoc schemas
  • 20. XSLT transform & send IDoc in ESB Proxy <proxy xmlns=" e" name="SFToSAP"> <target> <inSequence> <xslt key=”Account.xsl”/> <property name="OUT_ONLY" value="true"/> <send> <endpoint> <address uri="idoc:/JCOCLIENT"/> </endpoint> </send> </inSequence> </target> </proxy>
  • 21. Receive an IDOC from SAP System <proxy xmlns="" name="SAP2SF" transports="idoc" statistics="enable" trace="enable" startOnLoad="true"> <target> <inSequence> <header name="Action" value="urn:customHeader"/> <property name="OUT_ONLY" value="true" scope="default" type="STRING"/> <property name="messageType" value="text/xml" scope="axis2" type="STRING"/> <!-- Do the transformation of the incoming IDOC XML-> Salesforce Request. --> </inSequence> </target> <parameter name="">enabled</parameter> <parameter name="">JCOSERVER01</param eter> <parameter name="">enabled</parameter > <description></description>
  • 22. ESB Proxy to update Salesforce Chatter • Prior to this call obtain a new OAuth access token by sending a POST request to the token request endpoint <sequence xmlns="" name="chatterFeedSeq"> <property xmlns:ns="http://org.apache.synapse/xsd" name="access_token" expression="//access_token"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="Authorization“ expression="fn:concat('Bearer ', $ctx:access_token)" scope="transport"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="REST_URL_POSTFIX" expression="$ctx:msg_param" scope="axis2"/> <property name="HTTP_METHOD" value="POST" scope="axis2"/> <endpoint> <address uri=" " format="rest"/> </endpoint> </send> </sequence>
  • 23. SAP Configuration • Login to SAP GUI • Create logical system and RFC destination • Create Port to associate with RFC Destination and Partner profile. • Partner Profile will have Inbound and Outbound IDOC Parameters that includes IDOC type Message type and Function Module. • Data in the format of IDOC can flow from SAP to any other system and vice versa through ALE (Application Link Enabling). • Former is usually called Outbound IDOC and latter is Inbound IDOC.
  • 24. SAP Configuration: Partner Profile • Transaction WE20 for Maintenance of the Partner Profile. In the logical system that is chosen as a partner add the message type based on the direction of the interface.
  • 25. What is an IDOC? • IDoc is a SAP supported data document format to transfer data in a hierarchical structure. • IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. • IDocs are used for asynchronous transactions, provide scalability and performance advantages • Data gets stored intermediately in temporary tables and can be used for recovery or reprocessing to avoid data loss.
  • 26. IDoc Examples Business type IDOC type Material MATMAS Bill Of Material BOMMAT HR User HRMD_A Customer DEBMAS Supplier CREMAS Invoice INVOIC
  • 27. WEDI – Manage IDOC implementation
  • 28. Transaction WE60 to get IDoc XML schema
  • 29. Integration in Action
  • 30. Account Update
  • 31. SAP Customer Master Synch
  • 32. SAP Inbound IDoc Messages • Run transaction WE02 to check the status of the inbound IDoc
  • 33. SAP Inbound IDoc Message Details •• Status 53 means IDoc has been processed Status 53 means IDoc has been processed successfully. successfully.
  • 34. Salesforce Chatter Update
  • 35. Lessons Learned • WSO2 ESB is a powerful and stable product • For your first integration flow, consider engaging a WSO2 consultant or work with an experienced WSO2 partner • WSO2 documentation for Salesforce and SAP connectors is immature • SAP Documentation for IDOCs is not complete/confusing • To avoid project delays, make sure you have the following roles on your team: – – – – – SAP Admin SAP DBA SAP ABAP Developer with ALE/IDoc experience Network Admin OS Admin
  • 36. References WSO2 Connectors Guide: http :// rs WSO2 SAP Integration Guide: Salesforce REST API Developer’s Guide: http:// df Salesforce SOAP API Developer’s Guide: http://
  • 37. Thank You