EDIFACT UNG Specification
EDIFACT UNG 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 UNG code is also available on GitHub
How to generate EDIFACT UNG with EDI Tools for .NET
///
/// Build UNG.
///
public static UNG BuildUng(string controlNumber, string transactionType)
{
return new UNG
{
// The type of messages in the group, INVOIC, etc.
MessageGroupIdentification_1 = transactionType,
APPLICATIONSENDERIDENTIFICATION_2 = new S006
{
// Sender identification
ApplicationSenderIdentification_1 = "SENDERID",
IdentificationCodeQualifier_2 = "ZZZ"
},
APPLICATIONRECIPIENTIDENTIFICATION_3 = new S007
{
// Recipient identification
ApplicationRecipientIdentification_1 = "RECEIVERID",
IdentificationCodeQualifier_2 = "ZZZ"
},
DATEANDTIMEOFPREPARATION_4 = new S004
{
// Date
Date_1 = DateTime.Now.Date.ToString("yyMMdd"),
// Time
Time_2 = DateTime.Now.TimeOfDay.ToString("hhmm")
},
// Group control reference
GroupReferenceNumber_5 = controlNumber,
// Controlling agency
ControllingAgency_6 = "UN"
};
}
Comments
0 comments
Please sign in to leave a comment.