21
SAP Interface Overview Introduction A number actions have been provided for the SAP interface to provide for SAP transaction management that may span multiple RFC or BAPI method calls, as well as BAPIs that require a commit statement. Full support is provided for start/commit/rollback of these function calls. The “cookie” parameter created by the SAP BC Start Session action must be linked to the corresponding input parameter on any SAP BC Connector (BC) calls and to the commit and rollback actions to enable this functionality. A summary of the SAP Interface actions is found below. Action Description SAP Interface Repository This action is used to reference a particular BAPI, IDoc, or RFC XML interface structure SAP Business Connector This is the action that you use to execute an interface call SAP BC Start Session If your specific interface(s) require commit or rollback capabilities, you must first use the Start Session block to acquire a cookie to be used for each call within the "block." SAP BC Commit This action is used to commit one or more interface calls. Note: Some transactions can be committed directly from the SAP Business Connector action. This is individual BAPI dependent. SAP BC Rollback This action allows you to roll back one or more interface calls based on a start session action. SAP Web AS Interface As of Release 4.7, the SAP Web Application Server can be used for transaction execution. The SAP Web AS Action block allows for the browsing & selection of any remote-enabled function module through the Web AS SOAP Interface.

Sap interface overview

Embed Size (px)

Citation preview

Page 1: Sap interface overview

SAP Interface Overview

Introduction

A number actions have been provided for the SAP interface to provide for SAP transaction management that may span multiple RFC or BAPI method calls, as well as BAPIs that require a commit statement.  Full support is provided for start/commit/rollback of these function calls. The “cookie” parameter created by the SAP BC Start Session action must be linked to the corresponding input parameter on any SAP BC Connector (BC) calls and to the commit and rollback actions to enable this functionality.  A summary of the SAP Interface actions is found below.

Action Description

SAP Interface RepositoryThis action is used to reference a particular BAPI, IDoc, or RFC XML interface structure

SAP Business Connector This is the action that you use to execute an interface call

SAP BC Start SessionIf your specific interface(s) require commit or rollback capabilities, you must first use the Start Session block to acquire a cookie to be used for each call within the "block."

SAP BC CommitThis action is used to commit one or more interface calls. Note: Some transactions can be committed directly from the SAP Business Connector action.  This is individual BAPI dependent.

SAP BC RollbackThis action allows you to roll back one or more interface calls based on a start session action.

SAP Web AS Interface

As of Release 4.7, the SAP Web Application Server can be used for transaction execution.  The SAP Web AS Action block allows for the browsing & selection of any remote-enabled function module through the Web AS SOAP Interface.

Additionally, the SAP Interface Repository block has been provided to allow access to reference documents for the wide range of RFC, IDoc, and BAPI messages and functions.  These are particularly useful with IDoc handling, and are also valuable when interfacing to intermediate EAI software applications.

Common Property Definitions for all SAP BC Interface Actions

A number of predefined global variables are installed in order to facilitate the SAP Actions. They are provided to facilitate the population of the common parameters found in the following table.

Property Name Data Type DescriptionBCServer String This is the IP address or server name where the SAP

Page 2: Sap interface overview

Business Connector (BC) is runningBCServerPort Integer This is the port number that BC is listening on

SAPServerAlias String

This is the server name in BC that represents the SAP instance you wish to connect to (under Adapters/SAP/SAP Servers in the BC administration tool)

SAPLogicalSystemName StringThis is the logical system named defined in the R/3 instance that points to itself.

BCLogicalSystemName StringThis is the logical system name defined in R/3 that points this the BC that you are using as an interface.

BCUserName StringBC user name with proper permissions to execute transactions to SAP

BCPassword String Password associated with above BC user name

Response Timeout IntegerAmount of time to wait in seconds before ending the request to the BC server

SAP Action Usage

At a high level, there are two basic use cases for the SAP actions.  The first is retrieving data from R/3, such as a list of production orders for a plant.  The second is issuing data through a transactional interface into R/3, such as recording material consumption against a specific production order.

