Framework EDI Reference. Methods and Properties
ediDocument. PutEdiString

Method that may be called multiple times to build an EDI text internally as a string.

Syntax:

Parameters:

Returns

Returns 1 if the operation is successful; otherwise the operation returns zero.

Remarks

When processing an EDI text as a string, it is possible to pass the entire text as a string if the string is short enough using the LoadEdiString method. However, if the text is large, the text has to be broken up into string parts which are then passed sequentially to FREDI by making multiple calls to PutEdiString. It is important that the strings are passed in order because the EDI text is internally built by concatenating the strings. To begin processing the EDI text, the LoadEdiString method must then be called by passing the last string of the document or an empty string.

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oSef As Fredi.ediSchema
Set oEdiDoc = New Fredi.ediDocument
oEdiDoc.LoadSchema "850.SEF", 0
' Pass strings a portion at a time.
oEdiDoc.PutEdiString "ISA!00! !00! !12!2132505600"
oEdiDoc.PutEdiString " !01!005146311 “
oEdiDoc.PutEdiString “!960807!1548!U!00401!000000020!0!P!>~"
oEdiDoc.PutEdiString "GS!PO!52H8P8T00!”
oEdiDoc.PutEdiString “005146311!19960807!1548!20!X!004010~"
:
oEdiDoc.PutEdiString "IEA!1!000000020~"
' LoadEdiString must still be called.
oEdiDoc.LoadEdiString ""