Working with BizTalk Adapter for mySAP Business Suite Binding Properties

This topic was last updated on: June 05, 2009

The Microsoft BizTalk Adapter for mySAP Business Suite surfaces several binding properties that enable you to control some of its run-time and design-time behavior. This section describes these binding properties and provides links to topics that explain how you can set them.

The following table shows the SAP adapter binding properties grouped by category. The category refers to the node under which each binding property appears in the dialog boxes that are presented by different applications to configure the adapter (SAPBinding).

Binding Property Category Description .NET Type

CloseTimeout

General

Specifies the WCF connection close timeout. The default is 1 minute.

System.DateTime

DataTypesBehavior

General

The SAP system does not enforce correct values to be specified for DATS, TIMS, and NUMC fields. So, if invalid values are present in the SAP data store for DATS, TIMS, and NUMC fields and a client program tries to read the values using the SAP adapter, the adapter throws an exception.

Also, the SAP system has special values for representing minimum and maximum values for the DATS, TIMS, and NUMC fields for which there is no equivalent .NET type. For example, the minimum and maximum values for a DATS field are 00000000 and 99999999 respectively, for which there is no equivalent .NET type DateTime. Moreover, converting the minimum and maximum values for DATS fields to DateTime.MinValue and DateTime.Max value is not feasible because the minimum or maximum value for DATS field and minimum or maximum value for a .NET DateTime type are not the same.

To enable adapter clients to control the adapter behavior when special values are encountered in the SAP system, you can set the DataTypesBehavior binding property. This is a complex binding property that has the following sub-properties.

DateTimeMaxToDats Specifies the behavior the adapter should follow to send a DATS value when the adapter client sends the value DateTime.MAX, which is “9999-12-31T23:59:59.9999999”. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if the client program sends the DateTime.MAX value.

  • <VALUE>. When set to this, the adapter sends the specified value to SAP if the client program sends the DateTime.MAX value.

Default is 99991231.
DateTimeMaxToTims Specifies the behavior the adapter should follow to send a TIMS value when the adapter client sends the value DateTime.MAX, which is “9999-12-31T23:59:59.9999999”. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if the client program sends the DateTime.MAX value.

  • <VALUE>. When set to this, the adapter sends the specified value to SAP if the client program sends the DateTime.MAX value.

Default is 235959.
DateTimeMinToDats Specifies the behavior the adapter should follow to send a DATS value when the adapter client sends the value DateTime.MIN, which is “0001-01-01T00:00:00”. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if the client program sends the DateTime.MIN value.

  • <VALUE>. When set to this, the adapter sends the specified value to SAP if the client program sends the DateTime.MIN value.

Default is 00010101.
DateTimeMinToTims Specifies the behavior the adapter should follow to send a TIMS value when the adapter client sends the value DateTime.MIN, which is “0001-01-01T00:00:00”. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if the client program sends the DateTime.MIN value.

  • <VALUE>. When set to this, the adapter sends the specified value to SAP if the client program sends the DateTime.MIN value.

Default is 000000.
DateTimeNullToDats Specifies the behavior the adapter should follow to send a DATS value when the adapter client sends a NULL DateTime value. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if the client program sends a NULL DateTime value.

  • SKIP. When set to this, the adapter skips the field and does not send any value to SAP if the client program sends a NULL DateTime value.

  • <VALUE>. When set to this, the adapter sends the specified value to SAP if the client program sends a NULL DateTime value.

Default is SKIP.
DateTimeNullToTims Specifies the behavior the adapter should follow to send a TIMS value when the adapter client sends a NULL DateTime value. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if the client program sends a NULL DateTime value.

  • SKIP. When set to this, the adapter skips the field and does not send any value to SAP if the client program sends a NULL DateTime value.

  • <VALUE>. When set to this, the adapter sends the specified value to SAP if the client program sends a NULL DateTime value.

Default is SKIP.
DatsMaxToDateTime Specifies the behavior the adapter should follow to retrieve a DateTime value when the adapter receives a DATS.MAX value, which is 99999999, from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives a DATS.MAX value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives a DATS.MAX value from SAP.

  • <VALUE>. When set to this, the adapter parses the specified value in the XSD:DateTime format and returns it to the client program.