When retrieving data through the Business Connector, you need to perform two primary tasks. The first is to configure the connection information to point to the correct BC server, and the second is to retrieve the correct interface document and populate it.  The first task is accomplished with the Interface Repository action.  Using this block, you pick the specific interface you wish to call.  You can then link the specific values for the transaction into the appropriate XML elements/attributes for execution.  Then you can link that document into the SAP BC action block as the request document.  The SAP BC action is the block that needs the correct connection information.  Once that action executes, you can handle the response as appropriate for your needs.

Inserting data into R/3 through the SAP BC transactional interfaces can be slightly more complex.  In addition to the two tasks, and two actions, described above, some interfaces require a Commit in order for the data to be made available in R/3.  There is more than one way to perform a Commit.  The SAP BC action has a check box available on the configuration dialog labeled "Auto Commit This Transaction?" - checking this to true causes the action to perform a commit after the interface call.  This typically works well when there is a single interface call, with a single XML document, sent to the BC.  When you have more complex transactional interfaces, such as multiple documents, you may want to use the BC Start Session, BC Commit, and BC Rollback actions.

In the more complex scenario, you would typically use the BC Start Session action in a sequence before any SAP Business Connector interface actions are called.  The action has an output of a

Page 3: Sap interface overview

"cookie" received from the BC server.  This cookie can then be linked via the Link Dialog Editor to all subsequent intra-transaction BC Interface actions that need to be committed or rolled back as a single lot.  Depending on returns and/or errors, you would then use the Commit to Rollback action to close out the R/3 communication, also linking in the original cookie.  See the individual action user guides for more information.

The SAP Web AS Interface is similar to the BC Interface.  It also uses XML documents for sending and receiving messages from SAP.  The primary differences are the technology infrastructure and the namespace browsing.  The Web AS interface does not require the Business Connector to be installed, but does require the SOAP interface of the SAP Web Application Server (WAS) to be enabled.  The Web AS interface allows namespace browsing of the local SAP instance, including custom RFCs that are remote enabled, while the BC interface only browses standard interfaces that have been published in the SAP Interface Repository.  While custom RFCs may be used with the BC interface, you need to generate a reference document and load it into the transaction.

 

Methods Of Interface

Communications Interfaces provided for integrating SAP Systems and External Applications

Synchronous Interface Methods

Description

OLE Automation An ABAP program can call up an OLE Automation Server (such as Excel) on the desktop. The ABAP OLE Automation Controller consists of a set of ABAP language elements that an ABAP client program can use to drive an OLE Automation server on either Windows or Apple Macintosh front-end. Special OLE functions contained in the SAPGUI are called via RFC. SAPGUI represents the actual OLE client that calls the server program.

Communications interfaces provided for integrating External Applications and SAP Systems

Synchronous Interface Methods

Description

GUI Using the GUI interfaces to R/3 you can write a client program that accesses the data stream that

Page 4: Sap interface overview

is communicated between the R/3 application server and its SAPGUI.

By using the GUI interfaces your external client program can provide an alternative interface to the standard SAPGUI. This alternative interface can be either graphical or non-graphical (for example, it can be voice driven or Web-based).

Programming using the GUI interfaces also allows your client program to monitor or record an end user interaction with SAPGUI screens.

RFC External programs using RFC�s can either make or receive remote function calls to or from an SAP system. Therefore, using RFC�s an external program can act as either the client or the server to an SAP system. Conversely, the SAP system can take the role of either the client or the server to the external application.

SAP Automation PROVIDES products for programming of RFC�s from languages such as C, C++, Java, or COM-compliant languages, such as Visual Basic and applications such as Excel.

BAPI SAP Business Objects provide an object-oriented view of SAP data structures and functions. The Business API (BAPI) is an interface that allows you to call the methods of these SAP Business Objects.

A-Synchronous Interface Methods

Description

IDoc Intermediate Document (IDoc) interface is an SAP standard format for exchanging data between SAP systems and between an SAP system and an external application. An IDoc document defines a SAP standard data container (template) for sending or receiving data from an SAP system. External programs can use the IDoc method of communicating data to and from an SAP system

