Multiple order sort in xsl

Hi all,
Does anyone know how I would go about doing a multiple order sort through my xsl? For example, sort by name first, then sort those results by date, thanks in advance.

okay, that would work, but i think i have a problem, i have an xml that looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<report>
- <column_headers>
<heading>Heading1</heading>
<heading >Heading2</heading>
</column_headers>
- <results>
- <row>
<attr1>value1</attr1>
<attr2>value2</attr2>
</row>
- <row>
<attr1>value3</attr1>
<attr2>value4</attr2>
</row>
- <row>
<attr1>consulting agreement</attr1>
<attr2>yesterday</attr2>
</row>
</results>
- <sort default="attr1">
- <order-by id="attr2">
<clause>attr2</clause>
<clause>attr1</clause>
</order-by>
</sort>
</report>
I need to sort the row nodes by attr2 first, then attr1, and i have something like this in my xsl:
<xsl:if test="$sortField != 'default'">
<xsl:for-each select="/report/sort/order-by">
<xsl:variable name="idField" select="@id"/>
<xsl:if test="$idField=$sortField">
<xsl:for-each select="/report/results/row">
<xsl:sort select="*[name()=$newSort]"/> --> i need the sort statements here for both attr2 and attr1, but how do i get them out of the xml whenI don't know beforehand how many clause nodes there will be, or what they will contain
<tr>
<xsl:for-each select="*">
<td class="report">
<xsl:value-of select="."/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>