Default is ERROR.
DatsMinToDateTime Specifies the behavior the adapter should follow to retrieve a DateTime value when the adapter receives a DATS.MIN value, which is 00000000, from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives a DATS.MIN value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives a DATS.MIN value from SAP.

  • <VALUE>. When set to this, the adapter parses the specified value in the XSD:DateTime format and returns it to the client program.

Default is ERROR.
EmptyDatsToDateTime Specifies the behavior the adapter should follow to retrieve a DateTime value when the adapter receives an empty DATS value from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives an empty DATS value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives an empty DATS value from SAP.

  • <VALUE>. When set to this, the adapter parses the specified value in the XSD:DateTime format and returns it to the client program.

Default is 0001-01-01T00:00:00.
EmptyNumcToInt Specifies the behavior the adapter should follow to retrieve an integer value when the adapter receives an empty NUMC value (all spaces) from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives an empty NUMC value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives an empty NUMC value from SAP.

  • <VALUE>. When set to this, the adapter assumes that the specified value is a valid Int32 or Int64 value and returns it to the client program.

Default is 0.
EmptyTimsToDateTime Specifies the behavior the adapter should follow to retrieve a DateTime value when the adapter receives an empty TIMS value from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives an empty TIMS value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives an empty TIMS value from SAP.

  • <VALUE>. When set to this, the adapter parses the specified value in the XSD:DateTime format and returns it to the client program.

Default is 0001-01-01T00:00:00.
InvalidDatsToDateTime Specifies the behavior the adapter should follow to retrieve a DateTime value when the adapter receives an invalid DATS value from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives an invalid DATS value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives an invalid DATS value from SAP.

  • <VALUE>. When set to this, the adapter parses the specified value in the XSD:DateTime format and returns it to the client program.

Default is ERROR.
InvalidNumcToInt Specifies the behavior the adapter should follow to retrieve an integer value when the adapter receives an invalid NUMC value from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives an invalid NUMC value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives an invalid NUMC value from SAP.

  • <VALUE>. When set to this, the adapter assumes that the specified value is a valid Int32 or Int64 value and returns it to the client program.

Default is 0.
TimsMaxToDateTime Specifies the behavior the adapter should follow to retrieve a DateTime value when the adapter receives a TIMS.MAX value from SAP. You could set this to the following values.
  • ERROR. When set to this, the adapter throws an error if it receives a TIMS.MAX value from SAP.

  • NULL. When set to this, the adapter returns NULL if it receives a TIMS.MAX value from SAP.

  • <VALUE>. When set to this, the adapter parses the specified value in the XSD:DateTime format and returns it to the client program.

Default is ERROR.

Microsoft.Adapters.SAP.SapDataTypesBehavior

Name

General

Not supported.

string

OpenTimeout

General

Specifies the WCF connection open timeout. The default is 1 minute.

System.DateTime

ReceiveTimeout

General

Specifies the WCF message receive timeout. Essentially, this means the maximum amount of time the adapter waits for an inbound message. The default is 10 minutes.

System.DateTime

SendTimeout

General

Specifies the WCF message send timeout. The default is 1 minute.

System.DateTime

EnableBizTalkCompatiblityMode

BizTalk

Specifies whether the BizTalk Layered Channel Binding Element should be loaded. The BizTalk Layered Channel Binding Element is loaded to enable BizTalk transactions to flow through the SAP adapter to the SAP system.

Set this to true to load the binding element. Otherwise, set this to false.

When using the adapters from BizTalk Server, you must always set the property to true. When using the adapters from Visual Studio, you must always set the property to false.

bool (System.Boolean)

EnableBusinessObjects

Bapi

