SetConnectionParameters Method 

Use

Specifies connection information for logging onto the receiving R/3 system when sending an inbound IDoc through the IDoc Connector for XML component.

The method takes most or all of the connection information from an existing Destination entry in the SAP DCOM Connector.

If the Destination entry in the SAP DCOM Connector does not include all the information, your program can specify the missing connection information as parameters when calling this method.

You can also override some of the information in that Destination entry in the call to this method. For example, you can specify a different logon language than the language specified in the Destination entry.

Syntax

SetConnectionParameters(Destination, [UserID], [Password], [Client], [Language])

Parameters

Name

Type

Description

Destination

String

The name of the Destination entry as specified in the SAP DCOM Connector.

Optional Parameters

You can use the following parameters to supplement or override the information in the Destination entry:

Name

Type

Description

UserID

String

User ID (also called Username) for logging onto the destination R/3 system.

Password

String

Password used by the user specified in UserID for logging onto the destination system

Client

String

Client number to use in the destination system

Language

String

Language to use when logging onto the destination system

VB Example

The following example uses the Destination entry SYS1 from the SAP DCOM Connector:

SetConnectionParameters("SYS1")

The following example uses the Destination entry SYS1, but it overrides the Language to be English:

SetConnectionParameters("SYS1",,,, "EN")

For a more complete example of sending an inbound IDoc with the IDoc Connector for XML component (after specifying the connection information with SetConnectionParameters) see Using the Component for Creating Inbound IDoc Documents.

Comments

You can find the SAP DCOM Connector product in the Windows Start menu under SAP Frontend or under SAP Automation.

See Also

As an alternative to using the SetConnectionParameters method, you can provide the necessary connection information by using the DCOM Connector Logon Component (from SAP Automation), and then setting the Connection property of the SAPIDocProcessorInbound object. This allows you to get the information from an end user.