EDIFACT UNB Specification
EDIFACT UNB specification is available at:
EDI Tools for .NET C# Examples
The example below is part of the EDI Tools for .NET C# Code Examples.
The Generate EDIFACT UNB code is also available on GitHub
How to generate EDIFACT UNB with EDI Tools for .NET
///
/// Build UNB.
///
public static UNB BuildUnb(string controlNumber)
{
return new UNB
{
SYNTAXIDENTIFIER_1 = new S001
{
// Syntax Identifier
SyntaxIdentifier_1 = "UNOB",
// Syntax Version Number
SyntaxVersionNumber_2 = "1"
},
INTERCHANGESENDER_2 = new S002
{
// Interchange sender identification
InterchangeSenderIdentification_1 = "SENDERID",
// Identification code qualifier
IdentificationCodeQualifier_2 = "01",
// Interchange sender internal identification
InterchangeSenderInternalIdentification_3 = "ZZZ"
},
INTERCHANGERECIPIENT_3 = new S003
{
// Interchange recipient identification
InterchangeRecipientIdentification_1 = "RECEIVERID",
// Identification code qualifier
IdentificationCodeQualifier_2 = "16",
// Interchange recipient internal identification
InterchangeRecipientInternalIdentification_3 = "ZZZ"
},
DATEANDTIMEOFPREPARATION_4 = new S004
{
// Date
Date_1 = DateTime.Now.Date.ToString("yyMMdd"),
// Time
Time_2 = DateTime.Now.TimeOfDay.ToString("hhmm")
},
// Interchange control reference
InterchangeControlReference_5 = controlNumber
};
}
Comments
0 comments
Please sign in to leave a comment.