Why character is sorted before number in the ascending order?

By specify sorting by as ascending, the result will be
aaa
bbb
111
222
By specify sorting by as descending, the result will be
222
111
bbb
aaa
and the expected result(ascending), which is the one normally adopted by sql is
111
222
aaa
bbb
any idea to achieve this?

Try This:
<?sort:SiteName;lang='no'?>
or
<?sort:string-length(substring-before ('01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
,substring(SiteName,1,1))) ;'ascending';data-type='number'?>
or
<?sort:string-length(substring-before ('01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
,substring(SiteName,1,1))) ;'descending';data-type='number'?>

Similar Messages

  • Invoice number  - in the return order purchase order tab page

    Hi
    User needs invoice number in the PO Tab  of the return order when Created with reference to invoice .
    usually PO number of the Sales order will be comming .
    what needs to be done for this
    Regards
    Anil

    Hi,
    If you are creating Return order with respect to Invoice then you can write a Data transfer routine for business data to copy invoice no to PO no field in VTFA .

  • Apple TV sorts my photos only in ascending order, how can I change so the most recent EVENTS appear first?

    Apple TV sorts my photos only in ascending order, how can I change so the most recent EVENTS appear first?

    I'm looking for an answer to this, too, since I have thousands of Events, and so scrolling down to the bottom every time I want to show my newest photos makes it almost unusable.

  • Batch Determination - Number of the production order

    Hi All,
    First of all i must say that my knowledge in this module is low. I am a FI, CO consultant but my administration ask me to check the following situation.
    In Production Orders we want to attrib to the batch number the number of the production order.
    Can we do that?
    Can you give some details about that?
                     Best Regards
                          João Fernandes

    Hi João Fernandes,
    If I understood clearly, you want the batch number for the production order to be same as the production order number.
    This is not possible in standard but can be achieved using the user exit (try SAPLV01Z).
    Tell your abaper to write a code in that to pick up the batch number same as the production order number.
    Regards,
    Narendra Bora

  • Account Document Number Against the Purchase Order No.

    Hi,
    I have 2 queries in my report...
    1..i want Account Document Number Against the Purchase Order No.
    2..and Account Document Number Against the Invoice No.
    Note:.. Account Document Number have the 55... series. foe ex. 5500017019...
    Plz let me know in which table i can get it...
    Thanks...

    Hello Prince,
    To find the GR no. against the FI doc number the tables involved will be BKPF, RSEG, EKBE.
    Plz see the algorithm below for details:
    1. Select the A/C'ing docno. from BKPF. For the FI docs selected, get the incoming invoice details from RSEG.
    RSEG-BELNR = BKPF-AWKEY+0(10)
    RSEG-GJAHR = BKPF-AWKEY+10(4)
    Please note you can restrict the FI docs selections by using BKPF-AWTYP = 'RMRP'.
    2. From RSEG you get the PO number (RSEG-EBELN) & then go to the PO History Table EKBE to get the GR number (EKBE-BELNR).
    EKBE-EBELN = RSEG-EBELN
    EKBE-EBELP = RSEG-EBELP.
    Hope this is clear.
    BR,
    Suhas

  • Displaying the sorted acct number as the first element

    Hi,
    I have list of account numbers , say 5 account numbers (2300,5200,7689,1234,4566) from which I found which is the parent acct number by invoking a query. Here the parent acct number is say "1234". Now i need to make sure that parent acct number records should always display at the top part of the screen followed by other child acct numbers displayed in ascending order. Here my question is, having found the parent acct no (1234) , how I can make sure this will be displayed at the top. Because the final list contains other acct numbers as well. Using comparator is a pbm. as i cannot pass the parent acct no to the compare() method to display this at the top. I want to do this in a single final list itself which contains all the acct number details. How to go about this? Please shed some light into this.
    Thanks.
    JavaCrazy

    Re: Sorting the respective account number at the top
    What happened to this thread?

  • Table containeing both the purchase order number and the sales order number

    hi all!!!
    what is table that contains both the purchase order number and sales order number corresponding to that purchase order number.
    Moderator message: please search before posting.
    Edited by: Thomas Zloch on Jan 31, 2012

    Hi Sunny,
    Yes they are same. You will be creating a purchase order in ME21n. After creating purchase order you will shown a number for that order.
    Reward points if useful.
    Thanks,
    Swamy Kunche

  • Promotion number in the sales order for free goods promotion.

    Hi,
    I have a business scenario in which "Sales Orders are created" for the customers in SAP IS Retail System.(This is for helpdesk ordering). In most of the occasions, free goods promotion would be running. The free goods promotions(exclusive) are maintained using promotion module in IS Retail system(condition type NA00). In this situation, the promotion number is not getting populated in the sales order automatically. Is there any specific configuration required or any BADI needs to be activated?
    Note: Free goods item is getting generated automatically in the sales order with item category TANN.
    Can any one advice pls.
    Thanks and Regards,
    Selvakumar

    Hi selva
    1)Check in Change Promotion T.code - WAK2
    in the item level   Promotion announcement category(Ann column) - set indicator as F     Promotion announcement
    2)Check sales periods dates - Sales order from to TO it should be valid date
    if not works, reply me i will give some more solutions
    regards
    Satish

  • How to Find Out The Production Order Number For The Sales Order Line Items

    Hi All,
    I want to know the number of production orders for each sales order line item. I know the sales order number .Can anyone tell me how the tables can be linked to get all the production order numbers for each sales order line item.

    I think it depends on your configuration. But check fields KDAUF and KDPOS in table AUFK.  or in table AFPO.
    Regards,
    Rich HEilman

  • "In FBL5N unable to view purchase order number and the sales order number"

    Hi,
    Below mentioned is the problem we are facing,
    In the Customer Line Item Display (FBL5N) it is vital for us to be able to view the customer's purchase order number as well as the sales order number for each billing document listed by customer.
    We need to be able to extract this information for each customer and import to an excel spread sheet for analysis, specifically for our larger customers that have over 500 plus lines.
    Kindly advise how to go about the same.
    Regards
    Harish

    Dear,
    Please also check note 152335. There, you will find a more detailed            
    explanation of the issue.                                                                               
    The only way to see some information regarding related PO-es in a Vendor       
    line items is a workaround. For example, it is possible to create              
    a substitution in order to fill in one of not currently used fields            
    like Reference, Text, etc.    
    I hope this helps You.
    mauri

  • How do I get the line number of the sales order and how do I save info?

    I am trying to create a form that is able to be called from a right click on the sales order matrix and will display some of the user defined fields associated with the line.
    I've managed to create a form and add a menu option to the right click but I'm now stuck because of the following:
    1. How to I know which line the user selected? I need the REAL Line Number from the RDR1 table because I need to use it on the data filter of the form.
    2. I hard coded a line to just to see if I can load a form and it appears to load and bind the data to the controls, but how do I save changes made? There are several text fields, combo boxes, and a picture control.

    Hi Coleman,
    1. The pVal returned form a menu event does no provide the LineId, but a pVal from a Item Event does. I suggest you use a DoubleClick or Control + Click on the Line to trigger an event that you can catch and use to launch your form.
    2. Please note that if the Sales Order line is closed you'll not be able to update the values. If it's not, then you need to instantiate a Sales Order document, get the correct document with the GetByKey method and update whatever fields you need.
                    Dim oSalesOrder As SAPbobsCOM.Documents = oCompany.GetBusinessObject(BoObjectTypes.oOrders)
                    If oSalesOrder.GetByKey(docentry) = True Then
                        oSalesOrder.Lines.SetCurrentLine(pVal.Row - 1)
                        oSalesOrder.Lines.UserFields.Fields.Item("U_MyUDF").Value = ""
                        oSalesOrder.Update()
                    End If
    Regards,
    Vítor Vieira

  • Why would my PDF Form print out the tab order on top of my form fields?

    When this user prints out the filled out PDF form we created, it prints the tab order as a little square numbered box right on top of the form field entry.  The tab order prints over all types of fields, text entry fields, check box fields, etc.
    I am not sure if this issue is related to someone using a non-Adobe PDF reader, or an issue with their printer?   Unfortunately, we cannot duplicate this issue ourselves and are hesitant to interrogate our client futher on the matter. 
    Has anybody else ever seen this type of print out from a PDF form issue?

    Thanks for your reply!  Based on your suggestion I did a little experimenting.
    This is a form saved to Enable User Rights so PDF viewers can fill out and email or save the form.   After seeing your question, I opened the form for editing (actually saving a copy first that was not restricted, and editing the copy).  I then toggled the Tab Numbers on via Tools > under the Forms header I clicked Edit > Other Tasks > Edit Fields > Show Tab Numbers.  After revealing the tab numbers I then tried to save the form as a Reader Extended PDF, but the Enable Additional Features option was grayed out.  Even if I wanted to, I could not save the form with the tab numbers revealed.
    The form itself was also received by our company electronically and when viewed does not show the tab number order and when we print it, it prints as expected (no tab order numbers).
    We are suspecting that this may be an issue either with the end users printer? Or possibly viewing and printing via an alternate viewer like Foxit?
    Anybody run across this odd behavior?

  • Case number from the service order number

    Hi,
    I am doing a report where in when the user enters a service order number <b>or</b> case number (both are optional )the result list that he gets would include both case number <b>and</b> the service order number(of the service and case documents).
    I would like to know the function module that i can use to get the case number for the given service order number.
    Thanks and Regards,
    Harish.

    Pls use the FM CRM_PRIDOC_READ_OW. You can pass the header GUID.

  • MDX query to retrieve Leaves sorted by attribute bypassing the parent order

    Hi there,
    I have a Dimension with a hierarchy as:
    Country -> Area -> Location
    Location is sorted based on a Attribute called Rank based on a column in the dimension table that has a predefined value per location. In short, Location attribute has the property OrderByAttribute set to Rank.
    When I used Location attribute directly on the reports it is correctly displayed sorted by Rank.
    I am building some dashboards in Performance Point, and the problem I have is that I have to used the Hierarchy above to pull the Locations into the row axis of a Scorecard and the Locations are shorted by Rank but taking into account the Area in which they
    are:
    So using the Hierarchy I am getting:
    Location1
    Location2
    Location3
    Location4
    When I would like to get:
    Location3
    Location1
    Location4
    Location2
    I know that this is correct when thinking on the Hierachy structure, but as I am forced to display the Locations from the Hierarchy but sorted purely by their Rank, I would need a MDX query that returns the Leaves (Location) of the hierarchy order by Rank
    without taking into account the area.
    Could anyone help me with that?
    Thanks and best regards,
    Joss

    You could write a query something like this:
    SELECT {MEASURES.MYMEASURE} ON 0,
    ORDER([MYDIMENSION].[MYHIERARCHY].[LOCATION].MEMBERS, [MYDIMENSION].[MYHIERARCHY].CURRENTMEMBER.PROPERTIES("Rank", TYPED), BDESC) ON 1
    FROM MYCUBE
    Regards,
    Chris
    Check out my MS BI blog I also do
    SSAS, PowerPivot, MDX and DAX consultancy
    and run public SQL Server and BI training courses in the UK

  • How to get the delivery number for the sales order

    hi
    how to get the delivery number for the sales order

    Hi,
    1. IN VA03, enter the sales order and click on the document flow button. From there you can check the delivery document.
    2. In SE11, enter VBFA(Document flow) table and enter the sales order in VBELV field and in VBTYP_N field enter 'J' to specify that you want to check if there is already a delivery document for that sales order.
    Hope it helps...
    P.S. Please award points if it helps...

Maybe you are looking for