This property is deprecated. The adapter always displays the BAPI node when browsing the metadata using the Add Adapter Service Reference Plug-in or the Consume Adapter Service Add-in. The behavior is the same as setting EnableBusinessObjects to true in BizTalk Adapter Pack version 1.0. For more information about the EnableBusinessObjects binding property in BizTalk Adapter Pack version 1.0, see http://go.microsoft.com/fwlink/?LinkId=135612.

bool (System.Boolean)

EnableConnectionPooling

Connection

Specifies whether the SAP adapter connection pool is enabled. The default is true, which specifies that the connection pool is enabled.

bool (System.Boolean)

IdleConnectionTimeout

Connection

Specifies the SAP adapter idle connection timeout. When a connection in the pool is idle (unused) for a period that exceeds this timeout, the connection will be disposed. The default is 15 minutes. The idle connection timeout only applies to connections in the pool that are not being used. It does not affect active (open) connections which may be waiting for data.

System.DateTime

MaxConnectionsPerSystem

Connection

Specifies the maximum number of connections in the SAP adapter connection pool. The default is 50. MaxConnectionsPerSystem is a static property within an application domain. This means that when you change MaxConnectionsPerSystem for one binding instance in an application domain, the new value applies to all objects created from all binding instances within that application domain.

Dd788572.Important(en-US,BTS.10).gifImportant
By default, the SAP client library (librfc32u.dll) supports a maximum of 100 connections to the SAP system. If you exceed this number of connections, an exception will be thrown by the SAP adapter. For this reason, you should not set MaxConnectionsPerSystem to a value greater than the number of connections supported by the SAP client library. You can increase the number of connections that the SAP client library supports by setting the environment variable, CPIC_MAX_CONV. You must reboot your computer after setting this variable for the change to take effect.

int (System.Int32)

RfcAllowStartProgram

Connection

Specifies the external programs that the RFC client library can start, if required by an RFC partner. For example, if you are invoking an RFC that internally invokes a program on the computer running the adapter client, you must specify the name of that program for this binding property.

If you are specifying multiple programs for this binding property, they must be separated by a semi-colon. For example, if you want to specify the sapftp and saphttp programs, you must specify them as sapftp;saphttp.

Also, make sure the following conditions are met:

  • The external program required by the RFC is available on the computer running the adapter client.

  • The location of the external program is present in the PATH variable on the computer running the adapter client.

For example, BAPI_DOCUMENT_CHECKOUTVIEW2 internally executes a program, sapftp. So, while invoking this RFC, you must set the RfcAllowStartProgram binding property to sapftp. You must also ensure that the sapftp program is available locally, and the location of the sapftp program is added to the PATH variable on the computer running the adapter client.

String

EnablePerformanceCounters

Diagnostics

Specifies whether to enable the WCF LOB Adapter SDK performance counters and the SAP adapter LOB Latency performance counter. The default is false; performance counters are disabled. The LOB Latency performance counter measures the total time spent by the SAP adapter in making calls to the SAP system.

Dd788572.note(en-US,BTS.10).gifNote
EnablePerformanceCounters is a static property within an application domain (app domain) for the WCF LOB Adapter SDK performance counters, but it is an instance property for the adapter's LOB Latency performance counter. This means that changing EnablePerformanceCounters for a binding instance in an app domain will:

  • enable or disable the WCF LOB Adapter SDK performance counters for all objects created from all binding instances within the same app domain.

  • enable or disable the adapter's LOB Latency performance counter only for objects created from that binding instance after the change is made.

bool (System.Boolean)

AutoConfirmSentIdocs

Idoc

Specifies whether the SAP adapter auto-commits tRFC client calls used for sending IDocs. The default is false; auto-commit is disabled. If auto-commit is disabled, the client application must explicitly commit the tRFC call by invoking the RfcConfirmTransID operation. The RfcConfirmTransID operation is a special operation surfaced by the SAP adapter. It appears under the TRFC node when you use the Add Adapter Service Reference Visual Studio Plug-in or the Consume Adapter Service BizTalk Project Add-in.

bool (System.Boolean)

PadReceivedIdocWithSpaces

Idoc

Specifies whether each line returned by the ReceiveIdoc operation is padded with spaces to the correct length. The default is false; lines are not padded.

