AP check sorting issue

Hi All,
We need to sort check printing depending on the payroll area. The scenario below present the clear picture of our requirement.
Say for eg, we have three payroll area
P1
P2
P3
Now if i payroll area is  P1 then the check
should be printed based on sort criteria decided for payroll P1, as show below. similarly
the sort criteria for P2 and P3 are different from each other.
1. If payroll area is P1 then sorting should be done on location, last name, first name.
2. If payroll area is P2 then sorting should be done on last name, middle name, first name
3. If payroll area is P3 then sorting should be done on location , last name, middle name, first name.
should this be done by modifying the SAP std check printing program or is there  any other way like some user exit...
Regards,
Pankaj Singh

Hi pankaj,
1. I don't know whether there is user-exit
  for this program.
2. Even if there is one,
  it won't provide the functionality u won't.
3 Don't Modify the SAP Standard Code.
4. Instead copy the program to Y/Z
   and then understnd the code
   and accordingly write your own code (patch)
  for sorting puprose.
regards,
amit m.

Similar Messages

  • F110- Check Sort Based on document number

    Hi All,
    We are using the program RFFOUS_C to print check when we are doing the payment run F110.
    Presently, checks are sorted as per vendor name (Name 1) while printing. We need to print check sorted based on document (Invoice) number, field BELNR. SO, that checks are printed in the same order as we have entered invoices.
    But the field BELNR field for sorting is not available in the application REGUH (Correspondence), which is a natural way to check print sorting. (In customizing FBZP, "Payment method in Company Code" form data, Sorting of corrpondence)
    Is there a way, we can sort check based on the invoice number (BELNR). .
    Thanks
    Ron
    Edited by: Ron on Jan 7, 2010 1:34 PM

    Hey Ron,
    In Free Selection tab on F110 tcode, Pick Field name as BKPF-BELNR (Document number). Now create the proposal and do the payment run.
    Thanks
    Raghuram

  • Sorting issue after upgrade from 9i to 10g

    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T.

    903714 wrote:
    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T. This is expected behavior in 10g. Oracle will not order the dataset for you unless and until you explicitly specify it.
    So without using order by clause in 10g, oracle doesn't guarantee that rows will be ordered.
    To go back to old behavior like 9i, you can set a workaround by
    alter session set "_newsort_enabled"=false;
    Also see MOS - Order Of Data Retrieval Differs after upgrading 9i To 10g [ID 456707.1]

  • Query as a web service Sorting issue

    Hi All,
    We have designed an existing BI query as a web service but it seems to be ignoring the Sort order of different characteristics used (as defined in Bex Query Designer).
    Using the Context menu in QAAS and defining/managing the Sort is not working.
    Has anyone experienced such an issue and how to handle this?
    Thanks and Regards,
    Bansi

    Hi All,
    You can try this solution. It has something to do with the universe parameter, END_SQL.
    I implemented this as a work around and it solved our problem about the sorting issue with QAAWS.
    Here are the steps:
    1: Open the universe
    2. Ope File,  then Universe Parameter
    3. Click the parameter tab
    4. Scroll down until you see the 'END_SQL' entry. This entry is blank by default.
    5. Select END_SQL
    6. On the VALUE box, type: ORDER BY 1
    7. This will enable the REPLACE button. Click REPLACE
    8. Save the universe
    9 Test a query using 2 columns and view the SQL.
    You should see now the ORDER BY 1 inferred in the SQL statement.
    Voila!!!!
    Of course you can always add ORDER By 1,2,3 later if there's a need.
    Enjoy.....
    Ferdinand

  • Finder sort issue

    I seem to be having a sorting issue.
    This order seems odd to me, but like to get your opinions about it.
    (This folder is sorted alphabetically by file name.)
    2008 01.doc
    2008 02.doc
    Activiteit_oktober.doc
    af 200802 - groen reserve.rtf
    af 200802 - groen.rtf
    af 20071130 - groen-geel.doc
    af 20080126 - groen.rtf
    af 20080216 avond - leiding WE.pages
    af 20080704 avond - groen & oranje.pages
    af 20080709 avond - bezinning.rtf
    idee spel.rtf
    In my logic the file 'af 20071130 - groen-geel.doc' should be before the two files beginning with 'af 200802' and not after. Or is this just me?

    In my logic the file 'af 20071130 - groen-geel.doc' should be before the two files beginning with 'af 200802' and not after. Or is this just me?
    OS X Finder sorts strings of digits according to their value, not digit by digit. 200802 is less than 20071130. Here is a note on the issue:
    http://homepage.mac.com/thgewecke/sorting.html

  • Front Row sorting issues

    Hello,
    I know this issue has been posted several times and without any real solutions. But I'm going to ask again anyway in case the magical hacking gnomes have found a work-around.
    I have many sorting issues. There seems to be a lot of kvetching on here already about how Front Row sorts TV shows. But not only do my shows come up backwards within seasons, in some cases seasons themselves are out of order. For example, I have all 3 seasons of 30 Rock (purchased through iTMS) and they go season 1, season 3, season 2. Several other shows with multiple seasons are the same.
    But I also have a music sorting issue. The first part of this issue has to do with compilations. I've got several compilations in my library, and in iTunes I've sorted them by Various Artists rather than individual artists. In Front Row, if I scroll down to "V," there is no "Various Artists" like you might expect but instead a list of all the artists in all the compilations completely out of order. (Actually, they're ordered by their track number on the different albums. Yeah. That makes sense.) I could deal with these artists showing up in their normal places alphabetically, but not all lumped together under V.
    The other issue has to do with albums with one artist who has some tracks that feature other artists. Kanye West's "Graduation" is a good example. About half the tracks on the album are him "featuring Jamie Foxx," for example. So I put "Kanye West" in the sort field of this album so it displays properly in iTunes. Not only does this seem to have no effect on how things are sorted in Front Row, but there's actually multiple "Kanye West"s now, each one identical, as well as multiple "Kanye West feat. Jamie Foxx," lines and all the other multiple artist track. Uh...what?
    So I know that Front Row for some ridiculous reason is (a) not customizable and (b) operates under completely different sorting rules than iTunes (which makes no sense), but if anyone has any advice or tips or comments or whatever, that would be greatly appreciated.
    I've considered switching to a different media management program, but what I like about Front Row is its simplicity. I don't really feel like learning a whole new system (let alone getting my wife to buy into that idea). I've got better ways to spend my time. So, it's a trade off, I guess.
    Anyway, Apple Gods? Are you out there? Are you listening?

    I can't believe we're still banging on about the sorting problems. Apple have seen fit to provide a number of features to allow the user to get iTunes working the way they like, e.g. grouping compilation artists and the use of sort fields. I think you can now even keep compilation artists grouped on the iPod. But why oh why do they then totally ignore this for the AppleTV and Front Row (which look like the same codebase to me)?
    I have hundreds of genuine Artists that I want to see listed in the Artists' list, but not the thousands of others that appear on compilations. They don't even sort the artists by the Artist Sort field that they themselves provide in iTunes. This makes a nonsense of trying to use either the ATV or Front Row.
    Playlists are no help as they simply lump all contained tracks in one great list. Useless.
    The annoying thing is, they can get it right. iTunes just gets better and better in this regard, each release sorting out more of the omissions of earlier versions. But ATV and Front Row - nope, nothing. Still just as stupid as always. Just what will it take to convince Apple to 'sort' (ha) this out? How can they justify such entirely different ways of working on their different products?

  • XQuery sorting issue

    Hi,
    Right now I am in a big trouble. I am new in XQuery, but right now I'm in a project using Xquery using PHP and XSLT..
    In our project we have large no. data (its a property listing site) and I'm storing that data to Berkeley DB (XML DB). The problem is when I am searching for a property its taking too much time for getting the result. The ORDER BY is creating the problem(Query 1).. with out sorting its working fine(Query 2). But for my project sorting is needed and its very impotent. So kindly please check my query(Query1) and please give me a solution as soon as possible. Following are the query:
    Query1:
    let $properties := (
    for $property in collection('bdb/properties.dbxml')/properties/property
    [( sale_price >=60000 and sale_price <=500000 ) and ( building_square_footage >=300 and building_square_footage <=3000 ) and ( bedrooms >=2 and bedrooms <=6 )]
    order by
    contains($property/mls_agent_id/text(), '505199') descending,
    matches($property/mls_office_id/text(), '^CBRR') ascending,
    $property/sale_price/number() descending
    return $property
    let $properties := subsequence($properties,10,10) return <properties>{$properties}</properties>
    Query 2:
    let $properties := (
    for $property in subsequence (
    collection('bdb/properties.dbxml')/properties/property
    [( sale_price >=60000 and sale_price <=500000 ) and ( building_square_footage >=300 and building_square_footage <=3000 ) and ( bedrooms >=2 and bedrooms <=6 )]
    , 1, 10)
    descending return $property
    ) return <properties>{$properties}</properties>
    Thank you,
    Vijesh
    Edited by: 893736 on Oct 28, 2011 10:28 AM
    Edited by: 893736 on Oct 28, 2011 10:33 AM

    Hi,
    Thank you for your reply.. right now there is a slight improvement in Query. But still i'm stucked with issue... also this project is also stucked...
    Now the problem is when I am searching for a property it will list the first 10 property quickly(100% speed). Then I'm going to 2dn, 3rd page its working in the same speed. But if I'm going to 10th(30% speed) or 100th or 1500th(15%speed) page is working very slowly.
    Following are my query:
    let $property_ids:=
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id,
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id,
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id
    return <properties>{
    for $id in subsequence($property_ids, 1, 10) return
    collection('bdb/properties.dbxml')/properties/property@property_id = $id
    }</properties>
    And some times query will change like the following way based on the filter option in my page(means sort by only sale_price field):
    let $property_ids:=
    for $property in collection('bdb/properties.dbxml')/properties/property
    order by $property/sale_price/number() descending
    return $property/@property_id
    return <properties>{
    for $id in subsequence($property_ids, 1, 10) return
    collection('bdb/properties.dbxml')/properties/property@property_id = $id
    }</properties>
    then from the first page its self its performance is very slow(15%).
    Could you please check my query and help me to solve the issue...
    Thank you,
    Vijesh

  • 6th Gen sorting issues

    iPod software: 2.0.1
    iTunes software:.10.5.1.42
    Windows 7 Pro 64 bit SP 1
    I'm a strong supporter of proper sorting. So much so that I add the year of release to the Sorting > Sort Album field to bypass the alphabetical sorting iTunes seems to prefer.
    This is a minor issues in the grand scheme, but if someone can identify what I'm doing wrong, that would be awesome.
    In the early part of Prince's career, he released music as Prince (1981, 1982, 1987) and also as Prince and The Revolution (1984, 1985). Looking above to how I sort by year of release, I would prefer that these five albums sort chronologically, but with the correct artist names. On the iPod as of now, they sort as Prince (three albums), Prince and The Revolution (two albums), and Prince (three albums) again. Same three albums, same 34 songs, same art, same everything. I can make them sort correctly in iTunes, but not on the iPod.
    Thanks for any advice you might have!
    Screenshot of iTunes, then a (blurry) pic of the iPod:
    http://www.imagebam.com/image/e7e028161665617
    http://www.imagebam.com/image/d50356161665991

    I haD the same issue, and was thoroughly ticked off until doing some research and then trying couple things.
    I was able to change the volume limit, that WAS set at half.  I adjusted it to max volume, set a lock passcode, and away I drove.
    Then, upon hitting "play", I began to get a little ticked off.  I realized after a few minutes, I couldn't hear anything playing.
    It was so quiet- and I-95 is noisy, with me regretting buying another Apple product, after is wrote not to.
    So- after reading through a couple of these threads, I just adjusted the volume limit, and VOILA!
    It reverted to 50%.
    So, I did a total wipe, factory-reset it as new iPod.  I checked setting=>volume limit and it was at the 50% point again. First thing that I did was go to the last selection under settings menu, "reset settings" and noted it doesn't delete sync days, solely sys settings.
    I adjusted the volume limit to 100% immediately afterwards, set a new passcode and then.....
    Hit play.
    It worked. Plays just as loud as my original 3rd Gen iTouch. 
    So Dylan1219, maybe try that?  It's so simple, I am shocked that's how I fixed it.  It had been set- and always snapped back to the 50% mark.
    So, MAYBE that could solve the problem..?  I have hearing loss from rock &amp; roll and concerts, etc...so, thankfully this isn't a bunk product.  Just had a bunk setting. 
    It has stayed at Max level for hours now, and can state it solved it for me.
    I would hypothesize, all iPod classics are made the same, except for the "options"  of storage and color.  Maybe a small "governor" or a piece of extra firmware is added after the fact, or only "every 9th iPod" who knows for sure...? 

  • Multiple Sorts Issue

    I have two fields in a WEBI report (XIR2) that I want to sort.
    1st a date field decending
    2nd a string field ascending.
    I apply the sort to each field, then double check the priority to make sure it does date first.  The issue is that the string field always sorts descending no matter what setting I have the sort on for that field.  If I only sort on the string field ascending, its works fine, but having to do the date first screws it up.
    Any ideas?

    Brian,
    Double check your sort order. You can do this by checking the table properties.
    Select the table (not the cell) and open the propery tab. You will see the last item is sort and when you click on the button you will get a place set the sort order.
    thanks,
    Anil

  • Sorting issue in ALV ABAP webdynpro

    Hi All,
    We are displaying the data in ALV format using ABAP webdynpro.
    The issue here is sorting the values. The field  is the character field, as the field may contain character or numberic values.
    When we sort a set of values in ascending order, the values are sorted wrongly.
    Example values sorted in ascending order:
    11055
    11260
    5662
    8697
    9984
    The above values are sorted wrongly. Is this a standard limitation of webdynpro ABAP or do we have any support class or setting available to solve this issue.
    Please help.
    Regards,
    Vijay

    Hello Vijay
    of course its not  a limitation, you can sort it either ways.
    Check the following link
    http://help.sap.com/saphelp_nw70/helpdata/en/e9/e5eb40c4f8712ae10000000a155106/content.htm
    you can use the following classes
    Set sort Direction  -
    CL_SALV_SORTS meth:  ADD_SORT (Parameter SEQUENCE)
    CL_SALV_SORT  meth:  SET_SEQUENCE
    Get sort direction
    CL_SALV_SORT meth: GET_SEQUENCE
    hope this helps!!
    Regards
    Senon

  • Sorting issue in inner loop not working

    Here is a small example to get a better understanding of the issue we are facing.
    Following is the XML Structure.
    <G_MAIN>
    <CP_ACCT>40010.0</CP_ACCT>
    <G_BATCH>
    <JRNL_EFFECTIVE_DATE>09/01/12</JRNL_EFFECTIVE_DATE>
    <JRNL_EFFECTIVE_DATE>09/03/12</JRNL_EFFECTIVE_DATE>
    </G_BATCH>
    </G_MAIN>
    <G_MAIN>
    <CP_ACCT>40010.0</CP_ACCT>
    <G_BATCH>
    <JRNL_EFFECTIVE_DATE>09/01/12</JRNL_EFFECTIVE_DATE>
    <JRNL_EFFECTIVE_DATE>09/04/12</JRNL_EFFECTIVE_DATE>
    <JRNL_EFFECTIVE_DATE>09/02/12</JRNL_EFFECTIVE_DATE>
    </G_BATCH>
    </G_MAIN>
    We have two G_MAIN groups in the above example.
    Since we need to group based on CP_ACCT value, we have written code on the RTF to achieve this.
    So ideally, data under both the G_BATCH groups (total of 5records) has to be sorted.
    But when sorting, it is sorting each of the G_BATCH groups and printing them.
    As a result of this, this is how the output is shown.
    09/01/12
    09/03/12
    09/01/12
    09/02/12
    09/04/12
    Edited by: user12258588 on Sep 24, 2012 11:34 AM

    Hi,
        In the code lines clear the work areas before evry read statement and and check for sy-subrc after evry read statement.
    and populate ur work areas in to the text that need to be displayed.
    Regards,
    Vijaya Lakshmi.T

  • VF04 - billing due list sort issue on print output

    We are having sort problem when printing SD billing using VF04.  Each month our staff creates or enters billing invoices in the system.  On a specific period they will print these invoices to distribute to our customers.  The problem they have is when the invoices prints some are no longer sorted according to the customer name.  For example if there are 50 invoices created for John Doe, what the system will do is it will print the first 10 invoices on the first batch then the rest will be printed at the middle and the other will be at the end of the print job.  For this reason they will have to re-sort the stack of invoices manually.  Is there any way to correct this problem.
    I appreciate any help I can get.  In advance thank you for the help.

    Hi Maria,
    I am not 100% sure but I suggest you to ask your basis team to change the devise type to SWIN and check the output.
    Check the below URL. For font or print or language related issues / Problems this will work perfectly. Try changing the devise type of your printer to SWIN. If issue is fixed by making this change please keep us informed
    http://help.sap.com/saphelp_nwmobile711/helpdata/en/d9/4a910f51ea11d189570000e829fbbd/content.htm
    Just test thin in your test systems preferably a quality system where you can replicate this problem

  • DataGrid Sorting Issue with Hotfix2

    I already opened a ticket with Adobe on this, but since this
    is a critical issue for us I wanted to post a message to see if
    anyone has any idea where the issue in flex sdk lies.
    Check tab 2 of the sample app, Sorting a datagrid who's
    column only has partial data causes an error, works fine on Hotfix
    1 (same test)
    Sample App:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="creationComplete()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.utils.ObjectProxy;
    [Bindable]
    public var dgData:ArrayCollection = new ArrayCollection();
    public function creationComplete():void
    var object:ObjectProxy;
    object = new ObjectProxy();
    object["filled"] = "Filled A";
    object["partial"] = "Partial A";
    dgData.addItem(object);
    object = new ObjectProxy();
    object["filled"] = "Filled B";
    object["partial"] = "Partial B";
    dgData.addItem(object);
    object = new ObjectProxy();
    object["filled"] = "Filled C";
    dgData.addItem(object);
    object = new ObjectProxy();
    object["filled"] = "Filled D";
    dgData.addItem(object);
    ]]>
    </mx:Script>
    <mx:XMLList id="treeData">
    <node label="Mail Box">
    <node label="Inbox">
    <node label="Marketing"/>
    <node label="Product Management">
    <node label="Large node Large Node Large Node Large
    Node"/>
    </node>
    <node label="Personal"/>
    </node>
    <node label="Outbox">
    <node label="Professional"/>
    <node label="Personal"/>
    </node>
    <node label="Spam"/>
    <node label="Sent"/>
    <node label="Spam2"/>
    <node label="Sent2"/>
    <node label="Spam3"/>
    <node label="Sent3"/>
    <node label="Spam4"/>
    <node label="Sent4"/>
    <node label="Spam5"/>
    <node label="Sent5"/>
    <node label="Spam6"/>
    <node label="Sent6"/>
    </node>
    </mx:XMLList>
    <mx:TabNavigator height="100%" width="1005">
    <mx:Canvas label="Tree Issue">
    <mx:Text x="284" y="51" fontSize="16" fontWeight="bold"
    text="Issue: Expand the tree node to open up Product Management
    node, no Horizontal Scroll bar appears." width="390"/>
    <mx:Canvas verticalScrollPolicy="auto"
    horizontalScrollPolicy="auto">
    <mx:Tree x="50" y="50" width="226" height="303"
    dataProvider="{treeData}" labelField="@label"
    verticalScrollPolicy="auto" horizontalScrollPolicy="auto"/>
    </mx:Canvas>
    </mx:Canvas>
    <mx:Canvas label="DataGrid Issue">
    <mx:DataGrid id="dgTest" dataProvider="{dgData}"
    width="500" height="300" x="10" y="10">
    <mx:columns>
    <mx:DataGridColumn headerText="Filled Row"
    dataField="filled"/>
    <mx:DataGridColumn headerText="Partially Filled Row"
    dataField="partial"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Text x="10" y="318" fontSize="16" fontWeight="bold"
    text="Issue: Toggle the sort in the column that has only partial
    data. You will get a find criteria error. This worked in Hotfix 2
    and was broke in Hotfix 2." width="390"/>
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>

    Hi,
    With new hotfixes some bugs ( most of bugs) in Flex SDK are
    get fixed, but rarely new (sometimes critical) bugs can appear.
    Before Flex 3 release which will allow on IDE level to switch
    between different versions of Flex SDK on the fly, I would advice
    you to store locallly copy of all versions of Flex 2 SDK released
    to the public. Then, in case if you will encounter a serious bug in
    the most recent release of Flex 2 SDK, you can fix it by yourlself
    by reusing the old code from former release of Flex 2 SDK.
    See what I did with found bug in Flex 2.0.1 release, which is
    what not present in Flex 2.0 SDK release:
    jabbypanda.com/blog/?p=25

  • Spry European Date Sorting issue

    I've checked this with all versions of Spry, now with version
    1.6 it still remains a issue, if you try to sort a column with
    european format dates it's fail todo it properly. I've set the
    datatype with ds1.setColumnType("fecha","date"); and does not work
    still, the dates are in the format "dd/mm/yyyy".
    Thanks in advance

    "freequest" <[email protected]> wrote in
    message
    news:fef62f$r2q$[email protected]..
    > Thanks for the reply Gunter, I've try this before and
    the problem is not
    > the
    > format of separators, the problem is with the order ,the
    format it
    > understand
    > is mmddyyyy,, so when you send any ddmmyyyy with
    datatype character or
    > number
    > it doesn't sort properly because spry misunderstood the
    date thinking the
    > first
    > two digits are a month, this is why if you try with a
    range of rows with
    > differents months it fail miserably. Spry at this moment
    doesn't have
    > international dates support.
    The root of the issue is that using JavaScript to a string
    into a date
    easily lead to inconsistent, unexpected results.
    The way I solved this in the past is to have two columns
    inside my Spry
    datasets. One stores the date in yyyy-mm-dd format (ISO 8901,
    the format
    typically used by databases), another one stores a nicely
    formatted date
    (whatever format the language dictated).
    Then I always display the nicely formatted column, but I sort
    it only the
    yyyy-mm-dd one.
    As a bonus, yyyy-mm-dd sorts okay just as a string, so I have
    no need to
    assign a different datatype to it.
    Hope it may help.
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion and Dreamweaver developers:
    http://www.massimocorner.com

  • Interesting sort issue: URL changes but does not refresh

    Thanks everyone for you help on my sort problem! There is still one tiny issue remaining.
    When I hit the SORT button, nothing happens except the URL changes from http://localhost/jserv/Invoice3.jsp to http://localhost/jserv/Invoice3.jsp?valueCheckbox=3&valueCheckbox=4&order=ID&sort=DESC
    The ID's of the records and the sort order are being added to the URL, but the sort is not being performed.
    -Michael
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varCheckbox = "1";
    if (request.getParameter ("valueCheckbox") !=null) {rsBeachwear__varCheckbox = (String)request.getParameter ("valueCheckbox")   ;}
    %>
    <%
    //SORT VARIABLES:
    String rsBeachwear__name = "ID";//default sort value
    if (request.getParameter ("order") !=null) {rsBeachwear__name = (String)request.getParameter ("order");}
    String rsBeachwear__sort = "ASC";//default sort value
    if (request.getParameter ("sort") !=null) {rsBeachwear__sort = (String)request.getParameter ("sort");}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    String chkValues[]=request.getParameterValues("valueCheckbox");
    StringBuffer prepStr=new StringBuffer("SELECT ID, Item, Color, Size FROM Beachwear WHERE ID=");
    for(int x = 0; x < chkValues.length; ++x) {
    prepStr.append(chkValues[x]);
    if((x+1)<chkValues.length){
    prepStr.append(" OR ID=");
    }//end if
    }//end for loop
    prepStr.append(" ORDER BY '%" + rsBeachwear__name + "%' '%" + rsBeachwear__sort + "%'"); //NEW SQL SORT CODE:
    PreparedStatement StatementrsBeachwear=ConnrsBeachwear.prepareStatement(prepStr.toString());
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    Object rsBeachwear_data;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> </p>
    <p><br>
    INVOICE<br>
    </p>
    <%//FORM "GET" METHOD<%>
    <form name="form1" method="get" action="Invoice3.jsp">
    <p><br>
    </p>
    <%while(rsBeachwear.next()){   //LOOP; RELEVANT, NOT POINTLESS %>
    <table width="75%" border="1">
    <tr>
    <td width="13%">ID:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">ITEM:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">COLOR:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">SIZE:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%"> </td>
    <td width="87%">
    <input type="checkbox" name="valueCheckbox" value="<%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%>" checked> //NEW CHECKBOX ADDED WITH SAME CODE AS PREVIOUS (SEARCH) PAGE
    </td>
    </tr>
    </table>
    <%
    %>
    <p>  </p>
    <br>
    <table width="54%" border="1">
    <tr>
    <td width="29%">
    <div align="center">Parameter </div>
    </td>
    <td width="28%">
    <div align="center">1</div>
    </td>
    <td width="43%">
    <div align="center">2</div>
    </td>
    </tr>
    <%//TWO NEW PULL-DOWN MENUS FOR "ORDER BY" SQL SORT%>
    <tr>
    <td width="29%">
    <div align="center">
    <input type="submit" value="Sort Now">
    </div>
    </td>
    <td width="28%">
    <div align="center">
    <select name="order" size="1">
    <option value="ID" selected>ID</option>
    <option value="Item">Item</option>
    <option value="Color">Color</option>
    <option value="Size">Size</option>
    </select>
    </div>
    </td>
    <td width="43%">
    <div align="center">
    <select name="sort" size="1">
    <option value="ASC" selected>Ascending</option>
    <option value="DESC">Descending</option>
    </select>
    </div>
    </td>
    </tr>
    </table>
    </form>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>

    The sort problem is solved: Mission accomplished!
    The single quotes and percentage marks in the SQL logic were causing the problem! The sort works great now. Now I just need to program memory into the list boxes so they remember their last setting, but I know how I will do that.
    Thanks again for all your help!

Maybe you are looking for

  • Java.lang.NullPointerException in MQ adapter in Production Environment

    Hi, My Process like Send the request to ResultsAAA or ResultsBBB (MQ queue) and Dequeue the msg req from the queue(ResultsAAA OR ResultsBBB) basing on the request request goes to either ResultsAAA or ResultsBBB and executing the bpel and we are confi

  • How do i move a movie from my PC to my ipad?

    how do I move a movie from my PC to my ipad?

  • What is the directory structure of EJB applications?

    I am new to EJB program. I know that after the development is done, we package the EJB components into .jar file, and package the Web components (HTML/JSP/Servlets/JavaBeans) into .war file, and then together we package .jar file and .war file into a

  • Problem with the FIDCMT01 idoc

    Hi I have posted the FIDCMT01 Idoc. it failed with the following error Posting with message category FIDCMT/FIROLL is not possible Can some one help me why this error is coming up Thanks Nikhil

  • Iphone 4s speedtest results not the same as imac's

    i ran a speedtest on both products (same wifi network of course) and the download speed of my iphone is way too low compared to my imac's. just .5 mbps vs 3mbps on the imac. i already did the network reset on my iphone but still the same results. do