GIS/SI Envelopes Report (I)


Sometimes users need to have a detailed report about the envelopes they have in GIS/SI, but GIS doesn’t have such functionality. For example, you want to have a list of ISA/GS envelopes with the names, Sender/ReceiverIDs but there is no built-in functionality to get it easily. So, you have to check envelopes one by one (which is not very useful).

Solution 1

Fortunately, there are several ways to get this information. One of them is to export envelopes you need into an XML file and transform it into HTML report with using of XSLT.

Let me show how to create a simple report. For example, you use the following names for your envelopes:

[COMPANY NAME]_[TP NAME]_[I or O (inbound/outbound)]_[TYPE (ISA/GS/ST)]_[DOC ID (850/810/…]

and if your TP is WALMART and you use 810, 850 and 997 there will be the following envelopes:


And you need to get the list of Envelope/Sender/Receiver/Document. Your XSLT might be something like this:

<xsl:stylesheet version="1.0" xmlns:xsl="">
	<xsl:output method="html" indent="yes"/>
	<xsl:template match="/">
			<table width="100%" border="1">
					<td align="center">
					<td align="left" valign="top">
					<td align="left" valign="top">
					<td align="left" valign="top">
					<td align="left" valign="top">
				<xsl:for-each select="//ENVELOPE">
					<xsl:sort select="concat( substring-before(substring-after(NAME, '_'), '_'), FUNCTION, not(TYPE = 'ISA IEA'), substring(normalize-space(NAME), string-length(normalize-space(NAME)) - 2, 3) )"/>

						<td align="right" valign="top">
							<xsl:value-of select="position()"/>
						<td align="left" valign="top">
							<xsl:value-of select="NAME"/>
						<td align="left" valign="top">
							<xsl:value-of select="SENDER_ID"/>
							<xsl:if test="normalize-space(./ENVELOPE_PARMS/ENVELOPE_PARM[NAME = 'InterchangeSenderIDQualifier']/VALUE) != ''">
								[<xsl:value-of select="./ENVELOPE_PARMS/ENVELOPE_PARM[NAME = 'InterchangeSenderIDQualifier']/VALUE"/>]
						<td align="left" valign="top">
							<xsl:value-of select="RECEIVER_ID"/>
							<xsl:if test="normalize-space(./ENVELOPE_PARMS/ENVELOPE_PARM[NAME = 'InterchangeReceiverIDQualifier']/VALUE) != ''">
								[<xsl:value-of select="./ENVELOPE_PARMS/ENVELOPE_PARM[NAME = 'InterchangeReceiverIDQualifier']/VALUE"/>]
						<td align="left" valign="top">
							<xsl:if test="TYPE != 'ISA IEA'">
								<xsl:value-of select="substring(normalize-space(NAME), string-length(normalize-space(NAME)) - 2, 3)"/>

Please note that xsl:sort condition depends on your envelopes naming format.

Next, open Export.xml in text editor, remove all the attributes from <SI_RESOURCES> element and add a link to your XSLT:
<?xml-stylesheet type=”text/xsl” href=”_style_c.xsl”?>

Open Export.xml in MS Internet Explorer for example and you’ll see something like this:

Gennady Kim


One thought on “GIS/SI Envelopes Report (I)

  1. Pingback: GIS/SI Envelopes Report (II) | EDI shortcuts

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s