Similar Messages

  • Multiple column  sorting on JTable data

    if any body can please send an example code how multiple column sorting can be done on table data.
    condition:- one column should sort in ascending order another column in descending order.
    am completly out of ideas it's urgent any help is greatly appritiated
    Thank's in advance
    sri

    I think the crosspost is because the OP was advised to post it in the Swing forum instead (it would've been nice to see the original post closed as well, though). Anyway...
    Have you got your table sorting using one column? If so, how have you achieved that (eg, are you using Java 6)?
    All you're after is a stable sorting algorithm so that any elements that are the same in the new sorting scheme stay in the same position relative to each other. Then you can just sort by "Column B" then "Column A" to achieve multiple column sorting. I believe that Collections.sort is stable and therefore any sorting approach based on that should be easily modifiable to do what you want.
    Hope this helps.

  • Single invoice for multiple orders with different divisions

    Dear All,
    while I am trying to do single invoice for muliple orders with different divisons invoice is gettting splitted..In copy control vbrk routine I  tried with 003 and 007 etc..but result is same..what configuration need to be done for getting the single invoice
    Thanks In advance
    Regards
    CNRNAIR

    Hello
    single invoice for multiple orders with "different divisions" invoice is getting split
    FYI - Different Division means different Sales Area.
    So, sales doc (whether sales order, Delivery & Billing) is applicable to EXACTLY one sales area.
    Thus, combining docs with different sales area is practically impossible.
    Provided, you are using common division.
    Hope this assist you,
    Thanks & REgards
    JP

  • Multiple Orders with Different reasons on a Single day

    Hi,
    I am recently learning Device Management of IS-U Electricity. Now I have a problem with meter reading orders generated at the time of periodic meter reading with reason 01 and different system generated orders with reasons like 22, 21 , 16 and 11 which are the orders get created internally based on device replacement and modification.
    If the scheduled meter reading date lies on the day or the day before of device replacement or modification, the meter reading for the periodic order is getting prorated based on the meter reading entered at the time of replacement or modification. This is what I dont want.
    Is it possible to have multiple orders with different reasons on the same date? Any configuration changes are welcome.
    - Arghya

    Hi,
    You can acheive this using following config changes.
    SAP Utilities --> Device Managment -->Meter Reading --> Meter Reading Order -->Order Creation --> Define Automatic Interpolation for Meter Reading Reason.
    Uncheck  the 'Auto Interpolation' flag for Meter Reading reason 01.
    This will not use the Replacement or Modifiaction read.
    Let me know if anything more is reuiqred.
    Thanks and Regards,
    Ranjit Thakur.

  • Need to modify Standard Purchase Order Stylesheet (PO_STANDARD_XSLFO.xsl)

    Hi
    We need to modify Standard Purchase Order Stylesheet (po_standard_xslfo.xsl) . Current stylesheet generating PO like the following.
    <FOR-EACH>
    ITEM_NUM
    ITEM_DESCRIPTION
    <FOR-EACH>
    SHIP_TO_ADDRESS_LINE1 NEED_BY_DATE QUANTITY
    </FOR-EACH>
    </FOR-EACH>
    Based on this, we are getting the output like this:
    Item Num 1
    Itme Description 1
    Ship To: Needed: Quntity
    1234. A1 Avenue JUL 200
    SomeCity, CA 90706
    1234. A1 Avenue AUG 200
    SomeCity, CA 90706
    4567 B1 Avenue JUL 100
    City2 , CA
    Itme Description 2
    Ship To: Needed: Quntity
    5689. c1 Avenue JUL 200
    SomeCity, CA 90706
    Our requirement is like this:
    Item Num 1
    Itme Description 1
    Ship To: 1234. A1 Avenue, SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 200 200 100
    Ship To: VVV4567 B1 Avenue , SomeCity, CA 90706
    Month: JUL AUG SEP
    Quantity: 100 200 100
    So we need to add ship_to group (ITEM/SHIP_TO) .
    How can we use group by item, ship_to..
    <fo:block> <xsl:value-of select="ITEM_NUM"/> </fo:block>
    <fo:block> <xsl:value-of select="ITEM_DESCRIPTION"/> </fo:block>
    <xsl:for-each select="/PO_DATA/LINES/LINES_ROW/LINE_LOCATIONS/LINE_LOCATIONS_ROW">
    <fo:block> <xsl:value-of select="SHIP_TO_ADDRESS_LINE1"/> </fo:block>
    <fo:block> <xsl:value-of select="substring(NEED_BY_DATE,4,3)"/> </fo:block>
    <fo:block> <xsl:value-of select="QUANTITY"/> </fo:block>
    </xsl:for-each>
    </xsl:for-each>
    In the above code I need split the data by ITEM_NUM/ SHIP_TO_ADDRESS_LINE1.
    I am new to xsl-fo. I tried different ways,but ship_to_address_line1 is generating wiith each quanty and need_by_date.
    Please guide me.
    Thank you
    Raju
    Edited by: subbaraju on May 7, 2009 2:36 PM

    Hi Chandra
    Thank you very much for your suggestion.
    I tried that way, I created some sample xml file, I created sample rtf file and I generated xsl-fo file. I copied the part of code into my PO_STANDARD_PO.XSL. I am getting some error.
    I noticed PO_STANDARD_PO.XSL is xsl version 1.0 and the generated sample data is with xsl version 2.0.
    The generated code is using “for-each_group”, “sum()”, “current-group()” etc. Is these functions will work in xslt 1? Or do we need to code different way?
    We are in Oracle APPS 12.0.4.
    Thank you
    Raju
    Edited by: subbaraju on May 26, 2009 11:56 AM

  • How to have multiple orders for a single contract

    Hi all, my question is:
    How to have multiple orders with respect to a contract which is valid for many years? The orders are given periodically over the lifetime of the contract. Once the order is given, the order quantity needs to be confirmed and then the order needs to be billed.
    Thanks in advance.

    Hi Bappaditya,
    To get multiple orders from a contract, you can either create an order as a follow up document from the contract
    Or
    Maintain the contract determination settings.
    In such a case, everytime you create an order the contract determination happens, for the particular business partner and product.
    For this to happen you need to maintain the customizing settings:
    1. Copy Control between contract and order
    2. Contract determination setting in the order transaction type
    The qunatity confirmation can be done by standard setting at itme category level.i.e. If the quantity is more than that stated in the contract an error is raised.
    For billing of order you will have to maintain the billing setings like billing type, biliing item category, billing item determination.
    Hence every time your order is created it comes in the billind due list from where you can create the blling document.
    Wish the information is helpful.
    Regards,
    Shalini Chauhan

  • How to change Payment Terms in multiple orders at same time?

    How to change Payment Terms in multiple orders at same time?
    I have got 10,000 Order, I need to change the payment terms for all these Orders.
    Can I Know the way out for this.
    Regards,
    Dantham Conpolwedson
    Edited by: Dantham Conpolwedson on Mar 25, 2009 11:18 AM

    Hi
    There are as many options for that
    You can go for
    1)MASS t code
    2) LSMW  (by recording)
    3)BDC (by recording)
    and the most easiest way is by doing the MASS tcode
    goto MASS and enter the object type as BUS2032
    execute now select the sales order haeader data and execute and now enter the sales doc from and to range and execute now all the sales dox will be displayed
    and from the menu click on select fields  and select the terms of payment
    now select the terms of payment row and enter the new values  and click on carry out new changes
    regards

  • Multiple Order Panels as JInternalFrames in one Form as a JDesktopPane

    I have a JClient application which consists of a form(JFrame) which opens a JDesktopPane. Within this desktop pane the user may open different panels(as JInternalFrames), one of them being a panel to create a new order. I want to have the ability for a user to create multiple order panels for different orders within the same desktop pane/form. The order panel consists of mainly 2 lookup views for customer and item information and 2 editable views for the order header and order details. While I can open multiple order panels, each with a unique binding container (ie. a uniquely named UIModel), within the desktop pane all of the open panels edit the same order. How can I modify my code to allow a user to create/edit multiple order instances using this order panel?

    Hi,
    did you have a look at
    http://www.oracle.com/technology/products/jdev/howtos/10g/jcmultiform/index.html
    the section "Data Binding in a Concurrent-Forms Use Case" describes what you are trying to achieve
    Frank

  • Multiple orders scheduling in one screen - Revisions.

    Hi,
    Is it possible to schedule multiple orders in one screen using network graphics?
    Scenario is: in day to day operations we create maintenance orders and plan operations with its duration.
    after planning, if it requires more down time than permitted, we keep it for quarterly shutdown. For same we assign maintenance revision to each order. Now SAP provides report of all shutdown jobs based on revisions but we can not schedule multiple orders at a time using network graphic. eg. order 01 will start first, after this 02, 03 will start as parallel activity after that 04 will start.
    Please advise.
    Thanks,
    Nilesh.

    Using Maintenance Event Builder, you can use that functionality. Check this link.
    http://help.sap.com/saphelp_di471/helpdata/en/d7/d0b83a47d0c649e10000000a114084/content.htm

  • How to create itemwise multiple order report Quary?

    Hi,
    create  item A and multiple order 1,2,3  and have different Quantity
    so I want item wise multiple order quantity and BP name it is possible in sap b1
    Item name     BP Name1     Bpname2 Bpname3 
    A                    10                    15          20         

    Hi,
    Yes possible. Please advice in which table you want get quantity.
    Try this for open sales order quantity.
    Select [A] as Itemcode, [D] as Description, [01],[02],[03]
    from(
    SELECT T0.[ItemCode] as A, T0.[Dscription] as D, sum(T0.[Quantity]) as T, T1.[CardCode] as C FROM RDR1 T0  INNER JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[LineStatus] = 'o' GROUP BY T0.[ItemCode], T0.[Dscription],T1.[CardCode] )S
    pivot
    (sum(T) FOR C in ([01],[02],[03])) P
    Note: Replace 01,02 and 03 with your customer code.
    Thanks & Regards,
    Nagarajan

  • Analysis of multiple orders in KKBC_ORD report

    KKBC _ORD report show only one order analysis at a time, but i want to anylysis of multiple orders at a time.
    Is there any way to analysis mulple orders in this report?
    Regards
    Abdul Jabbar

    Hello,
    We have similar requirement. Did you find any standard solution for this?
    Thanks,
    V V

  • Rationing available stock at the DC across multiple orders by priority

    Hi experts,
    We have a business requirement to ration available stock held at the DC across multiple orders in the situation of a shortage.
    The requirement is to do this rationing is based on the document type of the originating STO and Ordering Site classification, so that the most significant order type and most significant store gets the available inventory first.
    We have 5 primary store STO document types and we wish to classify them from 1 to 5, 1 being the most imporant.
    We also have circa 300 stores and likewise wish to classify them 1 - c.300, 1 being the most important.
    Using this classification data we want to generate Outbound Deliveries from the STOs.
    A simple example:
    We have a Qty of 20 pieces of Article 1 in the DC available:
    The following STOs have been generated:
    Doc. Type 1 - Store 1 -  Article: 1 Qty: 10
    Doc. Type 1 - Store 2 -  Article: 1 Qty: 5
    Doc. Type 2 - Store 1 -  Article: 1 Qty: 10
    Doc. Type 2 - Store 2 -  Article: 1 Qty: 15
    We would expect the following Outbound Deliveries to be generated:
    OBD 1 - Store 1 - Article: 1 Qty: 10
    OBD 2 - Store 2 - Article: 1 Qty: 5
    OBD 3 - Store 1 - Article: 1 Qty: 5
    We need this processing to take place in the shortest possible time, as we have strict timings around orders being available in the DC WMS for picking due to a short lead time.  We therefore want to maximise parallel processing, rather than just sequencing the running of VL10B to be one order type and one store at a time.
    Any ideas on how best to achieve this requirement and how you would approach it?
    Has anyone done similar types of rationing before?
    Many thanks in advance!
    David

    Hi James,
    Thanks for the information, we are using IS Retail 4.7. 
    The complexity we face is that we need to create outbound deliveries off a collective STO generated via Merchandise Distribution with SLS.  So this STO is effectively one site along the chain from the originating store.
    We're trying to ration the stock at the source DC across the collective STOs by Document Type and Originating store.
    So that the most important Order (IE promotion etc) and the most important / profitable store get the stock.
    For example, we wouldn't want our "New Store STOs" (of which the store may not have even opened yet)  and not be able to give any stock to our biggest store who's get a promotion this weekend.
    I know the simple answer is don't run out of stock, but we try to run a tight ship on quite a few articles, so we need to ensure we give it to the right store and for the right reason.
    Hope that helps explain the scenario in more detail.
    Many thanks,
    Dave

  • Multiple Column sort Pop Up not opening using af:PanelCollection

    Hi guys,
    I have a table in which i want to sort on the basis of Multiple Columns.For that I have used af:PanelCollection but when in menus my advance sort Pop Up is Not opening.I am using jdeveloper 11.1.1.6.
    <af:panelCollection id="pc1" styleClass="AFStretchWidth"
    partialTriggers="t1">
    <f:facet name="menus"/>
    <f:facet name="toolbar"/>
    <f:facet name="statusbar"/>
    <af:table value="#{bindings.xx_sw_vwVO.collectionModel}"
    var="row" rows="#{bindings.xx_sw_vwVO.rangeSize}"
    emptyText="#{bindings.xx_sw_vwVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.xx_sw_vwVO.rangeSize}"
    rowBandingInterval="0"
    width="100%"
    selectionListener="#{bindings.xx_sw_vwVO.collectionModel.makeCurrent}"
    inlineStyle="height:350;"
    rowSelection="single" id="t1"
    partialTriggers="::cb1 ::sor1"
    contentDelivery="immediate" immediate="true"
    autoHeightRows="30" columnSelection="multiple">
    <af:clientListener method="sskuRowSelection" type="click"/>
         <af:serverListener type="sskuRowSelectEvent"
    method="#{DataworkbenchBN.sskurowselect}"/>
    <af:column sortProperty="SskuId" sortable="true"
    headerText="#{bindings.xx_sw_vwVO.hints.SskuId.label}"
    id="c33">
    <af:inputText value="#{row.bindings.SskuId.inputValue}"
    label="#{bindings.xx_sw_vwVO.hints.SskuId.label}"
    required="#{bindings.xx_sw_vwVO.hints.SskuId.mandatory}"
    columns="#{bindings.xx_sw_vwVO.hints.SskuId.displayWidth}"
    maximumLength="#{bindings.xx_sw_vwVO.hints.SskuId.precision}"
    shortDesc="#{bindings.xx_sw_vwVO.hints.SskuId.tooltip}"
    id="it17">
    <f:validator binding="#{row.bindings.SskuId.validator}"/>
    </af:inputText>
    </af:column>

    ADF -- panelCollection multiple column sort
    ~Abhijit

  • Multiple column sorting in JTable

    There is way to release multiple column sorting in JTable.
    ADF/SWing, Jdev 10.1.3

    I do not know that there is, but it would be really nice!
    regards,
    mario udina

  • Multiple order

    Hi...
    How can i create multiple order from single notification. Please help me...
    Thanks
    Irma

    Hello,
    I believe, you can have only single order from a notification for a particula rorder type. If you try to generate the same order type again from the notification, it thows error.
    Prase

Maybe you are looking for