Batch Input Allow you to feed data into R/3 using R/3 transactions.

Choosing The Right Interface Method

Page 5: Sap interface overview

SAP Tools For Interface Development

Tools DescriptionRFC API The RFC API is a C API (Application Programming Interface) for programming applications that use

the RFC interface, that is, it allows external programs written in C to call RFC function modules in an SAP system. Using the RFC API you can develop client/server applications that act as both the client and the server to the SAP system.

SAP DCOM Connector

The SAP DCOM Connector uses services from Microsoft MTS to provide a DCOM interface for working with SAP RFC function modules and BAPI�s. It provides a C++ template library for creating COM objects from the SAP business objects. Using the DCOM Connector allows you to take advantage of the distributed computing, resource sharing and other benefits of using MTS when integrating your application with a SAP system.

SAP Automation SAP automation is a suite of ActiveX components, class libraries, and other tools to help you develop applications that integrate with a SAP system from outside.

The various SAP Automation tools allow you to take advantage of the various interface types as mentioned above (GUI, RFC, BAPI, IDoc, Batch input). The different tools offer a variety of functionality with some overlap of functionality for the different programming languages.

Several of the SAP Automation tools allow you to program using the GUI interfaces to an SAP system.

Other SAP Automation tools expand the functionality of the RFC API to support programming with RFC function modules, business objects methods (BAPI�s), IDoc interface, or batch input.

Some of the SAP Automation tools that are based on the RFC API are also based on the SAP DCOM Connector to support distributed programming when using business objects methods (BAPI�s) and RFC function modules.

 SAP Automation GUI Interfaces

Tool Type Function LanguageGUI Library

C API Like "screen-scraping" programs, the GUI Library takes the contents of R/3 SAPGUI screens and makes

C

Page 6: Sap interface overview

them accessible through standard data structures and function calls.

Allows you to write programs that provide an alternative user interface to the standard R/3 SAPGUI. This alternative interface can be GUI or non-GUI.

Also allows you to write programs that record the interaction between an end user and SAPGUI screens.

GUI Component

ActiveX Server (both in process and out of process)

Exposes a subset of the GUI Library to COM-compliant programs and

Any COM-compliant application

Page 7: Sap interface overview

applications. Simpler to use but also less flexible than using the GUI Library directly.

GUI Code Generator

Stand-alone executable

A code generator for the GUI Component.

Can act as a macro recorder allowing you to generate Visual Basic and other code as you or an end-user work with the SAP system.

Also lets you capture SAP screens as Visual Basic forms.

Produces VB, HAHTtalk Basic, or Delphi�s Object Pascal language code.

SAP Automation RFC and BAPI Interfaces

Underlying Library

Tool Type Function LanguageRFC API C API A set of C routines that allows you to write external

applications that communicate with an SAP system through remote function calls (RFC�s).

The external application can act as either a client or a

C

Page 8: Sap interface overview

server to the SAP system.

SAP Automation RFC-based Class Libraries

Tool Type Function LanguageRFC C++ Class Library

Class library Provides a framework for the RFC API.

Makes it easier to use RFC�s in C++ programs by providing pre-built functions for some common tasks, such as establishing a connection to R/3.

C++

Java RFC Class Library

Class library Provides an object oriented Java view over the RFC API.

Makes it easier to use RFC�s in Java programs by providing pre-built functions for some common tasks, such as establishing a connection to R/3, or performing data type conversion.

Java

IDoc C++ Class Library

Class library Provides a framework for processing inbound and outbound IDOC�s.

Makes it easier to use IDoc technology in C++ programs by providing pre-built functions for some common tasks, such as creating and appending IDoc segments, accessing segments and fields by names, and working with fields.

C++

ActiveX Controls and Components

Tool Type Function LanguageLogon Control ActiveX Control

(OCX)Allows you to create a connection object with which you can establish a connection to R/3.

Any COM-compliant application

