Use
Provides the necessary information for logging onto the receiving R/3 system when sending an inbound IDoc through the IDoc Connector for XML component.
You can set the Connection property by assigning a connection object to the Connection property. You can obtain a connection object by using the
DCOM Connector Logon Component (which is a part of the SAP Automation suite of tools).
Obtaining a Connection Object
Use the
DCOM Connector Logon Component to get a Connection object for the Connection property:Syntax
IdocProcOutboundObj
.ConnectionData Type
Object
VB Example
The following example lets an end user enter the logon information. It uses this information to set the Connection property of the SAPIDocProcessorInbound object. It then sends an inbound IDoc from an XML file.
Private Sub Inbound_Click()
'Instantiate the inbound object:
Dim idoc As New SAPIDOCPROCLib.SAPIDocProcessorInbound
'Instantiate the connection object of the DCOM Connector Logon Component:
Dim conn As New Connection
On Error GoTo bad_news
'Use the Logon method of the DCOM Connector Logon Component
' to display a dialog box to the user
' for entering connection information.
' If the call succeeded,
' the user had entered the information.
' Assign the resulting connection object
' to the Connection property of the inbound object.
If conn.Logon() then idoc.Connection = conn
' Send the inbound IDoc document
' from myXML XML file:
Call idoc.SendIDocToR3(INBOUND_IDOC_PROCESS, "myXML.XML")
MsgBox "IDoc processed and sent to R/3", vbInformation, "Cheers"
Exit Sub
bad_news:
MsgBox Err.Description & " " & Err.Source, vbCritical, Err.Number
Exit Sub
End Sub
See Also
As an alternative to setting the Connection property, you can provide the necessary connection information by specifying an existing Destination entry from the
SAP DCOM Connector. See the
SetConnectionParameters method for details.