SAP Connector 1
2
Enables integration of data to and from:
SAP NetWeaver-based Systems External Systems
Function
3
 Makes it possible for businesses to synchronize their SAP data across
numerous systems, services, databases, and applications on-premise and in
the cloud.
 Enables simplified connectivity to SAP ECC, allowing businesses to quickly
and easily integrate information residing in multiple SAP instances, data
warehouses, applications, and service such as Salesforce, Google Apps and
the .NET Framework.
 The Anypoint™ Platform offers the components to extend SAP connectivity,
allowing your business to do more.
Benefits
4
Allow Mule Applications to:
SAP Java Connector (JCo) libraries
 Execute BAPI functions over the RFC protocol, supporting the following types:
 Synchronous RFC (sRFC)
 Transactional RFC (tRFC)
 Queued RFC (qRFC)
 Act as a JCo Server to be called as a BAPI over sRFC, tRFC and qRFC.
 Send IDocs over tRFC and qRFC.
 Receive IDocs over tRFC and qRFC.
 Transform SAP objects (JCo Function/BAPI & IDocs) to and from XML.
5
Allow us to:
SAP JCo Architecture
 Invoke Remote Function Modules.
 Parsing of IDocs (SAP Intermediate
Documents).
6
 Java API.
Handles dynamic metadata lookup and caching. It implements JCO.Function, which is the container for parameters
and/or tables for the SAP Function Module (BAPI) in Java. Java apps are built on top of the Java API.
 JNI (Java Native Interface)
JCo wraps C libraries in Java to provide platform-native access into the SAP system. RFC Middleware uses RFC
Library through (JNI) Layer.
 RFC (Remote Function Call).
Communication protocol with the SAP system. RFC means calling BAPI or triggering IDoc processing that runs in
another system as calling program. The RFC interface enables function calls between two SAP systems or between
the SAP and external system.
SAP JCo Architecture:Components
7
 RFC Library.
Libraries of C language-based functions to access the SAP system. RFC library is addressed by JNI.
 RFC Layer: SAP component that processes RFC calls.
 SAP Java IDoc Class Library.
Provides structured, high-level interpretation and navigation of SAP IDocs in Java. It consists of the following add-
on packages:
• SAP Java Base IDoc Class Library: a middleware-independent library that provides a set of general base
classes and interfaces for middleware dependent Java IDoc Class Library implementations.
• SAP Java Connector IDoc Class Library: a middleware-independent library for creating, sending, and
receiving IDocs.
 FM (Function Module).
Function modules are procedures that are defined in the ABAP language of SAP. It allows the encapsulation and
reuse of global functions in the SAP System.
SAP JCo Architecture:Components
8
 BAPI (Business Application Programming Interface).
Function Module that fulfills certain design criteria, such as:
Implements a method of a SAP Business Object.
Maintains a static interface through different versions of the SAP system.
Is remote-enabled.
Runs to completion with or without user interaction.
Handles errors.
 IDoc (Intermediate Document).
Standard SAP format for electronic data interchange between SAP systems.
 SAP NetWeaver.
Its main component is the SAP Web Application Server, which provides the runtime environment for SAP
applications.
 ABAP (Advanced Business Application Programming).
SAP’s proprietary programming language and part of the NetWeaver platform for building business applications.
SAP JCo Architecture:Components
9
RFC Connections
Synchronous (sRFC)
This type of RFC executes the function call based on synchronous communication, which means
that the systems involved must both be available at the time the call is made.
Transactional (tRFC)
Asynchronous communication method that executes the called function module in the RFC server
only once. The remote system need not be available at the time when the RFC client program is
executing a tRFC. The tRFC component stores the called RFC function, together with the
corresponding data, in the SAP database under a unique transaction ID (TID).
Queued (qRFC)
To guarantee that multiple transactions are processed in the order specified by the application,
tRFC can be serialized using queues (inbound and outbound queues). Implementation of qRFC is
recommended if you want to guarantee that several transactions are processed in a predefined
order.
10
SAPConnector vs SAP Compatibility
11
SAPConnector vs Mule Compatibility
12
SAP Objects Structure
All SAP objects (BAPIs and IDocs) can be
represented as XML documents for ease of
use.
 BAPIs.
