This action might not be possible to undo. Are you sure you want to continue?
Authored by: Kevin Wilson
Author: Kevin Wilson
Page 1 /24
TABLE OF CONTENTS
CHAPTER 1 SAP CONNECTORS 3 1.1 SAP .NET CONNECTOR ---------------3 1.2 SAP JAVA CONNECTOR --------------3 1.3 SAP DCOM CONNECTOR -------------3 1.4 SAP BUSINESS CONNECTOR -------3 1.5 RFC LIBRARY -----------------------------3 CHAPTER 2 .NET CONNECTOR 4 2.1 OVERVIEW----------------------------------4 CHAPTER 3 JAVA CONNECTOR 5 3.1 OVERVIEW----------------------------------5 CHAPTER 4 DCOM CONNECTOR 6 4.1 OVERVIEW----------------------------------6 4.2 FEATURES----------------------------------6 4.3 TECHNOLOGY-----------------------------6 4.4 ARCHITECTURE---------------------------7 4.5 TRANSACTIONAL MODEL-------------7 4.6 RESOURCE POOLING-------------------8 4.7 THE OBJECT BUILDER-----------------9 4.8 PROGRAMMING CLIENTS FOR BAPIS IN VB..................................................................11 CHAPTER 5 COM4ABAP 13 5.1 OVERVIEW---------------------------------13 CHAPTER 6 BUSINESS CONNECTOR 14 6.1 OVERVIEW---------------------------------14 6.2 ARCHITECTURE-------------------------14 6.3 HARDWARE REQUIREMENTS------15 6.4 SOFTWARE REQUIREMENTS------15 6.5 BUSINESS CONNECTOR-------------16 6.6 SAP BC INTEGRATOR-----------------19 CHAPTER 7 RFC LIBRARY 22 7.1 OVERVIEW---------------------------------22 APPENDIX A. GLOSSARY 23
Author: Kevin Wilson
Page 2 /24
NET components from any mySAP. Thus the SAP BC seamlessly integrates different IT architectures with SAP Systems.com application (outside-in). Java to SAP System as well as SAP System to Java calls. The RFC Library is the most commonly used and installed component of existing SAP Software. g.5 RFC LIBRARY The RFC Library offers an interface to a SAP System.CHAPTER 1 SAP CONNECTORS The SAP Connectors allow the integration of different applications and technologies with SAP Systems via open standards.). The SAP BC provides bidirectional. 1.NET Connector offers developers the possibility to expose BAPIs and remotelyenabled function modules to any . The connectors are means for technical interoperability of SAP Components (written in ABAP or ABAP Objects) and other components (e. In particular. etc.3. Moreover. The SAP BC is a main part of the SAP Internet Initiative.NET application (inside-out). C++. 1. This interface provides the opportunity to call any RFC Function in a SAP System from an external application.4 SAP BUSINESS CONNECTOR The SAP Business Connector (SAP BC) allows you to highly automate and extend your business processes over the Internet using open and non-proprietary standards. Visual Basic. 1.1 COM4ABAP com4abap is a multi-thread server that can expose any COM automation interface to an ABAP program and also offers semi-automatic type conversion between ABAP and COM data types. the RFC Library offers the possibility to write a RFC Server Program. Delphi or any other COM-compliant language) on the basis of Microsoft´s Distributed Component Object Model (DCOM). It is also possible to access . C++. 1. which is accessible from any SAP System or external application. 1. Java. 1. Cobol. written in Java. .2 SAP JAVA CONNECTOR The SAP Java Connector (SAP JCo) is a toolkit that allows a Java application to communicate with any SAP system. It combines an easy to use API with unprecedented flexibility and performance.3 SAP DCOM CONNECTOR The DCOM Component Connector is a means for technical interoperability of SAP Components (written in ABAP or ABAP Objects) and COM Components (written in VB. it allows you to address components that do not have their own user interface. real-time as well as asynchronous communication to and from a SAP System.NET. The package supports both.1 SAP . Most SAP Connectors use the RFC Library as communication platform to SAP Systems.NET CONNECTOR The SAP . Author: Kevin Wilson Page 3 /24 .
the SAP .NET application independently of your preferred .com application (outside-in).NET application (inside-out). Now it is possible to also access .NET Connector will perform and manage all necessary communication between the . Author: Kevin Wilson Page 4 /24 . The SAP .NET applications for all existing SAP R/3 systems as well as for the new Web Application Server. Availability Currently.NET project.NET language (C#. You then can access all properties. At design-time the new Proxy Wizard for Visual Studio . All this is taking place within the familiar Visual Studio .NET allows the integration of SAP business data and processes into . At run-time the SAP .NET application and the SAP server.NET applications in a very comfortable and intuitive way.509 certificates or Microsoft Passport. methods and even table structures from your . For communication security you can use Kerberos. Generated code for logon and connecting to an SAP system as well as Intelligence support facilitate the process of building your first application. X.CHAPTER 2 .NET Connector works with all SAP application servers starting with release 3.NET CONNECTOR 2. Transactional RFC or queued RFC are supported.NET Connector offers developers the possibility to expose BAPIs and remotelyenabled function modules to any .NET Connector is a beta product. which means access to .1 OVERVIEW The SAP .NET development environment. The release of the final product is planned for the middle of 2002. The Proxy Wizard will interactively generate proxy classes in C# and add them to your . Transparent for the application both SOAP or SAP RFC can be used as communication protocols.1I.NET components from any mySAP. VB or any other supported language).
It combines an easy to use API with unprecedented flexibility and performance. multi-byte languages) Easy to install and deploy. The package supports both. Author: Kevin Wilson Page 5 /24 . Supports inbound (Java client calls BAPI or RFM) and outbound (ABAP calls Java server) calls. and queued RFC. The SAP Java Connector is the best choice for building SAP-enabled Java applications because of the following features: • • • • • • • • High-performance JNI-based RFC middleware Supports R/3 3. Java to SAP System as well as SAP System to Java calls.1 OVERVIEW The SAP Java Connector is a toolkit that allows a Java application to communicate with any SAP system. Supports client pooling (good for web servers). transactional (important for IDocs). Supports synchronous. Multi-platform Complete and correct code-page handling (incl.1H and higher (and other mySAP components that have BAPIs or RFMs).CHAPTER 3 JAVA CONNECTOR 3.
This transport contains a function group necessary for outbound communications. The components also provide automatic type mapping between ABAP and automation data types (including conversion of ABAP internal tables into ADO Recordsets). This also improves runtime performance. It is available on request from SAP. The MTS defines an application Author: Kevin Wilson Page 6 /24 . and efficient manner. including Internet protocols such as TCP and HTTP. scalable. transactional.3 TECHNOLOGY The Distributed Component Object Model (DCOM) enables COM software components to communicate directly over a network in a reliable. DCOM is based on the Open Software Foundation's DCE-RPC spec and will work with both Java™ applets and ActiveX™ components through its use of the Component Object Model (COM). the SAP DCOM Connector also contains a generic RFC server. and managing high performance.2 • • • FEATURES Create proxy objects that allow you to address BAPIs from within an external program Create proxy objects that allow you to address remote function modules from within an external program.CHAPTER 4 DCOM CONNECTOR 4. native object transport for Windows NT and Windows® 95. which forms part of the RFC SDK. MTS itself is a component-based transaction processing system for developing. using either synchronous. The components that you create using the Object Builder can be used in the following environments: • • • • • • Visual C++ Visual Basic and VBA Java (Microsoft VM) Active Server Pages VB Script Java Script 4. The only requirement is that you first apply a special transport to your system. Using the the SAP DCOM Connector and MTS allows you to create distributed applications without having to install the SAP DLL or COM component on each client machine. thus providing an entry point to the R/3 System that you can address using many different programming languages and application environments. which allows you to address any COM component from within ABAP using a set of special remote function calls. The Microsoft Transaction Server (MTS) is based on COM and uses DCOM for component-tocomponent communications across a network. 4. allows you to expose BAPIs and remotely-enabled function modules as COM components. DCOM is a fast.1 OVERVIEW The SAP DCOM Connector. which gives you strong typing at compile time. and Intranet server applications. secure. since your components do not have to retrieve type information from the R/3 System at this time. From Release 4. or queued RFC The SAP DCOM Connector allows you to: Use the generic RFC server Com4Abap to address COM components easily from an ABAP program The SAP DCOM Connector is an early-binding tool.6D onwards. Internet. and robust enterprise. You can use this outbound server in any system from 4. DCOM is designed for use across multiple network transports. deploying.0B upwards.
When you program using the SAP DCOM Connector. it is important to know whether the function in question is from Release 3.5 TRANSACTIONAL MODEL A transaction is an inseparable sequence of database operations that transforms the database from one consistent state to another consistent state. If you write an HTML client (Web application). you can create COM components that expose one or more BAPIs or remotely-enabled function modules. 4. or whether you have to commit them yourself. It also provides a run-time infrastructure for deploying and managing these applications. Once you have created a component.programming model for developing distributed component-based applications. You can then use it in your client applications. The Object Builder also adds certain adminstrative methods to the component.1 Transaction Model for BAPIs When you program against BAPIs using the DCOM Connector. Each BAPI or function module in the component appears as a separate method.5. If you write your client in a language that supports COM. Author: Kevin Wilson Page 7 /24 . the program can access the package directly. since there are differences in the transactional behavior. you can install it in a Microsoft Transaction Server package. 4.x or from Release 4. 4. it is important to know how the components you are using behave with respect to transactions. These database operations must operate on the "all or nothing" principle – they must either all be carried out or all be canceled.4 ARCHITECTURE Using the Object Builder.0 or higher. you must use Active Server Pages (ASP) to run server-side scripts that can communicate with your COM component. The most important question is whether the changes you make are committed automatically.
In other cases. If it has.5. From here. the client program sends the function call to the R/3 System and waits until it is complete. Instead.6 RESOURCE POOLING If you choose to use the Microsoft Transaction Server (MTS) with the SAP DCOM Connector.5. it keeps it in a connection pool. whether the function module was actually processed in R/3 before the operation failed). In qRFC. since you risk duplicating a completed function call.2 BAPIs From Release 4. 4. Each RFC connection is characterized by the following properties: • • Target system Client Author: Kevin Wilson Page 8 /24 .4. For cases where you need to specify a particular processing order. refer to its documentation and source code. it will automatically take care of resource pooling and thread management for you. you can use transactional RFC. A function call cannot be executed until all of its predecessors in the queue have been processed. you place each function call in a logical queue.5. however. Queued RFC calls are processed asynchronously. Instead. When you attempt to process the transaction. and commit them or roll them back as a block.1 RFC Connections Communication between an MTS component and the R/3 System uses Remote Function Call (RFC). which guarantees that each function call you issue will only be executed once. and queued. 4.0.1. BAPI calls are no longer automatically committed by the system.2. Some function modules contain their own implicit or explicit commits.1. This section explains which resources can be pooled by the MTS and the benefit that you gain from this.5. you must commit them using the CommitWork method (equally.2.1 BAPIs From Release 3. you need to call the CommitWork method yourself.2. the system checks whether that TID has already been processed.5. 4. Since there is considerable overhead involved in establishing these connections. you can use queued RFC. To find out which case applies to a particular function module. The system implements this safeguard by assigning a unique transaction ID (TID) to each transaction that you submit. 4. the system will release it. To alleviate this problem. each BAPI call forms its own transaction. 4.0 Onwards From Release 4. you cannot guarantee the order in which the function calls will be processed in the system (it is quite possible that one call might overtake another).x Up to and including Release 3. If after a certain period the object has still not been used.1. it can be reused by another object.1 Synchronous RFC In synchronous RFC.6. the transaction is ignored. with the system automatically calling the ABAP COMMIT WORK statement at the end of the BAPI. you need to decide between three types of RFC – synchronous. which is an extension of transactional RFC. 4. the system cannot tell at what point the error occurred (most crucially.2 Transaction Model for RFC When you create COM components for remotely-enabled function modules. One practical consequence of this is that you can now combine several BAPI calls into one SAP LUW (transaction). the MTS does not release a connection as soon as an object has finished with it.5. 4.3 Queued RFC When you use transactional RFC. you can roll them back using RollbackWork).2 Transactional RFC If an error occurs during a synchronous remote function call. even if you submit it repeatedly to the R/3 System. Restarting a failed call is therefore a dangerous thing to do. transactional.
enter the name to be assigned to the make file of the C++ project. the performance of the application will be improved. the list of objects available for selection is displayed in hierarchical form. This name is automatically copied into the Target DLL field as well. 5. Position the cursor on a business object that you want to include in your COM component and choose Add.7 THE OBJECT BUILDER The Object Builder is the part of the SAP DCOM Connector that you use to generate proxy COM objects for BAPIs and remotely-enabled function modules. 7. 4. For further information. Below this. Select the RFC type that you want to use.1 Structure The Object Builder contains three parts.• • User name Password • Language A pooled resource can only be reused by an object with the same properties. Choose Build Component DLL.7.7. In the top-left hand corner of the screen. 6. An input field appears. 4. Each business object that you select will be a class within the COM object. Enter a namespace name. you log onto the R/3 System containing the BAPIs or function modules for which you want to generate proxies. Generating the source files Author: Kevin Wilson Page 9 /24 . In the COM/MTS group box.7. but you can enter any value. A list of all of the business objects in that system appears. The default is the system name. 3. Thus resource pooling is of considerable importance in Web scenarios. 8. Select the destination to which you want to log on. If you are using Windows 2000 or Windows NT with the Microsoft Transaction Server and want to use the component in the MTS environment. You can create this by creating a new destination in the DCOM Connector. Any logon information that has been stored for that destination will automatically appear in the relevant input fields.4 The Generation Process When you generate a COM component using the Object Builder. 4. 4. you set the various options for the C++ project that is created during the generation process. the DCOM Connector performs two steps: 1. If the MTS can allocate an existing connection to these requests. select the Session Object option. It will be the first part of the ProgID of the class. The BAPIs of the object will be methods of the corresponding class. refer to The Transaction Model. 9. 4. because there will be many requests using the same connection parameters. 4.3 Procedure 1. because you no longer have the overhead associated with creating new RFC connections. This connects to the destination.7. Fill out any remaining logon details and choose Logon. 2. where several users share a single R/3 user. This creates the C++ project and generates the COM component. choose Install Component DLL in MTS.2 Prerequisites There must already be a destination that points to the system whose BAPIs or function modules you want to use. On the righthand side of the screen. in which a name for the session object is already proposed. If you want the Object Builder to generate a session object.
cpp Function Implementation of a proxy object (such as as a business object).h <ObjectType>. This is needed to generate the type library.7. DEF file with the exported functions of the DLL The C++ source file containing standard includes Include file for standard includes with type definitions This include file is created by Visual Studion.4. It is required by the resource file Project.rc <project>.h Function Description of the fields of the corresponding ABAP Dictionary structure Author: Kevin Wilson Page 10 /24 .cpp <project>AfX.4. InterfaceID. The file contains the definitions of all COM interfaces with the corresponding GUIDs for the selected objects of the project. the following source files are generated: 4. Methods of the DCOM Connector Template Library are used to call remote function modules in R/3 The class definition for the corresponding proxy object Description of the registry entries to be created (including the ProgID.h 4.7.2 Object Type Source Files The following files are created for each object type: Filename <ObjectType>.3 Structure Type Source Files The following files are created for each structure type: Filename <StructureType>. as well as other functions for creating object types (from a class factory) and for registration Resource file for the project Interface Definition Langauge (IDL) source containing the interface description.cpp Function Project file Contains the obligatory function DLLMain.def <project>AfX.rgs 4.1 Project Source Files Filename <project>. and system data) <ObjectType>.h <Project>Res.4. Compiling and linking the DLL During this process.idl <project>.mak <project>. user.7.rc <project>.2.
PutSessionInfo function. Use the PutSessionInfo method to set the connection parameters for the object. Create an instance of the session object. The component T20Saleslib is a DCOM proxy for the business object SalesOrder plus a corresponding session object.0B or higher.8. 3.4. The Get Sales Orders function is implemented in the routine cmdGet_Click.4 Files Generated by Compiling and Linking The following files are generated when the DCOM Connector compiles and links the project: Filename <project>. 5. It contains data from the IDL file LIB file Output from the Microsoft IDL and C++ compilers and linkers is diverted into this file. and the Exit function is implemented in the cmdExit_Click routine. The Source Code Private Sub cmdGet_Click() Dim oSession As New T20salesLib. as long as you change the logon data in the oSession.log Function Contains definitions for interfaces and generates headers for interfaces to objects from R/3. _"800" Author: Kevin Wilson Page 11 /24 . Release the objects that you have used.lib <project>.2 Procedure 1.h <project>.4. 6.dll 4. 2. "LETMEIN".Recordset Dim oReturn As ADODB. containing the interface description exposed by R/3 objects The DLL that is actually installed.Recordset oSession. The data grid control is called DataGrid1.7. 4. Create instances of the relevant business objects Call the BAPIs that you need Call the CommitWork() method of your session object.tlb <project>. The example is contained in a standard EXE project with a single form called Form1.SalesorderSessionComponent Dim oOrders As Object Dim oOrderList As ADODB. <project>. "EN".1 Prerequisites You must already have created and installed the proxy object and session object. 4. It should work with any IDES System with Release 4.8. The LOG file contains details of all errors that occurred during compilation and linking The type library of the project.1 Example The following program retrieves a list of sales orders from an R/3 System and displays them in a Visual Basic program. "TESTUSER".2.8 PROGRAMMING CLIENTS FOR BAPIS IN VB Use this procedure to program a VB client that calls BAPIs using a session object.PutSessionInfo "T20 [PUBLIC]". 4. Also contains the type library.8. 4.
2 Structure The component inherits from the transactional RFC interface of the SAP DCOM Connector (ISAPTRfcConnector). it supports transactional RFC. They should be formatted as a text stream. SalesOrders:=oOrders) Set DataGrid1.Set oOrders = oSession. "SALESORDERS".BapiGetList(CustomerNumber:="0000001000".DataSource = oOrders DataGrid1.8.DimAs "BAPIGETLIST".Refresh Set oOrders = Nothing Set oSession = Nothing End Sub Private Sub cmdExit_Click() Unload Form1 End Sub 4.DimAs "BAPIGETLIST". To submit the IDOCs.SalesOrder.3. "RETURN". oReturn Set oOrderList = oOrders.3.8. 4.CreateInstance("T20.1") oOrders. 184.108.40.206. It calls the R/3 function modules INBOUND_IDOC_PROCESS (in the case of a version 2 IDOC) or IDOC_INBOUND_ASYNCHRONOUS (in the case of a version 3 IDOC). 4.3 Integration You can use the IDOC RFC proxy in any of the development environments supported by the SAP DCOM Connector Author: Kevin Wilson Page 12 /24 . You may submit one or more IDOCs in a single call.3 The IDOC RFC Proxy The IDOC RFC Proxy is a special DCOM proxy component that allows you to submit IDOCs from external systems to an SAP System. It thereby eliminates the need to use the C RFC API to do so.1 Use You can use this proxy component whenever you need to submit IDOCs from external systems. you use the method SubmitIdoc. Consequently. _ SalesOrganization:="1000". oOrderList oOrders.
or started as an executable. The aim was to provide a generic RFC server for the Windows environment with which you could address any COM automation interface. In ABAP. you needed considerable C expertise to get the server to link and compile properly. both your own and proprietary interfaces such as. MS Exchange. you program against this destination to create a COM session.1 OVERVIEW Addressing external components using ABAP has never been easy. Multi-threading was the responsibility of the programmer. Although SAP has long provided the RFC API. com4abap can be run as a W2K/Window NT service. you had to ensure tha tthe service would be active when invoked from ABAP. Author: Kevin Wilson Page 13 /24 . in which you can instantiate any registered COM component.CHAPTER 5 COM4ABAP 5. for example. because in order to communicate with the RFC API. the situation was even worse. Furthermore. you had to convert the data structures back and forth between the C structures and data types you could actually work with in VB. In particular. For Visual Basic programmers. it allows you to address components that do not have their own user interface. The result is com4abap – a multi-thread server that can expose any COM automation interface to an ABAP program and also offers semi-automatic type conversion between ABAP and COM data types. You must also register it as an RFC destination in the client R/3 System.
sap. 6.1 FOR MORE INFORMATION For further information on SAP Business Connector.CHAPTER 6 BUSINESS CONNECTOR 6. To download SAP Business Connector and SAP BC Integrator go to http://service.com/sbc-download. Since SAP BC uses both synchronous RFC (BAPI) and asynchronous tRFC (ALE) calls you can use both BAPIs and ALE for communication in your landscape. Calling SAP Business Connector from within an SAP application is no different from calling any other RFC server. 6.1 OVERVIEW SAP Business Connector is a middleware server application based on webMethods B2B Integration Server.com/connectors.1. SAP Business Connector allows you to extend your business processes over the Internet and integrate non-SAP products using open. nonproprietary technology.sap. see the documentation on the SAP Service Marketplace at http://service. The SAP-proprietary RFC format is converted to Extensible Markup Language (XML) or HyperText Markup Language (HTML) so that no SAP software is needed on the other end of the communication line.com landscape.2 ARCHITECTURE The architecture of SAP Business Connector (SAP BC) is divided into two independent parts: the server itself. which is the processing component. SAP BC Integrator is a Author: Kevin Wilson Page 14 /24 . and SAP BC Integrator. including SAP and nonSAP components and applications as well as Web applications. SAP Business Connector provides bidirectional synchronous as well as asynchronous communication to and from applications in your mySAP.
development tool that lets you create custom functionality for one or more SAP Business Connector instances (It will be discussed in the next chapter). also depends on the number of additional packages and services Pentium II 233 MHz or equivalent 128 MB 100 MB Processor Memory (RAM) free disk space 6.com license. you must have SAP R/3 3. you need to install a Java Development Kit (JDK).3 HARDWARE REQUIREMENTS Minimum Recommended 256 MB Depends on the number of transactions stored in the file system. No additional software is needed.1G or higher. SAP Business Connector comes with built-in HTTP and FTP server and client functionality.4 SOFTWARE REQUIREMENTS To use SAP Business Connector. 6. or you must have a mySAP.1 Platforms You can run SAP BC on the following platforms: • • • • • Windows NT and Windows 2000 Linux Solaris AIX HP-UX 6. A version of SAP Business Connector including strong 128-bit encryption is available via SAPNet. Additionally.0 is recommended) If you want to create additional Java services. you need one of the following browsers installed either on the machine where SAP Business Connector is installed or on any machine that can access SAP Business Connector through HTTP: • Netscape Navigator or Netscape Communicator 6. Author: Kevin Wilson Page 15 /24 .2.0 or later (5.x • Microsoft Internet Explorer 4.
The Partner Manager determines how and where to route a message based on routing rules that you define. and email ports. Each routing rule is associated with an SAP BC flow service that the Partner Manager generates based on the information in the routing rule. you can configure the Partner Manager to use a database for the Message Store. 6. FTP. it looks for a routing rule. When the Partner Manager receives a message.2 Message Store SAP Business Connector provides a persistent message store that the transaction manager uses to track all IDocs and all tRFC calls that are routed to and from SAP components via SAP Business Connector.1 RFC Server / Listener The SAP BC server listens for client requests on one or more ports. The server supports HTTP. recording it in the Message Store as a transaction. 6. the Partner Manager invokes the SAP BC flow service that is associated with the routing rule. After locating the routing rule for the incoming message. HTTPS.5 BUSINESS CONNECTOR SAP R/3 RFCs RFCs RFCs tRFCs SAP Business Connector RFC Client 2. Author: Kevin Wilson Page 16 /24 .5.6.5. Select SAP Component and the RFC to execute BAPIs BAPIs RFC Requests mapped to server IDocs IDocs tRFC RFC Server (Listener) Message Store Requests NOT mapped to server tRFC Partner Manager Rule Rule Rule Rule FTP to a location Send via EMail HTTP post via URL 6. By default. Create client that invokes service SAP BC Services 1. the Partner Manager maintains the Message Store in a log file.3 The Partner Manager The Partner Manager is a built-in facility on SAP Business Connector that manages the routing of messages. You can associate the type of protocol that the server uses for each port. The Partner Manager records each message that it receives. However.5.
and message type in the routing rules. and message type of the incoming message with the sender. receiver. 6. the Partner Manager uses the completed rule to route subsequent messages that have the same sender. It protects transactional requests from transient failures that might occur on the network. If the problem corrects itself. route an RFC to an SAP component via RFC. receiver. send a message via e-mail. and you can delete transactions. The transports that you can specify in the rule allow you to route a message to an SAP BC service. depending on your security needs: • A version with weak (40-bit) encryption • A version with strong (128-bit) encryption. 6. receiver. or on the server. If it finds a match. SAP Business Connector can present a different client certificate to each SSL server. to prevent unauthorized administration of SAP Business Connector. You can configure an administrator listener so that only the administrator listener can accept requests to administer SAP Business Connector. SAP BC uses the configured defaults.6 Load Balancing Author: Kevin Wilson Page 17 /24 . in the client.5 Guaranteed Delivery Guaranteed delivery is a facility of SAP BC that ensures one-time execution of requested SAP BC services. it looks for a routing rule to match the sender. SAP BC requires clients to present valid credentials for administrator privileges in order to gain access to SAP Business Connector administrator functions. 6. SAP BC resubmits the request. which is discussed below SAP Business Connector has several built-in security mechanisms to protect services from unauthorized access. With the guaranteed-delivery feature of SAP BC. send a message in FTP. SAP successfully delivers the request in a subsequent attempt. When you complete the rule. the Partner Manager processes the message in the manner that the routing rule indicates. You can use guaranteed delivery when you invoke an SAP BC service from a client or from within another SAP BC service.1 Routing Rules Routing rules indicate how a message is to be processed. When the Partner Manager receives a message. You do this by using the Access Control Lists (ACLs) mechanism to associate certain groups with a service. 6. You can control access to individual services by user groups. and you can specify the number of times that SAP BC should retry a transaction. A transient failure is a failure that can correct itself within a specified period of time. and message type.5. The routing rule includes transport information that indicates how and where to route a message. route an IDoc to an SAP component via tRFC.5. SAP BC supports encrypted conversations through Secure Sockets Layer (SSL). If you do not specify the TTL period or retry number. when a transient failure prevents a request from being delivered to the server.5. and to prevent data from being intercepted during transmission: • • • • • • • SAP BC requires clients to present valid credentials – a user name and password or a client certificate – in order to connect to the server. the Partner Manager notifies you that the routing rule is incomplete.4 Security Features SAP Business Connector is available in two versions. You can resend messages to the Partner Manager for processing.5. You can control access to services based on which listener receives a service request. and message type. or post an IDoc-XML or RFC-XML to a URL. Each routing rule is uniquely identified by its sender. You can determine what constitutes a transient error by specifying a time-to-live (TTL) period.You can view and manage the transactions that the Partner Manager records in its Message Store.3. receiver. If it finds no routing rule for the message.
You can create XML-based SAP BC services that execute a BAPI. 6. ABAP structures. A number of transport types are available out of the box.5. or the RFC protocol to communicate with an SAP component. administrators can then use the full services provided by ALE. To use this feature. After configuring the SAP component and SAP Business Connector. you can create a function module on the SAP component that requests the execution of an SAP BC service.sap. partners. your business partners can make requests over the Internet to invoke a service that executes a BAPI. thereby extending the reach of your SAP infrastructure to customers. Asynchronous processing uses the ALE services inside the SAP components transparently for the client. you can route an IDoc to another SAP component. or simply to a remote URL in an XML format. The Interfaces Repository (IFR) available at http://ifr. Similarly. Load balancing allows a server to automatically refer a client request to another server if it is too busy to handle the request itself.5 Route SAP business documents (IDocs) SAP Business Connector provides great routing capabilities for IDocs.com provides public. you use SAP Business Connector Clustering. including: • • • Performance benefits through asynchronous processing Monitoring services Distribution services 6.7. The inbound map indicates which service SAP Business Connector is to execute when it receives the RFC from the SAP component. Applications within your organization can then invoke the SAP BC services to execute a BAPI on the SAP server. You can invoke SAP BC services from an SAP component.5.1 Execute ALE functionality.5.Load balancing is an optimizing feature that you use with clustered servers running SAP Business Connector.7.5.7 Technical USES You can use BC to accomplish the following: 6. For example.4 Call SAP BC services from SAP systems. Web-based access to the collection of BAPI interfaces provided by SAP and to the corresponding documentation. 6.7. which uses a central cluster store to maintain the status of SAP BC services running in the cluster.7. Thus SAP Business Connector enables business-tobusiness integration between trading partners. you must configure the SAP component to have an RFC destination for a server running SAP Business Connector. 6.7.5. 6. Inside the SAP component. You can use them to trigger both synchronous and asynchronous processing.5. Your business partners can make requests over the Internet to invoke a service that executes a BAPI. The store is part of SAP Business Connector Repository. You also need to create an inbound map on SAP Business Connector. This defines the destination to which the SAP component sends RFCs to invoke an SAP BC service. and suppliers. Synchronous processing uses the BAPI method of communicating. External applications do not need to support SAP data types.2 Execute BAPI methods. You must also configure SAP Business Connector to have an RFC Server (Listener) that listens for RFCs from your SAP component. Before you can create an RFC that invokes an SAP BC service. Author: Kevin Wilson Page 18 /24 .3 Execute Remote Function Calls You can execute RFCs to access all available SAP functionality. to mySAP Enterprise Portals. You can use them to trigger a process in asynchronous mode. This allows SAP users to access information via SAP Business Connector.
For example. It provides all the tools you need to build and test SAP BC services. The BizTalk XML envelope distinguishes between an application specific XML body and a transport-specific XML header. records. SAP Business Connector uses the standardized BizTalk XML envelope format for BAPI and RFC XML messages.6. record. price. This specific XML format.1 IDoc-XML and RFC-XML SAP Business Connector is the de facto XML interface to existing SAP component releases. When you create a folder. or output template. developed by SAP. It supports all versions of IDoc-XML and RFC-XML. is called bXML.5. you can invoke RFCs via XML and convert IDocs to the SAP-XML format. This language lets you encapsulate a sequence of SAP BC services within a single service and manage the flow of data among them. schema.5. 6. for example.5. Some of the most commonly used functional elements of SAP BC Integrator are described below.6. service.7. you might create a flow service that takes a purchase order from a Author: Kevin Wilson Page 19 /24 .5. The BizTalk XML envelope can be used for both BAPI and RFC XML calls and also for both synchronous and asynchronous processing. The header communicates transport-specific information – about routing.2 Flow Services A flow service is a service that is written in webMethods flow language.9. It allows you to retrieve information directly and in real time from Web sites. specification. and create output templates. you save it in a package.6 SAP BC INTEGRATOR SAP BC Integrator is an integrated development environment that you use to create SAP BC services for one or several instances of SAP BC. After grouping these components into a single package.6. You may process several Web pages and even provide input to forms automatically. you might group all the services and files specific to a particular marketplace in a single package. such as specifications.9 Standards 6. With the SAP Business Connector SAP-XML interface. 6.8 Functional uses Typical uses for SAP Business Connector are the following: • • • Real-time integration of your suppliers’ inventories with your SAP components Real-time integration of your suppliers’ product. and output templates. you can easily manipulate them as a unit. 6. For example. A typical application is to download information from several catalogs and then aggregate the results and return them to the SAP business solution. 6. It simplifies data exchange with other Web-based messaging systems. No browser or manual intervention is needed. and availability information with your purchasing application Real-time integration of your shippers’ internal systems with your fulfillment and ordertracking applications 6. schemas. Packages are designed to hold all the components of a logical unit in an SAP BC component.2 BizTalk XML Envelopes As a default. as specified by the SAP-XML Specification.9. 6. generate stubs for client applications. You can even handle Web sites that use scripts.6 Web Automation Web Automation is a unique feature of SAP Business Connector.5. and no software integration is needed on your partner’s side.1 Packages A package is a container that you use to bundle services and related elements.
Execute services in debug mode. Retry a specified sequence until it succeeds. You use the tools in the Pipeline Editor to route variables (data) between services or between document formats.4 The Pipeline Editor The Pipeline Editor is the facility you use to perform mapping and inspect the pipeline.6.3 Flow Steps A flow service contains flow steps. you can create customized services in a variety of programming languages. For instance. it is the easiest language in which to build an SAP BC service.6.1 Building SAP BC Services Using Java Since Java is the native language of SAP BC services. 6. 6. These include tools to: • • • Write arbitrary messages to the server log. The flow-control steps allow you to: • • • Conditionally execute a specified sequence based on a variable value.6. Author: Kevin Wilson Page 20 /24 .6. webMethods flow language also provides a set of flow-control steps that allow you to direct the execution of a flow service at run time. webMethods flow language provides flow steps that invoke services as well as flow steps that let you edit data in the pipeline. You can create a library of custom code that a flow service or a client application can access and execute. expressed in webMethods flow language. a flow service might invoke a service that you create or any of the built-in services provided by SAP BC.5 Debugging SAP BC Integrator provides a range of tools to assist you during testing and debugging. Examine the call stack and the pipeline when an error occurs. 6. you can: • • • • Test services. 6. and inspect their results. Trace the pipeline at run time. SAP provides tools for collecting run-time information that can help debug a service. a mode that lets you monitor a flow service’s execution path and/or execute its steps one at a time. Additionally. Modify and save the contents of the pipeline at a specified point.buyer and executes the following series of SAP BC services before submitting it to an internal ordering component: • • • Receives a purchase order submitted by a buyer Logs the order in an audit-trail file Performs a credit check • Posts the order to the ordering system Any SAP BC service can be invoked by a flow service – including other flow services. SAP BC saves them in XML files. specify their input values. A flow step is a basic unit of work. You create flow services using SAP BC Integrator. For example.6. Repeat a specified sequence (loop) for each element in an array variable. which SAP BC interprets and executes at run time.6 Building Coded Services In addition to using the built-in services that SAP provides.6. It offers a graphical representation of all your data. Temporarily disable steps in a flow and/or specify points where you want to halt execution. 6.
and publish Java services. or Visual Basic: • You can create flow services using the Administrator User Interface. C/C++.6. It typically performs the following basic tasks: • • • • • • Prompts the user for input values if your service takes input Places the inputs into an input record if your service takes input Opens a session on SAP BC Invokes a service Receives output from the service Closes a session on SAP BC • Displays the output to the user The client code that SAP BC Integrator generates can serve as a good starting point for your own development.6. compile. Your services can access these built-in services to perform database operations. such as connecting to a database. selecting rows. When you create a flow service.3 Accessing Databases with SAP BC All types of services can access databases – flow services written in webMethods flow language. or they use other database APIs (JDBC. The server generates the flow service for you. The development environment automatically generates an appropriately structured source file that you simply fill in using the built-in editor. C/C++. inserting rows. and Visual Basic services using SAP BC Integrator or your own development environment. Client code is application code that invokes a service on SAP BC. You can create Java. and deleting rows.6. and services written in Java. for example) to access databases.6. you make selections from screens in the Server Administrator to describe the function that you want the service to perform. 6. SAP BC provides built-in services that perform basic database operations. the development environment automatically compiles it and registers it on the SAP BC server. When you save the source file. 6. • Author: Kevin Wilson Page 21 /24 .2 Creating Client Code SAP BC Integrator enables you to automatically generate client code in a variety of languages and for several environments.SAP BC Integrator provides an integrated development environment that you can use to create.
This interface provides the opportunity to call any RFC function in a SAP System from an external application. The RFC Library is available on all SAP Supported Platforms. Most SAP Connectors use the RFC Library as communication platform to SAP Systems. Moreover. e.CHAPTER 7 RFC LIBRARY 7. Maximum performance. the RFC Library is thread safe. i. Maximum functionality. e. an older release of the RFC Library can communicate with a SAP System at a higher version and vice versa. which is accessible from any SAP System or external application. almost all features of RFC in SAP Systems should be supported by the RFC Library. The RFC Library exists in a Unicode and non-Unicode version. SAP provides the RFC API in the form of C-routines. the Unicode RFC Library is forward and backward compatible.1 OVERVIEW The RFC Library offers an interface to a SAP System. The most important design features of the RFC Library are: • • • • Working with the native RFC Protocol. Author: Kevin Wilson Page 22 /24 . Thus. As expected by modern software. The RFC Library is forward and backward compatible. i. a current Unicode RFC Application can communicate with any non-Unicode RFC Application independently of its release and vice versa. Information about where to find the current version of the RFC Library is described in OSS note 413708. too. This enables the user to write powerful multithreaded RFC Applications. incorporated in the RFC Library. Maximum flexibility. The RFC Library is the most commonly used and installed component of existing SAP Software. the RFC Library offers the possibility to write a RFC Server Program. e. i. • Full compatibility to other RFC Releases.
TERM Business Application Programming Interface (BAPI) RFC Server (Listener) GLOSSARY DESCRIPTION Business functions in SAP components that are written in the programming language ABAP. A JDBC-compliant database that SAP Business Connector uses to track all transactions that pass through the Partner Manager. Listeners can accept RFC or tRFC requests. or HTML Web sites) or services written in Java or C/C++ by you. Protocol for ensuring that an RFC is executed successfully and executed only once on the target system. SAP Business Connector uses LIBRFC to communicate with the SAP components. Listeners are one or more threads on SAP Business Connector that wait for incoming requests from SAP components. or SAP AG.APPENDIX A. XML documents. RFC Client Transactional RFC (tRFC) tRFC protocol Remote Function Call (RFC) RFC protocol SAP BC Service LIBRFC Intermediate Document (IDoc) Partner Manager Transaction and Message Store Author: Kevin Wilson Page 23 /24 . or to a remote URL in an XML format. SAP Business Connector functions that are named with a hierarchical interface and service syntax. to SAP BC. A process that accepts messages and routes them to a configured location. BAPIs are formalized RFCs. In SAP BC terminology. EDI-like SAP business document. RFCs are requests that an SAP component sends to invoke functions on remote systems. SAP terminology for a process that sends RFCs to an SAP component to invoke functions. the Partner Manager can route messages to an SAP system. Systems that are remote to the SAP component commonly use BAPIs to invoke an action on the SAP component. Services can be flow services (interfaces to data sources. For example. Communications method that an SAP component uses to asynchronously invoke a function on a remote system and that a remote system uses to asynchronously invoke a function on an SAP component. Listeners are named and register with an SAP gateway to indicate that they are ready to accept requests. Code library provided by SAP that allows third parties to integrate the RFC protocol into applications. SAP Business Connector can handle both inbound and outbound tRFCs. Typically. The tRFC protocol ensures that an RFC is executed successfully and only once. or calls that remote systems initiate to invoke functions on an SAP component. the process is called a Listener. Communications method that an SAP component uses to synchronously invoke a function on a remote system and that a remote system uses to synchronously invoke a function on the SAP component. thirdparty vendors. A process that can accept RFCs from SAP components. This allows SAP components to access functions in external systems. IDocs are routed through the Partner Manager.
Author: Kevin Wilson Page 24 /24 .