XSLT Grouping & Sorting in 10g BPEL

Hi,
Can any one tell how we can achieve grouping and sorting of xslt in soa 10g.
This is possible in 11g but not getting any clue as how to proceed for 10g.
Please response soon.
Thanks & Regards,
Divya

this one works for me
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ns1="http://xmlns.oracle.com/SampleJDE_BioprodProcess">
     <xsl:template match="/">
          <ns1:SampleJDE_BioprodProcessProcessResponse>
               <xsl:for-each select="/ns1:SampleJDE_BioprodProcessProcessResponse/ns1:billToNumber">
                    <xsl:sort select="."/>
                    <test>
                         <xsl:value-of select="."/>
                    </test>
               </xsl:for-each>
          </ns1:SampleJDE_BioprodProcessProcessResponse>
     </xsl:template>
</xsl:stylesheet>output
<?xml version="1.0" encoding="UTF-8"?>
<ns1:SampleJDE_BioprodProcessProcessResponse xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ns1="http://xmlns.oracle.com/SampleJDE_BioprodProcess">
     <test>1</test>
     <test>2</test>
     <test>9</test>
</ns1:SampleJDE_BioprodProcessProcessResponse>

Similar Messages

  • Grouping in XSLT2.0: BPEL 11g

    Hi All,
    I have a requirement to group an incoming xml data(read from DB) and pass the groups separately to another BPEL process. Now I have written the below xsl file which when tested from Jdeveloper using an input source.xml file is working fine and giving me desired results in target.xml
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/Select_Groupid_Revpro">
    <xsl:output method="xml"/>
    <xsl:template match="Select_Groupid_RevproOutputCollection">
    <root>
    <xsl:for-each-group select="Select_Groupid_RevproOutput"
    group-by="ARR_ID">
    <xsl:sort select="current-grouping-key()"/>
    <Select_Groupid_RevproOutputCollection>
    <xsl:copy-of select="current-group()">
    <xsl:apply-templates/>
    </xsl:copy-of>
    </Select_Groupid_RevproOutputCollection>
    </xsl:for-each-group>
    </root>
    </xsl:template>
    </xsl:stylesheet>
    However when I use this in my BPEL code using a transform activity
    <assign name="Transform">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('xsl/Transformation_1.xsl',bpws:getVariableData('Invoke_RevproDB_Select_Groupid_Revpro_OutputVariable','Select_Groupid_RevproOutputCollection'))"/>
    <to variable="tmpvar"/>
    </copy>
    </assign>
    It fails with :
    empty variable/expression result. The XPath variable or expression ora:processXSLT(&apos;xsl/Transformation_1.xsl&apos;,bpws:getVariableData(&apos;Invoke_RevproDB_Select_Groupid_Revpro_OutputVariable&apos;,&apos;Select_Groupid_RevproOutputCollection&apos;)) is empty at line 178. An attempt to read or copy data referenced or computed by the XPath expression either had invalid data, according to the XML schema, or did not contain certain optional data. Ensure that the variable or expression result named in the error message is not empty. Enable XML schema validation of related variables to ensure the run-time data is valid.
    Any suggestions on what can be checked to fix this error.
    Regards
    Subhankar

    Hi
    Thanks for your reply.
    We tried by assigning the static text, this text successfully comes at run time.
    We have only issue when mapping from source to target. None of the values are getting mapped to target from source.
    - Ravi

  • How do I change the number in a Top N Group Sort

    I have a report that I have grouped on a particular field (Cust.Name specifically). I then used the group sort expert and selected the Top N selection in the combo box under the Cust.Name tab. I put in a default number of 20. What I want to do is to set this number for the Top N group sort via .NET. Does anyone know the correct method for doing this in either VB.NET or C#.NET. I am using VS 2005 Pro and the embedded Crystal Reports engine for VS.NET. Thank you.
    Ed Cohen

    Hello, Edgar;
    In the bundled version of Crystal Reports 10.2 in Visual Studio .NET 2005 you will need to use the following code:
    Private Sub Set_TopN()
            Dim TopNSortField As TopBottomNSortField
            'Get the Sort field by index
            'Cast it as a TopBottomNSortField
            If TypeOf crReportDocument.DataDefinition.SortFields.Item(0) Is TopBottomNSortField Then
                TopNSortField = crReportDocument.DataDefinition.SortFields.Item(0)
                TopNSortField.NumberOfTopOrBottomNGroups = 10
            Else
                TopNSortField = Nothing
            End If
        End Sub
    In a full version of Crystal Reports there is an option to create a parameter as a number such as {?TopN} and then pass the value to it at runtime.
    In the Crystal Reports designer you need to create the parameter and then go to Report|Group Sort Expert.
    Choose TopN based on your field.
    Where N is... You will need a number there. I used 1. But then I clicked on the Formula editor [X+2] and added the parameter field {?TopN}.
    Passing the parameter at runtime ran the number I requested.
    Elaine
    Edited by: Elaine Dove on Mar 3, 2009 12:12 PM

  • Sum of a sum when using Top N in the Group Sort Expert

    Hi All,
    I have a small problem I can't quite seem to work out.
    I have a report where each line is for a particular Product, and is a summation of the Sales for that Product over several Locations. When you click on the line, it shows the breakdown of Sales over each Location.
    I use the Group Sort Expert to display the Top N results, where the 'N" is set in a formula to a parameter passed in to the report, so the user can select the top 5,10,50 etc. Products across all Locations.
    At the bottom of the report, I want to have a sum of a column of Sales $. I need that sum to only be a sum of the Top N records selected.
    Since each line is a summation of the all the products for the Locations, what I need is a sum of that sum for the Top N, but Crystal will not let you add the sum of a sum, so I'm not sure how to accomplish this.
    If I just do a sum of the underlying values I get a total for all the Products, regardless of the Top N.
    Hope that makes some sense !
    Many Thanks
    Paul

    Hi Sastry,
    I tried your suggestion, thanks, but I don't think it's the answer. For a start Crystal will not let me do that, it pops up a message box when I try to run the report "A running total cannot refer to a print time formula. Details: Record Number". I also added the record number field next to the lines in the report to see what the result would be, and I don't think it would work anyway.
    Here is an example using Units sold:
    Product Name--LocationUnits Sold--Record Number
    Product A -<All Stores>----8
    Store A--1--
    1
    Store B--3--
    2
    Store C--4--
    3
    Product B--<All Stores>--3      
    Store A--2--
    4
    Store B--1--
    5
    Product C--<All Stores>--
    1
    Store A--1--
    6
    Note that only the bold lines are shown in the report,. If you click on the bold line, then the breakdown of the stores is shown. For the above example, I am showing the Top 2 units across all stores (so Product C is not shown at all), but there are actually 5 records, so if I used a formula where RecordNumber <=N, where in this case N=2, I would get a total units sold of 1 + 3 (records 1 and 2) which is incorrect.
    I will have more of a think on this and see if I can find a solution, in the mean time, any other suggestions ? Is there some wya of checking if the line is visible maybe ?
    Thanks for your time !
    Paul

  • How to implement multi-source XSLT mapping in 11g PS3 BPEL  ?

    Hi
    How to implement multi-source (single destination) XSLT mapping in 11g PS3 BPEL ? Is there any good example step by step ?
    thx
    d

    Hi d,
    Also there's a sample available at samplecode.oracle.com mapper-105-multiple-sources.zip.
    Regards,
    Neeraj Sehgal

  • Group Sort on formula field

    I am using CR Professional 11.5 on Windows XP/Progress platform.
    I have a formula field that calculates the GM% on the Employee Group Footer level and want to sort the employees in descending order by GM%.  I have gone in circles trying to calculate this field differently in order to be able to perform a Group Sort but this GM% cannot be summarized, which would allow me to use the Group Sort Expert.
    The fact that GM% is used in businesses world-wide each and every day makes this unbelievable that it should prove to be this difficult.  Is there something that I am missing as a newbie to CR design? 
    Any help provided is greatly appreciated!
    Marlene Human

    That's so awesome!  If only I knew how to use sql commands!  Everytime I try to create one it has errors that I dont' understand.  Do you know of a site for sql syntax that might help me to do this?  I have looked and can't find what I need to make this happen.
    So what I need to do is to use 'Formula Workshop' and create a new SQL Expression Field?  Using the formula above, how would this look in SQL?
    Thank you so much for your help...I am so grateful!!!  I have been working on this for months and keep hitting this snag.  I first started out using a cross-table and got confused because you can't summarize the GM% so I then changed the summary to 'weighted average of GM% with Tech/Rev' so that helped, but the Total per Employee has been keeping me stumped. 
    Thanks again.

  • Group/Sort Summary Totals for Duration % Complete not working

    Hello, I'm new to this forum and have used p3 off and on years ago and had some exposure to p5, my background is more toward Project Controls - Cost management rather than scheduling. Here is my issue/question: I was told by the PM not to baseline the schedule (I know, I should have but I didn't, I did as I was specifically requested), that is a topic for another day, however. I am trying to understand the process of the % completes on my resource loaded schedule which all activities are set to duration percent complete. The schedule has roughly quarter of the activities which have been actualized, but my issue is with the "Summary Totals" of the duration % complete when I select that option in the Group/Sorting. All of the activities in a group for example will show 0% complete but the Summary Total of those activities will show greater than 0% or some of the activities duration % completes show a value greater than 0% but the Summary Total of those activities show 0%. What is causing this and why are they not consistent? Any help is greatly appreciated!
    Shannon

    I'm currently showing the duration % complete with a renamed label. The total is not rolling up to the summary. I've also discovered that the unit % complete is not calculating correctly too I believe. For example: I have 3708 budgeted hours and have expended 656 hours and the Unit % Complete is showing 19.08% when I would have thought that the % would have been calculated based on Actual Units (656) / Budgeted Units (3708) totaling 17.69% not 19.08% which it is showing. I cannot find in the reference manual how the percent completes are calculated for units nor in the help section of the software itself either. An explenation would be greatly appreciated!
    Shannon

  • Use parameter to specify "N" in Top N Group Sort

    I've successfuly set up a parameter which is passed to the Group N Sort criteria.
    Is there a way I can use this to set NO group sort? I've tried setting it to zero & 999999999 but it falls over.

    I think you can enter the values only between 1 to 32767. You can try creating a sample report with groups in it and go to group sort expert and select top N and try to add the value 0 then you will get a popup saying "Please enter an integer between 1 and 32767"
    Regards,
    Raghavendra

  • GROUP SORT PARAMETER

    I have a report with a group sort of the "Top N" items based on profit.  I already have a parameter that allows the user to specify the "N", but I want to also give the option to change the group sort based on sales or units sold.  Is there a way to do that?

    hello all,
    actually Brian's solution is correct...i use this method all the time.
    add two more steps to his solution...you should have created a formula with syntax
    Select {?GroupField}
       Case "Sales" :{table.SALES}
       Case "Units Sold" :{table.UNITS_SOLD}
       Default :{table.SALES};
    1) now add this formula to the details section, right click on it, and add a Summary, type = Sum.
    2) now go to the Group Sort Expert and add the formula, removing any other sorts in there already.
    you can now sort the groups on this formula that he gave you.
    if you have crystal reports 2008 or 2011 you can also use Interactive Sorts instead of using a parameter / prompt.
    cheers,
    jamie

  • Group sort using 2 fields

    Is there any way that I can have two fields as a group sort in order that the first group sort field will repeat when the second field changes?
    Thanks.
    Leah

    One possibility would be to create a calculated item (ItemA||ItemB), and use that as a hidden group sort. Not sure about your platform, but in Desktop, you need to specify the item as a 'group' sort, then change it to 'hidden'. You would still display your original items, but don't sort on them.

  • Group Sort Option

    I have a formula on a group level.  That is in basic sum(x)-sum(y)/sum(y).
    I need to use this as a group sort option and it does not seem to allow me to

    Hi Brian,
    In order to sort with the result of sum(x)-sum(y)/sum(y) use the group sort order based on sum(x). Since we cannot sort on the result of the formula that contains summaries.
    Thanks & Regards,
    Raghavendra.G

  • Group Sort Expert Top N

    In Group Sort Expert I have a group called @Sku and I want to select the top 500 based on Sum of @SortByData which works except the totals are for the whole group and not just the top 500.
    Also I would like to select Ascending/Descending based on a parameter field IN the Group Sort Expert since I'm using a based on field (not in Group Expert Change Group Options).

    Hi sharonamtowler,
    My requiremnet is TOP N Materials based on the Current Availiable Stock in each Plant.  In CR from my db, I get four records in Details section for each Material (on 4 weeks, let say 48,49,50,51 ) of a Plant.
    I have grouped on Plant & material. 
    But to get Top N Materials I have to do Summation(Current Availiable Stk) which mean in My Material Group Section I get the Sum of Current availibale Stock of 4 weeks. But I need Top N based on the last weeks Current Availible Stock.
    How to do this?
    I left Plant in Group Sort Expert with No Sort and on Material I have given TOP N.
    I need to know whether only Summation Values should be used in Group sort expert ?
    please some help me solvethe issue.
    Edited by: KRISHNA CHAITANYA B on Dec 29, 2009 6:12 AM

  • Group Sort Filtering

    Hi
    I have a report which has a group sort on number of days sickness leave for employees over a period of a year .
    Is there a way of setting a condition on the group (sub) total to exclude total sickness less than 8 days and the individual lines that make up the sub total?
    Or could you advise of an alternate way to do this.
    So to recap I need to exclude employees whose sickness total for a year is less than 8 days.And the report lists individual entries of sickness for a year by employee.
    I am using Discoverer Desktop version 4.
    Thanks
    Edited by: user650649 on 23-Jul-2010 02:28

    Hi,
    In general, you can do this by using an analytic sum function in a calculation. So you would calculate the total number of days sickness partitioned by the employee and the year. You can then include this calculation in a condition to exclude all the records where this total is less than a given value.
    Regards,
    Rod

  • Group Sort ALV

    Hi,
    Is it possible to group sort on ALV?
    it seems we are able to merge together several rows via sort but only on its field level.  is it possible to be a group field level?
    example if i sort PO number first and vendor second it will have individual PO and the vendor field is merge together if it is the same with a different PO.  Can we make the PO number as the first priority sorting without changing the position of the fields?

    c z wrote:
    Hi,
    >
    > Is it possible to group sort on ALV?
    >
    > it seems we are able to merge together several rows via sort but only on its field level.  is it possible to be a group field level?
    >
    > example if i sort PO number first and vendor second it will have individual PO and the vendor field is merge together if it is the same with a different PO.  Can we make the PO number as the first priority sorting without changing the position of the fields?
    If I have understood your requirement correctly, group sorting should be as simple as filling up the 'IT_SORT' parameter(REUSE_ALV_GRID_DISPLAY/REUSE_ALV_LIST_DISPLAY/CL_GUI_ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY)
    as shown below: (please let me know if I have misunderstood your requirement).
    ls_sort-spos = '1'.
      ls_sort-fieldname = 'FIELD1'.
      ls_sort-up = 'X'.
      APPEND ls_sort TO it_sort.
      CLEAR ls_sort.
      ls_sort-spos = '2'.
      ls_sort-fieldname = 'FIELD2'.
      ls_sort-up = 'X'.
      APPEND ls_sort TO it_sort.
      CLEAR ls_sort.
    Even after displaying the ALV, columns can be group sorted by selecting all of them together(by dragging the cursor over all the columns that need to be sorted)
    -Rajesh.

  • Group sort

    Hi
    I have a date field and i did a group sort on that feild, for some reason its not giving me the months in order.For example
    the result must be like below
    JAN 08
    FEB 08
    MARCH 08
    APR 08
    Instead its showing
    MARCH08
    JAN08
    APRIL 08
    FEB 08
    please any advice will be of great help.
    Thanks

    You can display the data any way you want, but if you sort on a date that is in a "Month, Year" format, they will sort alphabetically. You need to sort on the numeric month to get things to display in standard calendar order.
    Show the date as you want, but sort on a calculation that uses the numeric month (and do not sort on the date being displayed). When setting up the sort, check the "Hidden" box, and the column will not be displayed.

Maybe you are looking for

  • How do you use user defined error messages in Value Help?

    Hi, I'm currently working on a Modifiable Value Help Selector in Web Dynpro Java, and I want to use a user defined error message when I validate the values entered by a user. Currently, it's returning its default error message ("Character <string> do

  • Why is "Duplicate" file smaller?

    When I "Duplicate" a Project file, why is the size nearly 20% smaller than the original (668 vs. 132 MB)? Does the "new" file contain the same information (i.e. is it an exact duplicate)? Also, what is the difference between "Duplicate" and "Make Ali

  • Re: youtube streming support

    new nokia support for playing youtube

  • Actualizar OSX Lion en varios equipos de la organización

    Hola, Quiero actualizar todos los Mac de mi organización al nuevo sistema operativo. Tengo 2 equipos modelo iMac 10,1 con Snow Leopard y 8 equipos modelo iMac9,1 con Leopard. Quiero saber que pasos debo realizar para adquirir la licencia de Mac OSX L

  • No faces on corkboard after rescan

    Faces "was" working just fine until I decided to trash face.db and face_blob.db to force a rescan. It did the rescan...took about 30 minutes and I could see it moving through all the faces. But when it finished, there an empty corkboard with the tuto