For BAPIs, the SAP Connector offers a
proprietary format fully compatible with
DataWeave and DataMapper
 IDocs.
IDocs are already XML documents by nature
and the schema can be obtained with SAP
transaction WE60.
13
IDocs
Standard data structure for data
interchange between application
programs written for the
popular SAP business system or
between an SAP application and an
external program.
IDocs generated exists as a self-
contained text file that can then be
transmitted to the requesting
workstation without connecting to the
central database.
14
IDocs
Can be generated at any point in a transaction process.
Example:
1. After a user performs an SAP transaction, one or more IDocs are generated in
the sending database and passed to the ALE communication layer.
2. The communication layer performs a Remote Function Call (RFC), using
the port definition and RFC destination specified by the customer model.
3. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some
external system.
15
BAPI
Functions that are used to perform actions on
the SAP business objects. They are actually
methods of business objects.
Basically BAPI's are functions like any other
function in ABAP, so they have the same
characteristics: input parameters, output
parameters, tables, exceptions ..
 They support the Remote Function Call (RFC)
protocol.
 They are methods of a Business Object.
 They are processed without returning dialogs
to the program invoking them.
16
BAPI
 Import: Contains arguments values
when executing a BAPI/Function.
 Export: Contains output values after
executing a BAPI/function.
 Changing: Contains changing values
that can be sent and/or received
when executing BAPIs/functions.
 Tables: Contains tables whose values
can be used for input and output.
 Exceptions: When retrieving the BAPI
metadata, contains all the exceptions
the BAPI can throw.
17
SAP Transformers
The SAP endpoints receive and transmit SAP objects, which must be transformed
to and from XML within your Mule flow. MuleSoft bundles three SAP
transformers specifically designed to handle such transformation:
 SAP Object to XML.
 XML to SAP Function (BAPI).
 XML to SAP Idoc.