Function Control COM Server Provides COM objects for handling RFC functions and their parameters. This allows you to create external applications that call RFC function modules in an SAP system.

Any COM-compliant application

Table Control COM Server Allows you to create a Table object representing a table parameter of an RFC function.

Works with the Function control to manage tables attached to Function objects.

Any COM-compliant application

Transaction Component

COM Server Exposes R/3 batch input capability to COM-compliant programs and applications.

Allows an external program to send input field values

Any COM-compliant application

Page 9: Sap interface overview

to an R/3 screen (output field values are not returned).

Makes using batch input easier by eliminating the need to populate the fields of the BDC table, which is a prerequisite to using the standard R/3 batch input method.

BAPI ActiveX Control ActiveX Control (OCX)

Allows you to develop external client/server applications (with R/3 as a server) that access business functions in the SAP system by calling BAPI�s (Business APIs) through OLE Automation.

Achieves this by allowing you to create (on the client) local instances of business objects, which act as proxy objects for the business object in the SAP system.

Any COM-compliant application

DCOM Connector-based Components and Tools

Tool Type Function LanguageIDoc Connector for XML

COM Server Provides an XML interface for working with IDoc documents.

The IDoc Connector for XML component accepts your XML documents and sends them as inbound IDOC�s to a specified R/3 system. Conversely, it can receive outbound IDOC�s and it translate them into XML documents for your application to use.

Any COM/DCOM-compliant application

DCOM Connector Logon Component

COM Server Helps programs that use the SAP DCOM Connector handle the connection parameters of the COM objects created by the SAP DCOM Connector.

The DCOM Connector Logon Component provides a logon dialog with which you can get the necessary connection parameters from an end user. It also allows the end user to create and maintain destination definitions.

The DCOM Connector Logon Component also allows you to easily copy connection parameters into a DCOM Connector COM object.

Any COM/DCOM-compliant application

Repository Services COM Server Provides read access to the metadata of business objects, RFC function modules, tables and structures in an R/3 system to COM-compliant programs and applications.

Also allows you to save a copy of the metadata in a local database. Using a local database allows you to

Any COM/DCOM-compliant application

Page 10: Sap interface overview

access the same metadata faster and without connecting to R/3.

BAPI Gateway COM Server Allows you to dynamically call BAPI�s and RFC�s through the DCOM Connector, that is, it allows you to determine at run time which BAPI�s or RFC�s you call.

Eliminates the need to use the SAP DCOM Connector wizard for creating a DCOM Connector proxy component.

Any COM/DCOM-compliant application

Repository Browser COM Server A control that can be hosted by any ActiveX container. It consists of a window with two panes for browsing SAP BAPI and RFC metadata information.

Allows online calling of RFC functions from within the control.

Also exposes several methods to enable the container application to control and automate metadata browsing.

Allow you to export metadata information to an Excel spreadsheet.

Any COM/DCOM-compliant application

SAP Assistant Stand-alone executable

A tool for browsing (viewing and searching) the metadata of SAP RFC functions and SAP business objects and their methods (BAPI�s). Uses the SAP Browser Control (see above).

Allow you to call RFC functions directly online.

Also allow you to generate either Java or C++ classes for working with SAP business objects and their BAPI�s.

You can use the code generated with the BAPI Wizard tool for Java or C++ programming.

The SAP Assistant window itself is not programmable

 This page's content provide by Jude Lobo.Evolutionary Consulting, Inc.

We have been in the SAP, Internet, E-commerce and Network Management Consulting industry since 1995. We will only provide you with quality, knowledgeable, certified and experienced consultants. Our success depends on your success and your reference is invaluable to our future business. Our mission: To provide excellent quality consulting, to accurately provide solutions, to provide timely service. We can service you in the following:

SAP Consulting in various modules RF Barcoding SAPConsole Wireless Local Area Networks (WLANs) Wi-Fi hardware and software implementations with

Wireless Security

Page 11: Sap interface overview

Web Development and E-Commerce

Page 12: Sap interface overview
Page 13: Sap interface overview
Page 14: Sap interface overview