cancel
Showing results for 
Search instead for 
Did you mean: 

Mutiple rowset data in Transaction Output

HariCS23
Contributor
0 Kudos

Hi There, I know i can append multiple rowset data into one xml output of my transaction/xacute.

Is there any way to map each rowset data to different grid in front end?

Reason i want to do it this way is, i have a expensive jco call in the transaction,and all of my four grids gets data from the same out put of that jco call. So,I don't want to make 4 xacute with 4 different op xmls which calls the same transaction.

Example :

<Rowsets>

     <Rowset>

              <Row><Row>

                ............

     </Rowset>

    <Rowset>

              <Row><Row>

               ............

     </Rowset>

     <Rowset>

              <Row><Row>

               ............

     </Rowset>

    <Rowset>

              <Row><Row>

               ............

     </Rowset>

<Rowsets>

Rowset[1] - iGrid1

Rowset[2] - iGrid2

Rowset[3] - iGrid3

Rowset[4] - iGrid4

Please advice.

Thanks

Hari

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

In the Module Library download project there should be an XSL called ShowDesiredRowset.xsl - it acted as an inline transform for filtering the desired rowset by the number provided as one of the XParamValues.  If i'm not mistaken your example sounds very similar to a use case on the QM side, where the same BAPI was used for multiple datasets returned by the same TRX.  With query caching enabled, it should only run the query once, but reapply the transform for each of your grid applets.  Since the applets can't really share the multi-rowset output, at least the query results can be cached and just filtered according to the transform input.

HariCS23
Contributor
0 Kudos

Hi Jermy..I haven't tried this though yet but it sounds like a very good solution. But the problem is i can't enable cache for my query template since data from ECC changes little frequently.

Instead,i tried some thing like this:

1.Get the multiple rowset ouput by ajax call.

2.Split the response xml with each rowset using DOM XML script.

3. Created a dummy Transaction which returns what is sent as input and created xacute for that.

4.Used that xacute by passing desired rowset info as text and render grid.

Let me know your thoughts.

Thanks

Hari

former_member185280
Active Contributor
0 Kudos

This is a method I used a few times in past.

In your main transaction generate a guid, put the data into queues using the guid as the ID, and return the guid to your page.

Then write a transaction/xacute that your grids can use that take the guid and queue name to return the data you want.

Just remember to clean up your queues. I usually just delete anything older then a few min in my retrieval transaction

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Hari,

In addition to Adarsh one more option you can try.

Add one input param in your transaction to decide rowset no,

than set output xml as rowset no as your input parameter like below

Link type: Append XML

Taget XPath: Transaction.OPXML{/Rowsets}

Expression: Local.Test_Combined_XML{//Rowset[#Transaction.IP#]}

I have tested this its working fine you can call same xacute query by passing different rowset no. 1,2,3 or 4 as below.

<APPLET NAME="GridApplet1" CODEBASE="/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="800" HEIGHT="300" TABINDEX=1 MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="QueryPath">

<PARAM NAME="DisplayTemplate" VALUE="Grid1Path">

<PARAM NAME="Param.1" VALUE="1">

</APPLET>

AND

<APPLET NAME="GridApplet2" CODEBASE="/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="800" HEIGHT="300" TABINDEX=1 MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="QueryPath">

<PARAM NAME="DisplayTemplate" VALUE="Grid2ath">

<PARAM NAME="Param.1" VALUE="2">

</APPLET>

Hope it help!!

Thanks & Regards,

Manoj Bilthare

HariCS23
Contributor
0 Kudos

Manoj, Unfortunately,Looks like the solution you given doesn't avoid call to your Transaction.

If that is what you wanted, you can very well create multiple OP XML parameters for the transaction and create multiple Xacutes for each OP XML.

Let me know if i misunderstood your solution.

Thanks

Hari

Former Member
0 Kudos

Hi Hari,

apologies for my previous post, yes it will call same transaction multiple times, by mistake I provided you that silly reply.

Thanks & Regards,

Manoj Bilthare

sidnooradarsh
Contributor
0 Kudos

Hello Hari,

There can be several techniques but one simple solution I can think of is when you fire first grid store the output as an XML file and then use XML query to display the remaining ones.

Hope this help!

Regards,

Adarsh