bool (System.Boolean)

EnableSafeTyping

Metadata

Enables or disables safe typing. The default is false; safe typing is disabled. This feature controls how the adapter surfaces certain SAP data types. For more information about safe typing, see Basic SAP Data Types.

bool (System.Boolean)

FlatFileSegmentIndicator

Metadata

Specifies whether the <appinfo> tag should contain segment types or segment definitions for parsing flat file IDocs. Note that the XML schema elements, however, should always contain segment definition names only. There are two possible values for the FlatFileSegmentIndicator property:

  • SegmentDefinition indicates that the flat files should contain the Segment Definition for each Segment in the IDoc.

  • SegmentType indicates that the flat files should contain the Segment Type for each Segment in the IDoc.

The default is SegmentDefinition.

enum Microsoft.Adapters.SAP.FlatFileSegmentIndicator

GenerateFlatfileCompatibleIdocSchema

Metadata

Specifies whether flat file <appinfo> tags should be added to the IDoc message schema. This is required by the BizTalk flat file parser. The default is true, which specifies that <appinfo> tags will be added to the schema.

bool (System.Boolean)

ReceiveIDocFormat

Metadata

Specifies the XML format of the messages dispatched by the SAP adapter to the client application on the inbound side (SAP to adapter). There are three possible values for the ReceiveIDocFormat property:

  • String specifies that the IDoc message should be represented as a single, string field in the WCF message.

  • Typed specifies that the IDoc message should be parsed and represented as a strongly-typed WCF message.

  • Rfc specifies that the SAP adapter should pass the incoming RFC call as a WCF message with RFC parameters.

The default is Typed.

enum Microsoft.Adapters.SAP.IdocReceiveFormat

SncLibrary

SNC

Specifies the location of the SNC library on your computer. If the PATH environment variable contains the directory in which the library resides, you only have to supply the filename of the library; otherwise you must supply the full path. The SncLibrary binding property surfaces an SAP connection property. For more information see the SAP documentation.

You must set the UseSnc parameter in the connection URI to enable Secure Network Communications (SNC). For more information about the SAP connection URI, see The SAP System Connection URI.

string

SncPartnerName

SNC

Specifies the SNC partner name. The SncPartnerName binding property surfaces an SAP connection property. For more information, see the SAP documentation.

You must set the UseSnc parameter in the connection URI to enable Secure Network Communication (SNC). For more information about the SAP connection URI, see The SAP System Connection URI.

string

TidDatabaseConnectionString

TrfcServer

Specifies the database connection string for the SQL Server database that the SAP adapter uses to store Transaction Ids (TIDs). The BizTalk Adapter Pack setup wizard installs some SQL scripts that must be run by the SQL Server administrator against an existing database to create the SQL Server objects that are used by the adapter to store TIDs to enable inbound transactional RFC (tRFC) server calls. For more information about the SQL scripts, refer to the BizTalk Adapter Pack installation guide available at <installation drive>:\Program Files\Microsoft BizTalk Adapter Pack\Documents.

You must set this property to enable inbound tRFC server calls for receiving IDocs or RFCs from SAP. The default is null; tRFC server calls are not enabled.

You can specify the connection string in the following format:

Data Source=<myServerAddress>;Initial Catalog=<myDataBase>;User Id=<myUsername>;Password=<myPassword>;

To specify the connection string, click the ellipsis button (…) against the binding property and enter the values for the required connection string properties.

string

AcceptCredentialsInUri

Not surfaced by the Consume Adapter Service Add-in or the Add Adapter Service Reference Plug-in.

Specifies whether the SAP connection URI can contain user credentials for the SAP system. The default is false, which disables user credentials in the connection URI. If AcceptCredentialsInUri is false and the SAP connection URI contains user credentials, the SAP adapter throws an exception. You can set AcceptCredentialsInUri to true if you must specify credentials in the URI. For more information, see The SAP System Connection URI.

bool (System.Boolean)

You can set the SAP binding properties when you specify a connection to an SAP system. For information about how to set binding properties when you:

Other Resources

Development

Show: