ERPConnect.Idocs.Idoc
Namespace: ERPConnect.Idocs
Assembly: ERPConnectStandard20.dll
Represents a single IDoc including its segments
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Idoc()
Initializes an empty Idoc object
Idoc(string, string)
initializes an empty Idoc object
Parameters
IdocType
string
Name of the idoc type
Extension
string
Name of the extension. If no extension is requiered, set to ""
Properties
ARCKEY
Key for external message archive
Property Value
CIMTYP
Extension (defined by customer)
Property Value
CREDAT
Created on
Property Value
CRETIM
Time Created
Property Value
Connection
R3Connection object to which the Idoc will be sent
Property Value
DIRECT
Direction
Property Value
DOCNUM
IDoc number
Property Value
DOCREL
SAP Release for IDoc
Property Value
Description
Description
Property Value
EXPRSS
Overriding in inbound processing
Property Value
IDOCTYP
Name of basic type
Property Value
LastTID
Transaction ID of last outbound call
Property Value
MANDT
Client
Property Value
MESCOD
Message code
Property Value
MESFCT
Message function
Property Value
MESTYP
Message type
Property Value
OUTMOD
Output mode
Property Value
RCVLAD
Logical address of recipient
Property Value
RCVPFC
Partner function of recipient
Property Value
RCVPOR
Receiver port
Property Value
RCVPRN
Partner number of recipient
Property Value
RCVPRT
Partner Type of receiver
Property Value
RCVSAD
Recipient address (SADR)
Property Value
REFGRP
Message group (EDI Message Group)
Property Value
REFINT
Transmission file (EDI Interchange)
Property Value
REFMES
Message (EDI Message)
Property Value
SERIAL
Serialization
Property Value
SNDLAD
Logical address of sender
Property Value
SNDPFC
Partner Function of Sender
Property Value
SNDPOR
Sender port (SAP System, external subsystem)
Property Value
SNDPRN
Partner Number of Sender
Property Value
SNDPRT
Partner type of sender
Property Value
SNDSAD
Sender address (SADR)
Property Value
STATUS
Status of IDoc
Property Value
STD
EDI standard, flag
Property Value
STDMES
EDI message type
Property Value
STDVRS
EDI standard, version and release
Property Value
Segments
Collection of all segment that are child relation to the current segment
Property Value
SkipHLevel
DO NOT USE!!!! FOR INTERNAL USE ONLY!!!
Property Value
TABNAM
Name of table structure
Property Value
TEST
Test flag
Property Value
TemplateSegments
Gets a collection of available template segments retrieved or loaded from a schema by calling ERPConnect.R3Connection.CreateEmptyIdoc(System.String%2cSystem.String)
or ERPConnect.Idocs.Idoc.LoadIdocSchema(System.String)
.
Property Value
Dictionary<string, IdocSegment>
Methods
CreateSegment(string)
Creates a new segment with fields to be filled with data.
Parameters
SegmentName
string
Name of the segment. Please refer to transaction WE60 to find out which segments can be used for the idoc type.
Returns
A newly created IdocSegment object
GetCurrentStatus()
Returns an IdocStatus object which represents the current status of the IDoc
Returns
IdocStatus object
GetIdocSchemaString()
Gets the IDoc schema as string
Returns
String with IDoc schema data
LoadIdocSchema(string)
Loads a schema file and stores the segments internally for further use (e.g. for the CreateSegment method)
Parameters
SchemaFileName
string
Filename
Remarks
Please use the IDocSchemaGenerator tool that is included in the ERPConnect installation package
LoadIdocSchema(StreamReader)
Loads a schema file and stores the segments internally for further use (e.g. for the CreateSegment method)
Parameters
IdocSchemaStreamReader
StreamReader
StreamReader object that points to an resource file
Remarks
Please use the IDocSchemaGenerator tool that is included in the ERPConnect installation package
LoadIdocSchema(TextReader)
Loads a schema and stores the segments internally for further use (e.g. for the CreateSegment method)
Parameters
TextReader
TextReader
TextReader
Remarks
Please use the IDocSchemaGenerator tool that is included in the ERPConnect installation package
LoadPlainData(StreamReader)
Loads IDoc from a single plain file. You must make sure to have a shema loaded before calling this function
Parameters
strm
StreamReader
A StreamReader object
LoadPlainData(string)
Loads IDoc from a single plain file. You must make sure to have a shema loaded before calling this function
Parameters
FileName
string
Filename
LoadPlainDataString(string)
Parameters
Content
string
LoadXMLData(string)
Loads a XML IDoc data file.
Parameters
IdocFile
string
Filename
Remarks
Please make sure to use LoadIdocSchema or RFCConnection.CreateEmptyIdoc before loading the IDoc data. It is not possible to load data without having defined the segments:
R3Connection con = new R3Connection("hamlet",90,"RFCTestUser","pass01","DE","800");
con.Open(false);
Idoc i = new Idoc();
i.Connection = con;
i.LoadIdocSchema(@"c:\ORDERS01.xsd");
i.LoadData(@"c:\Order.xml");
i.Send();
con.Close();
LoadXMLData(TextReader)
Loads a XML IDoc data file.
Parameters
IdocFileTextReader
TextReader
XML TextReader
SaveIdocSchema(string)
Saves the schema file of this IDoc type and enhancement to a file
Parameters
SchemaFileName
string
SaveIdocSchema(XmlWriter)
Saves the schema file of this IDoc type and enhancement to a XmlWriter object
Parameters
XmlWriter
XmlWriter
SavePlainData(StreamWriter)
Writes the whole IDoc to a single file
Parameters
writer
StreamWriter
A StreamWriter object
SavePlainData()
Writes the whole IDoc to a single file
Returns
SavePlainData(string)
Writes the whole IDoc to a single file
Parameters
FileName
string
Filename
SavePlainData(string, Encoding)
Writes the whole IDoc to a single file
Parameters
FileName
string
Filename
Encoding
Encoding
Encoding
SaveXMLData(TextWriter)
Saves the IDoc to an XML file (including all segments)
Parameters
IdocFileTextWriter
TextWriter
TextWriter
SaveXMLData(string)
Saves the IDoc to an XML file (including all segments)
Parameters
IdocFileName
string
Filename and path
SaveXMLData(string, string)
Saves the IDoc to an XML file (including all segments)
Parameters
IdocFileName
string
Filename and path
XMLEncoding
string
XML Encoding e.g. ISO-8859-1
Send(string, string)
Sends the Idoc to the SAP system within a qRFC context of the given TID and inbound queue
Parameters
tid
string
Transaction ID
queue
string
Inbound queue
Send(string)
Sends the Idoc to the SAP system within a tRFC context of the given TID and inbound queue
Parameters
tid
string
Transaction ID
Send()
Sends the Idoc to the SAP system
SendAndWait()
Sends the IDocs and waits until the IDocs is processed. You can call GetCurrentStatus after SendAndWait()
Returns
IDoc is processed successfully true/false
ToString()
Returns the idoc as string for debugging purpose
Returns
Idoc as string