Siebel Connector for SAP R/3 > BAPI Interfaces > BAPI Integration >

BAPI Adapter Configuration


The EAI SAP BAPI adapter business service can be invoked from a workflow. Table 24 and Table 25 summarize the User Properties, Method Arguments, and Component Parameters that may be set to control its behavior. The EAI SAP BAPI Adapter is a cached business service. Variables that are defined to be User Properties in the Business Service are generally used only once for initialization purposes at the time of the first call to the Business Service. Variables that are defined to be Method Arguments are used on each and every call and may vary from call to call. Those variables that may be set as component parameters must be set for the Business Integration Manager component.

Table 24 contains User Properties, Component Parameters, and Input Method Arguments for the Execute Method.

Table 24.  BAPI Adapter Configuration Options
Name
User Prop
Comp Param
Method Arg
Valid Values
Usage
OutputIntObjectFormat
 
 
X
 
 
OutputIntObjectName
 
 
X
Must be a BAPI Output Integration Object name
Integration object name for the BAPI Output integration object containing export parameters and tables returned by SAP from the call.
SAPRfcConnectString
 
X
X
 
SAP connection string. This string defines the destination (used in saprfc.ini), client, and language for the SAP connection.
SAPRfcUserName
 
X
X
 
SAP user name
SAPRfcPassword
 
X
X
 
SAP password
SAPRfcTrace
 
X
X
"true" or "false"
SAP trace file usage on or off. Same as TRACE=0 or 1 in saprfc.ini file.
SiebelMessage
 
 
X
 
EAI Siebel Message containing BAPI Input integration object instance.
DisconnectAlways
X
 
 
"true" or "false"
Determines connection behavior of BAPI adapter. When "true", the adapter makes a new connection each time the Execute method is called. If "false", the adapter keeps its connection open. (See also SAPRfcMaxConnectTime)
SAPRfcMaxConnectTime
X
 
 
Integer value in seconds
Used only if DisconnectAlways is "false". Number of seconds a connection stays open measured from the time of the last BAPI call. For example, if SAPRfcMaxConnectTime is set to 600 seconds (10 minutes), then all BAPI calls made within the same workflow and within 10 minutes of one another are guaranteed to be made within the same connection. When a BAPI call is made more than 10 minutes from the time of the last BAPI call, a new connection is made with SAP. This allows BAPI calls to be made together that must occur within the same connection yet also reduces the possibility of stale or invalid connections.
SAPAutoError
X
 
X
"True" or "False"
The default is "True". When the value of this flag is True, and the value of the SAPErrorTypeField is E or A, the BAPI adapter raises an error, causing workflow to terminate at the BAPI adapter. When the value of this flag is False, the BAPI adapter logs error information but does not raise an error and terminate the workflow. The remaining steps in the workflow are responsible for handling the error.
SAPCodepage
X
X
X
Value from Transcode Encoding picklist
Siebel Codepage name for SAP codepage.
SAPIgnoreCharSetConvErrors
X
X
X
True or False
Default is False. If True, codepage conversion errors are handled by substitution of the question mark (?) character in place of an unrecognized character.

SAPRfcConnectString uses SAP's internal connect string format. This must include the following elements:

These elements must be separated in the string by one or more spaces, for example, "DEST=DEV_Outbound CLIENT=555 LANG=E". Table 25 contains Output Method Arguments for the Execute Method.

Table 25.  Execute Method Output Arguments
Name
Usage
RfcExceptionName
Contains the RFC exception string returned by the SAP function. If connection to SAP fails, this string contains the text: "__SIEBEL__SAP_CONNECT_FAILED__"
SiebelMessage
EAI Siebel Message containing BAPI Output integration object instance.

The Execute method is likely to be all that you need to use with the BAPI Adapter. There are two more utility methods defined. The first is MakeConnection. You can use this to test your connection information to SAP. For information on how to test your connection, read Checking Siebel Client Connectivity. The second is EndConnection. Use this method to force a disconnect from SAP.

NOTE:  To control the disconnection with SAP by using the EndConnection method, you must use this method within the same workflow where a previous call to the adapter opened a connection. You cannot make a connection within one workflow and disconnect within a different workflow.

EndConnection uses no method arguments. It disconnects the BAPI adapter from SAP. MakeConnection uses the SAP connection variables described in Table 24: SAPRfcConnectString, SAPRfcUserName, SAPRfcPassword, and SAPRfcTrace.

SAP BAPIs often use a standard return structure to send error messages back to the calling application. The BAPI Adapter has the capability of handling this error information in a flexible manner. The BAPI Adapter's flexibility is based on the values of two user properties or method arguments: SAPAutoError and SAPErrorTypeField. These parameters can be used together to direct the BAPI adapter to automatically raise errors or let these errors pass on to other portions of workflow for handling. The SAPAutoError flag turns on or off the automatic error generation. The SAPErrorTypeField specifies the field in the BAPI interface that contains the SAP error type (E, A, I, S, or W). Table 26 summarizes the functionality.

Table 26.  BAPI Adapter Error Handling Summary
SAPAutoError
SAPErrorTypeField
Behavior
True
Siebel name of a scalar export parameter in the BAPI interface.
BAPI Adapter raises an error if the SAPErrorTypeField contains the values E or A. Workflow stops at the BAPI adapter step.
True
Siebel name of a field in a structure export parameter in the BAPI interface.
BAPI Adapter raises an error if the SAPErrorTypeField contains the values of E or A. The values of all non-blank fields in the structure containing the SAPErrorTypeField are written within the error message. Workflow stops at the BAPI adapter step.
True
Siebel name of a field in an internal table in the BAPI interface.
BAPI Adapter raises an error if the SAPErrorTypeField contains the values of E or A in any record of the internal table. The values of all non-blank fields in the table containing the SAPErrorTypeField are written within the error message. One error message is created for each record in the table. Workflow stops at the BAPI adapter step.
False
Siebel name of a scalar export parameter in the BAPI interface.
BAPI Adapter does not raise an error, but the error information appears in the Siebel log. Workflow processing continues, and error handling must be implemented in the steps following the BAPI adapter.
False
Siebel name of a field in a structure export parameter in the BAPI interface.
BAPI Adapter does not raise an error, but the error information appears in the Siebel log and contain the values of all non-blank fields in the export structure. Workflow processing continues, error handling must be implemented in the steps following the BAPI adapter.
False
Siebel name of a field in an internal table in the BAPI interface.
BAPI Adapter does not raise an error, but the error information appears in the Siebel log and contain the values of all non-blank fields in the table. Workflow processing continues, and error handling must be implemented in the steps following the BAPI adapter.

These parameters can be set in the workflow as input method arguments to the BAPI adapter business service call. The SAPAutoError parameter defaults to True when not set and the SAPErrorTypeField parameter defaults to RETURN-TYPE when not set.


 Siebel Connector for SAP R/3 
 Published: 22 August 2003