cancel
Showing results for 
Search instead for 
Did you mean: 

Binding iGrids to specific subset of Rowsets

Former Member
0 Kudos

Hi guys,

I am having a problem where one of my transaction returns Rowsets containing multiple Rowset of different structure.

The transaction itself is a modified version of the BAPI ProcessOrderDetail, which returns four different structures (Header, Components, ... )

How can choose to display through an iGrid only one of these documents?

Will I have to modify the logic/output of my transaction or can I have the iGrid bind to a subset of the resulting transaction output?

Thanks,

Martin

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Martin,

There are a number of possible solutions. I assume you are using an Xacute Query to feed the grid. If so, you can take each of the XMII XML Documents (Components, Phase, and Header) and create an output property for each in ProcessOrderDetails transaction (named ComponentOutputXML, PhaseOutputXML, and HeaderOutputXML). Instead of having their outputs linked to Transaction.OutputXML, link them to their appropriate output property. When configuring your Xacute queries, you can then select the output you want for the Grid you want populated. You can also do this dynamically within your javascript in the webpage if you wish it to change inputs for a single grid display.

You could also add some logic at the beginning of ProcessOrderDetails so that you only return one of the selected datasets instead of the three selected. Of course, if you are only interested in one set of data (Components for example), then simply delete all the other functionality for the other two datasets. If Components is all you are interested in, delete the other two Doc action blocks, delete the associated AddRow action blocks, delete the Unions, and clean up the references elsewhere.

Good luck,

Mike

jcgood25
Active Contributor
0 Kudos

Martin,

Here is a very simple xsl that does nothing more than allow the desired rowset to make it through to the iGrid applet (it doesn't stop the query from running of course). Just create an xsl file from the snippet below and put it in your web location, then reference it as an InlineTransform in your query template. The name/value pair for telling the transform which Rowset to return will be ShowRowset and #, which can be mapped into the grid of XParam properties for the Inline Transform.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="ShowRowset">1</xsl:param>
	<xsl:template match="/">
		<Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
			<xsl:copy-of select="/Rowsets/FatalError"/>
			<xsl:copy-of select="/Rowsets/Messages"/>
			<xsl:copy-of select="/Rowsets/HyperLinks"/>
			<xsl:copy-of select="/Rowsets/Rowset[position() = $ShowRowset]"/>
		</Rowsets>
	</xsl:template>
</xsl:stylesheet>

Regards,

Jeremy

Former Member
0 Kudos

You could also combine the results with an Inline XSL Transform, passing in a parameter representing the Rowset that you want to show. Then in the XSL Transform use XPATH (for each /Rowsets/Rowset[myParam]/Row).

Former Member
0 Kudos

Martin,

You can also pass an input parameter to the transaction to request the dataset you are interested in. In that way the transaction can generate only the dataset you have requested for. This will eliminate the need of creating multiple query templates too.

Another option is to use XSL transofrmation but I guess the above solution will work perfect for you.

John

Former Member
0 Kudos

Hi.

You need to add more output parameters to your transactions, each containing one structure Rowsets/Rowset/Row.....

Then make more queries, attaching each to one of your transaction output parameters and then attach each query to iGrids...

Br.

Poul.