PickIDoc Method 

Use

Gets the XML document resulting from an outbound IDoc. Gets the XML document specified by the ID parameter.

Syntax

idocobj.PickIDoc(DocId)

Parameters

Name

Type

Description

DocId

Long

The ID of the XML document

Data Type

String

Return Value

Returns the XML document

Comments

You must have first obtained the document ID by using the IDocReceived event.

VB Example

The following section of code first gets the document ID for the received IDoc, and then it uses PickIDoc to get the XML document. It displays the XML text in a message box (your program should provide a more sophisticated handling of the text of the resulting XML document).

Private Sub idoc_IDocReceived(ByVal Id As Long)
' Some other processing...
   MsgBox idoc.PickIDoc(Id)
' Displays the XML document in a message box
' (which only displays the end of the document,
'   if the document is long)
End Sub

See Also

For a more complete code for receiving outbound documents, see Using the Component for Receiving Outbound IDoc Documents.