2. Please Note
IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole
discretion.
Information regarding potential future products is intended to outline our general product direction and it should not be
relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver
any material, code or functionality. Information about potential future products may not be incorporated into any contract.
The development, release, and timing of any future features or functionality described for our products remains at our sole
discretion
Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment.
The actual throughput or performance that any user will experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage
configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve
results similar to those stated here.
2
4. What we will cover during this session
1. Use Cases of Integration and why companies integrate
2. Update on SAP Technology
3. The biggest hurdle – Single Sign On
4. Technology and Code Snippets
4
5. Use Cases of Integration
and why companies integrate
5
6. The reason why companies integrate SAP® into IBM®
Software are simple: speed of development, reach and cost
6
SAP has made huge investments in their Software stack over the last few years and is trying
to open new areas for their business (Mobile and in-memory databases)
BUT – SAP's heritage is being an ERP system that started on Mainframes decades back
All efforts SAP is driving are around business processes
–
Users (sometimes even companies) have to adjust to the process requirements and
layout
–
Focus is always on the process and what it needs, not on the user
Therefore development is always lengthy and complicated
–
Impact of design directly on business process
The user interfaces are design for the process – not for easy consumption by end-user
7. SAP is a classical system of records
7
SAP's main purpose is to create and maintain records on events in business processes
–
Examples: Orders, invoices, customer contacts
The design of the system is to drive the process and get a process or a workflow completed
in the most efficient way for the system – but the design was never and still is not for the
user
–
Simple example:
●
SAP Screens are usually overloaded
●
It is not easy to do simple things intuitively, like approving workflows
●
To find information – you need to know the transaction code
And this pattern continues, even on new technologies. Mobile streamlines the apps and the
UI – still it is developed by the same people so the focus remains the same
8. SAP Clients integrate with non-SAP systems to simplify
access to the SAP process at lower costs
8
Almost all integration projects are trying to address the casual SAP users - not the
professional users
Business processes fail where people are required in the process but are not accessing the
systems on a high frequent basis
–
Workflows are not approved timely, items get stuck until people approve them once a
week or when people ask them
–
Key process steps are blocked
–
Decision maker can't get accurate data because they don't know how to query a system
All integration projects always try to build bridges between the SAP System and other
systems that casual SAP users are working in
The goal is all the time to provide easy to use UX experiences that supports people to
get their job done fast and with lower costs than SAP
9. Current Customer examples
9
Access to SAP Information / workflow within Connections activity stream
–
Driver: better reach / easier integration of SAP processes for non core SAP users
–
Why IBM: new concept for interaction, reaching people on multiple channels
Workflow application in insurance company to manage client's damage claims and display
the status of the client's claim
–
Driver: web-based UI, Ease to use
–
Why IBM: focused Application, faster development cycle than SAP based solution
Customer order fulfillment application that migrates a paper based workflow to an electronic
one – displaying all relevant data for a client's order and supporting bits of data such as
order history
–
Driver: ease of use
–
Why IBM: shorter development cycle than in SAP, cost efficient
10. Make ERP Social is critical to empower users!
10
Integrating SAP and Social products is
really building bridges between 2
worlds / islands
It lets end users interact easier and
more efficient with the system “on the
other side”
Both sides have strength and
weaknesses – bridges help them to
benefit from each other strength and get
around own weaknesses
A lot of business processes are not
about workflows – they are about people
working together and collaborate !
17. A working single sign on between SAP and IBM is critical
for user acceptance
17
Users are tired of signing on to every service separately – on the other hand companies
need to enforce security rules and protect their information. Therefore secure Single Sign on
is a key requirement for Business Systems
Technically, Security is enforced by either user credentials or by a token that is shared
between the systems – latter also requires a user identity being management
Basically – both SAP and IBM rely on token / cookies for SSO – BUT
–
They are technically very different, use different crypto libraries
–
The tickets from one stack are not supported on the other stack
Standards like SAML or SSO solutions make it easier – still, understanding the basics helps
to get it right
18. Single Sign On – Token based
SAP uses an own token called SSO2 token
For HTTP requests, the token is inserted on the HTTP header as a cookie
18
SAP Netweaver Gateway / Web-services communicate via HTTP,
–
Also RFC connections via IBM® Lotus Connector for SAP® / SAP® JAVA Connector® can
handle SSO2 token
The really difficult task is to sign on for the first time and get the SSO2 token
There are a few obvious choices here:
–
Username / Password
–
SAML
–
Single Sign On Solution
–
Ticket verifier code (available from SAP, using crypto libraries to validate token)
19. Code example: get SSO 2 ticket via SAP JCo (1)
try {
JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
// trigger RFC
JCoFunction function = destination.getRepository().getFunction("BAPI_FLIGHT_GETLIST");
function.getImportParameterList().setValue("AIRLINE", "LH");
// call the function
function.execute(destination);
JCoAttributes attributes = destination.getAttributes();
System.out.println("SSO2 Ticket : " + attributes.getSSOTicket());
19
20. Code example: get SSO 2 ticket via SAP JCo (2)
URL url = new URL("HTTP://9.153.165.205:8000/sap/opu/sdata/sap/WFDECISIONTASKPROCESSING/");
System.out.print("Establishing 2nd connection to remote server...");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Cookie", ssocookie);
try {
if (conn.getResponseCode() != 200) {
throw new Exception("Server responded with status code " + conn.getResponseCode());
}
System.out.println("OK");
}
catch (ConnectException cex) {
throw new Exception("Unable to connect using URL " + url.toString());
}
20
21. Now, this looks good but …..
21
OpenSocial does not support handling of
cookies in the current version
–
So this mechanism does not really work
for Notes / Connections at this time
IBM® Connections® has a setting / extension
embedded that allows the gadget to access
existing SSO tickets in the browser context –
which means
–
If the user already has an existing SAP
cookie, SSO will just work without any
additional work
–
This can be achieved be either code,
that does one logon to SAP (through
any method, just to get the cookie) or
an SSO solution that retrieves the
cookie for the user.
23. Application development is what makes a platform different
from a product – and it is emerging
23
ICS is thinking about Application development and where to develop the platform
Application develop is not unified over the current stack with the lack of consistency of API's
and programming languages
Web Technologies are replacing Script languages and are becoming more and more
powerful and available
The delivery of applications is changing – from on-prem systems to Cloud based delivery
models
–
Easier consumption by clients
–
Sales channel through App-store for developer
–
Ongoing application improvements with no additional efforts on-premise
A lot of modern applications (especially web applications) use available (enterprise) services
and combine them into new applications
–
Most start-ups are in the cloud – very limited and predicable investment needed to get
going
24. The legacy of Alloy® by IBM and SAP
24
For those you don't remember, Alloy was a joint product of IBM and SAP to integrate SAP
Workflows and SAP Reports into the IBM Notes Client
Alloy saw the end of support early 2013 and is not available anymore
So: Why did IBM let this happen?
–
Alloy functionality can be achieved today in a much easier way through open
standards, without additional charges for the client
●
OData
●
OpenSocial
●
JScriptTM / HTML5TM
–
Licensing has also significantly changed on the SAP Side – to consume Gateway
services, existing users or dedicated SAP Netweaver Gateway user are required
●
No additional volume based fees – they only apply for anonymous access
In any case – the Alloy functionality is available through SAP Netweaver Gateway standard
service from SAP
25. Building a workflow approval App using Netweaver
Gateway
HTTP://help.sap.com/saphelp_gateway20sp08/helpdata/en/3c/748d7494d2474b81ea1066e32a6608/content.ht
m
25
26. In reality, it looks like this
<d:workitem_id>000000862647</d:workitem_id>
<d:status>READY</d:status>
<d:status_txt>Ready</d:status_txt>
<d:subject>Friedrich Neubauer's Leave Request</d:subject>
<d:type>W</d:type>
<d:priority>5</d:priority>
<d:task_name>WS12300111_0000000038</d:task_name>
<d:actual_owner />
<d:actual_owner_name />
<d:note_count>0</d:note_count>
<d:reassign_by>P00001911</d:reassign_by>
<d:reserved_by />
<d:act_dec>0000</d:act_dec>
<d:act_dec_agent />
<d:language>E</d:language>
<d:start_dl m:null="true" />
<d:end_dl m:null="true" />
<d:created_at>2008-02-21T12:08:12</d:created_at>
<d:created_by>0001809</d:created_by>
<d:gui_link>/sap/bc/gui/sap/its/webgui/?saplanguage=EN&~transaction=*/iwfnd/wf_webgui
P_WI=000000862647;P_TASK=TS12300097;P_SYS=ECC6;DYNP_OKCODE=OK
CODE</d:gui_link>
<d:mime_type />
26
<d:workitem_id>000000862647</d:workitem_id>
<d:description>Your worklist for approving leave requests contains a request that
you have to process. For more information, see the worklist. To view the worklist,
start the Web application for approving leave requests. Once you have processed
the request, the work item will automatically be set to "completed." automatically be
set to "completed."</d:description>
27. And – it can get even easier: SAP Netweaver Gateway can
also return the code as JSon
27
JSon allows the consumption of the SAP
data in a much easier way than OData as
it is the broader used protocol
Especially for modern languages, a JSon
library is certainly available
The data is self describing – developer do
not need to understand SAP to build an
application
"workitem_id":"000000862647","status":"READ
Y","status_txt":"Ready","subject":"Friedrich
Neubauer's Leave
Request","type":"W","priority":"5","task_name":"
WS12300111_0000000038","actual_owner":"","
actual_owner_name":"","note_count":0,"reassig
n_by":"P00001911","reserved_by":"","act_dec":
"0000","act_dec_agent":"","language":"E","start
_dl":null,"end_dl":null,"created_at":"/Date(1203
595692000)/","created_by":"0001809","gui_lin
k":"/sap/bc/gui/sap/its/webgui/?saplanguage=EN&~transaction=*/iwfnd/wf_webgui
P_WI=000000862647;P_TASK=TS12300097;
P_SYS=ECC6;DYNP_OKCODE=OKCODE","
mime_type":""
29. Which technology to use – getting started
●
29
In general – use what you understand
–
If you are a IBM® Lotus Script® Developer – develop Lotus Script
–
JavaTM Developers should stay w/ Java
–
Web Developers should use JavaScriptTM
From a technology point of view – SAP Netweaver Gateway is the most modern interface –
and the one the easiest to consume, if
–
You understand XML / REST / Atom
–
You have Gateway available (additional SAP install)
–
Your SAP department is supporting you
There is clearly nothing wrong on the RFC based way through Lotus Connector for SAP or
SAP JCo
30. IBM Lotus Script / IBM Lotus Connector for SAP Business
Suite code Example
Establish connection
sapconnection.server = pointer.server (0)
sapconnection.destination = pointer.sapid (0)
sapconnection.client = pointer.sapclient (0)
sapconnection.systemno = pointer.sapinstance (0)
sapconnection.language = pointer.saplanguage (0)
sapconnection.userid = pointer.sapuser (0)
sapconnection.password = pointer.sappassword (0)
' and define some general settings for the object
sapconnection.rfcuser = 1
sapconnection.enablesapgui = False
sapconnection.mapbyname = True
' now connect
sapconnection.connect
30
Access data
r3src.database = "DB_DBSYS_RELEASE"
r3src.metadata = "*"
statement = |FIELDS.1.FIELDNAME ="EXPORTSRELEASE"
,FIELDS.2.FIELDNAME ="EXPORTSDBSYSTEM"|
r3count = r3src.Execute (statement , r3fldlst)
Set r3liste = r3fldlst.copy
' now get the first record
count = r3src.fetch (r3liste,1,1)
If count > 0 Then
' there is some data
Set FRELEASE
= r3liste.lookup("EXPORTSRELEASE")
Set FDBSYSTEM = r3liste.lookup ("EXPORTSDBSYSTEM")
End If
31. Agent example for direct consumption of SAP data through
Odata (1)
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
Document doc = db.createDocument();
System.out.println("trying to connect");
// Call OData provider
ODataConsumer c = ODataConsumer.create("HTTP://9.153.165.205:8000/sap/opu/sdata/sap/Z_GWFLIGHT/",new
BasicAuthenticationBehavior("user","password"));
System.out.println("Connected");
31
32. Agent example for direct consumption of SAP data through
Odata (2)
for(OEntity so : c.getEntities("z_gwsflightCollection").execute()) {
doc.replaceItemValue("value", so.getProperty("value").getValue());
doc.replaceItemValue("arrdate", so.getProperty("arrdate").getValue());
doc.replaceItemValue("cityto", so.getProperty("cityto").getValue());
doc.replaceItemValue("curr", so.getProperty("curr").getValue());
doc.replaceItemValue("arrtime", so.getProperty("arrtime").getValue());
doc.replaceItemValue("price", so.getProperty("price").getValue());
doc.replaceItemValue("curr_iso", so.getProperty("curr_iso").getValue());
doc.replaceItemValue("deptime", so.getProperty("deptime").getValue());
doc.replaceItemValue("cityfrom", so.getProperty("cityfrom").getValue());
doc.replaceItemValue("airline", so.getProperty("airline").getValue());
doc.replaceItemValue("airportto", so.getProperty("airportto").getValue());
doc.save();
doc = db.createDocument();
}
} catch(Exception e) {
e.printStackTrace();
}
32
33. Consume SAP in XPages through Java Beans
Gateway consumption
package com.ibm.chi;
import org.OData4j.consumer.ODataConsumer;
import org.OData4j.consumer.behaviors.BasicAuthenticationBehavior;
import org.OData4j.core.OEntity;
import java.util.ArrayList;
public class GWFlightList {
private ArrayList<OEntity> FlightList = null;
public ArrayList<OEntity> getFlights() {
ODataConsumer c =
ODataConsumer.create("HTTP://9.153.165.205:8000/sap/opu/sdata/sap/Z_GWFL
IGHT/",new BasicAuthenticationBehavior("user","password"));
this.FlightList = new ArrayList<OEntity>();
for(OEntity flight :
c.getEntities("z_gwsflightCollection").execute()){
this.FlightList.add(flight);
}
return this.FlightList;
} }
33
JCo Code
...
public class FlightList {
private ArrayList<Flight> fl = null;
public ArrayList<Flight> getFlights() throws JCoException
{
......
JCoFunction function =
destination.getRepository().getFunction("BAPI_FLIGHT_GETLIST");
function.getImportParameterList().setValue("AIRLINE", "LH");
if(function == null)
throw new RuntimeException("BAPI not found in SAP.");
try { function.execute(destination); } catch (AbapException e) { return null; }
this.fl = new ArrayList<Flight>();
JCoTable flights=function.getTableParameterList().getTable("FLIGHT_LIST");
for (int i = 0; i < flights.getNumRows(); i++)
{
flights.setRow(i);
Flight fli = new Flight ();
fli.setAirline(flights.getString("AIRLINE"));
fli.setConnectid(flights.getString("CONNECTID"));
fli.setFlightdate(flights.getString("FLIGHTDATE"));
fli.setCityfrom(flights.getString("CITYFROM"));
fli.setCityto(flights.getString("CITYTO"));
fli.setDepttime(flights.getString("DEPTIME"));
fli.setPrice(flights.getString("PRICE"));
fli.setCurr(flights.getString("CURR"));
this.fl.add(fli);
}
return fl;
} }
36. OpenSocial Gadget code
The easy way – pointing to web-source
More sophisticated – using Dojo Toolkit
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Connect-Json" author_email="chi@your.domain">
<Require feature="opensocial-0.9" />
</ModulePrefs>
<Content type="url" view="canvas"
href="HTTP://9.153.165.203:8080/Connect-Demos/FlightListJSon" />
</Module>
function sapApproveClick()
{
var args=sapXHRArgsPost('0001');
var deferred=dojo.xhrPost(args);
return false;
}
36
function sapRejectClick()
{
var args=sapXHRArgsPost('0002');
var deferred=dojo.xhrPost(args);
return false;
}
37. The other way around – calling into SAP using Social
Business Toolkit
The Social Business Toolkit provides a easy way (Rest based) to integrate Social services
into other Applications – such as SAP
SAP Applications can address these Rest Interfaces easily and embed social services in
their Apps
–
JScript for anything that is web-based in SAP land
–
Java for direct access out of SAP Netweaver Java Server
–
Even ABAP can interact w/ Rest Services since SAP® WebAS® 7.40
●
Current docu and code snippets can be found at https://www.ibmdw.net/social/
●
The team is also hosting a set of events to help getting started
37
38. Reference Material
38
SAP Netweaver Gateway
http://scn.sap.com/community/developer-center/netweaver-gateway
–
Tools:
http://www.sdn.sap.com/irj/sdn/gateway?rid=/webcontent/uuid/a09fe802-c162-2e10-d59a-b
–
Code Snippets:
http://wiki.scn.sap.com/wiki/display/Snippets/SAP+NetWeaver+Gateway+-+Code+Snippets
SAP Workflow Whitepaper:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b01f6a02-5464-2e10-bd
SAP JCo
–
http://scn.sap.com/community/java
Lotus Connector for SAP Solutions
–
http://www.ibm.com/developerworks/lotus/documentation/sapconnector/
39. Related Sessions
IBM Domino
SHOW102: XPages: Still No Experience Necessary
AD201: IBM Domino Application Development: Today and Tomorrow
ID101: IBM Domino 2013 and Beyond
Exceptional Digital Experience
AD403: Developing Portlets Using Javascript and jQuery for Engaging Digital Experience
Solutions
OpenSocial
AD207: Widgets, Live Text and Now OpenSocial: Linking Your Data to the World!
Social Business Toolkit
AD301: What's New on the IBM Social Business Toolkit Version 2.0
39
40. Contact
Christian Holsing
IBM Collaboration Solutions – Business and Technical Strategy Team
IBM SAP International Competence Center
Altrottstrasse 31
69190 Walldorf
- Germany Phone: +49-7034-64-31021 | WalldorfOffice: +49 6227 73 1234 | Mobile: +49 160 96
93 69 01
Email: holsing@de.ibm.com
40
41. Engage Online
SocialBiz User Group socialbizug.org
– Join the epicenter of Notes and Collaboration user groups
Follow us on Twitter
Engage
– @IBMConnect and @IBMSocialBiz
Online
LinkedIn http://bit.ly/SBComm
– Participate in the IBM Social Business group on LinkedIn:
Facebook https://www.facebook.com/IBMSocialBiz
– Like IBM Social Business on Facebook
Social Business Insights blog ibm.com/blogs/socialbusiness
– Read and engage with our bloggers
41
42. Access Connect Online to complete your session surveys using any:
– Web or mobile browser
– Connect Online kiosk onsite
42