SAP Connector.

  • 1.
  • 2.
    2 Enables integration ofdata to and from: SAP NetWeaver-based Systems External Systems Function
  • 3.
    3  Makes itpossible for businesses to synchronize their SAP data across numerous systems, services, databases, and applications on-premise and in the cloud.  Enables simplified connectivity to SAP ECC, allowing businesses to quickly and easily integrate information residing in multiple SAP instances, data warehouses, applications, and service such as Salesforce, Google Apps and the .NET Framework.  The Anypoint™ Platform offers the components to extend SAP connectivity, allowing your business to do more. Benefits
  • 4.
    4 Allow Mule Applicationsto: SAP Java Connector (JCo) libraries  Execute BAPI functions over the RFC protocol, supporting the following types:  Synchronous RFC (sRFC)  Transactional RFC (tRFC)  Queued RFC (qRFC)  Act as a JCo Server to be called as a BAPI over sRFC, tRFC and qRFC.  Send IDocs over tRFC and qRFC.  Receive IDocs over tRFC and qRFC.  Transform SAP objects (JCo Function/BAPI & IDocs) to and from XML.
  • 5.
    5 Allow us to: SAPJCo Architecture  Invoke Remote Function Modules.  Parsing of IDocs (SAP Intermediate Documents).
  • 6.
    6  Java API. Handlesdynamic metadata lookup and caching. It implements JCO.Function, which is the container for parameters and/or tables for the SAP Function Module (BAPI) in Java. Java apps are built on top of the Java API.  JNI (Java Native Interface) JCo wraps C libraries in Java to provide platform-native access into the SAP system. RFC Middleware uses RFC Library through (JNI) Layer.  RFC (Remote Function Call). Communication protocol with the SAP system. RFC means calling BAPI or triggering IDoc processing that runs in another system as calling program. The RFC interface enables function calls between two SAP systems or between the SAP and external system. SAP JCo Architecture:Components
  • 7.
    7  RFC Library. Librariesof C language-based functions to access the SAP system. RFC library is addressed by JNI.  RFC Layer: SAP component that processes RFC calls.  SAP Java IDoc Class Library. Provides structured, high-level interpretation and navigation of SAP IDocs in Java. It consists of the following add- on packages: • SAP Java Base IDoc Class Library: a middleware-independent library that provides a set of general base classes and interfaces for middleware dependent Java IDoc Class Library implementations. • SAP Java Connector IDoc Class Library: a middleware-independent library for creating, sending, and receiving IDocs.  FM (Function Module). Function modules are procedures that are defined in the ABAP language of SAP. It allows the encapsulation and reuse of global functions in the SAP System. SAP JCo Architecture:Components
  • 8.
    8  BAPI (BusinessApplication Programming Interface). Function Module that fulfills certain design criteria, such as: Implements a method of a SAP Business Object. Maintains a static interface through different versions of the SAP system. Is remote-enabled. Runs to completion with or without user interaction. Handles errors.  IDoc (Intermediate Document). Standard SAP format for electronic data interchange between SAP systems.  SAP NetWeaver. Its main component is the SAP Web Application Server, which provides the runtime environment for SAP applications.  ABAP (Advanced Business Application Programming). SAP’s proprietary programming language and part of the NetWeaver platform for building business applications. SAP JCo Architecture:Components
  • 9.
    9 RFC Connections Synchronous (sRFC) Thistype of RFC executes the function call based on synchronous communication, which means that the systems involved must both be available at the time the call is made. Transactional (tRFC) Asynchronous communication method that executes the called function module in the RFC server only once. The remote system need not be available at the time when the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, together with the corresponding data, in the SAP database under a unique transaction ID (TID). Queued (qRFC) To guarantee that multiple transactions are processed in the order specified by the application, tRFC can be serialized using queues (inbound and outbound queues). Implementation of qRFC is recommended if you want to guarantee that several transactions are processed in a predefined order.
  • 10.
  • 11.
  • 12.
    12 SAP Objects Structure AllSAP objects (BAPIs and IDocs) can be represented as XML documents for ease of use.  BAPIs. For BAPIs, the SAP Connector offers a proprietary format fully compatible with DataWeave and DataMapper  IDocs. IDocs are already XML documents by nature and the schema can be obtained with SAP transaction WE60.
  • 13.
    13 IDocs Standard data structurefor data interchange between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs generated exists as a self- contained text file that can then be transmitted to the requesting workstation without connecting to the central database.
  • 14.
    14 IDocs Can be generatedat any point in a transaction process. Example: 1. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. 2. The communication layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. 3. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.
  • 15.
    15 BAPI Functions that areused to perform actions on the SAP business objects. They are actually methods of business objects. Basically BAPI's are functions like any other function in ABAP, so they have the same characteristics: input parameters, output parameters, tables, exceptions ..  They support the Remote Function Call (RFC) protocol.  They are methods of a Business Object.  They are processed without returning dialogs to the program invoking them.
  • 16.
    16 BAPI  Import: Containsarguments values when executing a BAPI/Function.  Export: Contains output values after executing a BAPI/function.  Changing: Contains changing values that can be sent and/or received when executing BAPIs/functions.  Tables: Contains tables whose values can be used for input and output.  Exceptions: When retrieving the BAPI metadata, contains all the exceptions the BAPI can throw.
  • 17.
    17 SAP Transformers The SAPendpoints receive and transmit SAP objects, which must be transformed to and from XML within your Mule flow. MuleSoft bundles three SAP transformers specifically designed to handle such transformation:  SAP Object to XML.  XML to SAP Function (BAPI).  XML to SAP Idoc.