Sorting Order for SAP Tables in DB2 database

Dear Experts -
ISSUE: When an ABAP program selects data from the DB into an internal
table, it is changing the way the data is sorted. In other words, the
internal table data is in a different sort order than what is in the
DB. It is not working this way in all other non-production systems
(DEV, QAS, SAX, etc).
Temporary solution for the programs that have been identified as
impacted: Use the ABAP Command 'sort' on the internal table.
Permanent solution needed : Since it is impossible to identify all
of the programs that will be impacted, we need PRD to work like DEV,
QAS, SAX, etc. when selecting data into internal tables. The data
should be in the same order as it is in the DB (sorted by the key).
ADDITIONAL INFO: DB2 storage disks crashed a day before. H/W team recovered everything. We are facing this only after the recovery.
Thanks,
Dinesh

can you please check in your code if the sql that is being sent has an order by clause .
Please let us know the SQL statements that is basically used to fill up the internal table.
When data is fetched from the database, it is not sorted always. Probably you had a clustered index on the tables and the clustering is not there now.
Edited by: Ratnajit Dey on Dec 16, 2011 1:56 PM

Similar Messages

  • Default column sort order for 11g table

    Could anyone give me some indication on how I would go about setting the default sort order for a table?
    I have a table with a few columns, and dataset returns in a particular order, but my table decides to sort if in any given order until I manually click on the column header and sort it.
    I would like to have it done by default on a particular field.
    Any info is appreciated.
    Thanks
    Jonny

    As Chris says, the easiest way and best re-use way is to use the order-by clause in your underlying model layer SQL query. For instance in ADF BC this would be in a View Object's query.
    However as you haven't dictated your model layer technology, there is another way in JDev 11g. In your web page that contains the ADF Faces RC table, select the binding tab at the bottom of the page, then double click on the iterator in the binding page, and in the Edit Iterator Binding dialog, select the Sort Criteria tab. This allows you to override the sort order on the iterator's columns.
    CM.

  • Providing sorting filters for a table in webdynpro java application

    ho to provide sorting  , filters , for a table in webdynpro java application .

    Hi Pradeep,
    Please go through the following article on implementation of filtering and sorting:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f024364b-3086-2b10-b2be-c0ed7d33fe65
    The article contains a link to a sample application using the TableSorter and TableFilter Class.
    The same classes can be used by any other web dynpro application. Download the sample application and copy the classes. In case of a specific requirement, modify the TableSorter and TableFilter classes.
    Regards,
    Kartikaye

  • Default Sort Order for Library View

    It would be fantastic if there were a user defined preference for a default sort order in Library view. For example, some users may prefer to always view the images by File Name, or Rating, etc, without having to change the sort order for each individual folder they view via Lightroom.
    Thanks!

    Thanks for your suggestion Allan, but it doesn't work.
    I'm specifically referring to the defaults that Aperture 3 adopts when you use the "File, Import, Folders as Projects with the projects and albums setting.
    What I'm finding is regardless of the setting in the Library preferences, the default sort order for the project is Date and Manual for the album.
    Yet if I create a project manually the default sort order is as per the Library prefs. Strange.

  • Looking for a way to change sort order for albums

    I know how to set the sort order for each individual song (Sort tab on song info), but is there a way to set sort order for multiple tracks?

    Please help!

  • How to change sort order for Notes in iOS?

    When using Notes in OS 10.10, I can change the sort order. However, I cannot see how to change the sort order for Notes in iOS8 on my iPhone. I sync using iCloud, but the iPhone does not pick up the sort order (alpha) that I have chosen on my MBP.
    Is it possible to change the sort order on phones?
    Thanks.

    View > Sort By > Title

  • How do I change the Sort order for Music Video's on the iPad

    Hi All,
    Apologies if this has been dealt with elsewhere - I can find posts about sort order for TV Shows and Movies but not Music Video's.
    When I sync my music video's the appear in Track order in the video app and I cannot find how to change the sort order to 'by Artist' (or any other order come to that).
    Any ideas please>

    Hi!
    Im afraid I believe this cannot be done yet. Sorry!
    You can try submitting feedback to apple by clicking [here|http://www.apple.com/feedback/ipad.html] if you wish.
    Hope this helps!

  • Sort order for Simplified Chinese (pinyin)

    FrameMaker 10 (Windows)
    It seems that if I specify the sort order for Simplified Chinese (pinyin) on the reference page,
    index entries that start with "i" and "v" are not shown under their corresponding group titles.
    (I assume that this may be due to the fact that pinyin words never start with these letters.)
    If I have an entry that starts with an English word like "IP," it appears under the "J" group.
    I want the entry to appear under the "I" group. How can I do this?
    I have the IX reference page set up as follows:
    GroupTitlesIX paragraph
    Symbols[\];Numerics[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;
    SortOrderIX paragraph
    <$symbols><$numerics><$alphabetics><$pinyin>
    I've also tried:
    SortOrderIX paragraph
    <$symbols><$numerics><$pinyin>
    Thanks in advance.
    Tak Osato

    I sort of found a workaround, but it may lead to other problems, so use it at your own risk.
    It also requires a bit of work.
    The idea is to use the sort order for Japanese by specifying the following in the IX reference page.
    Symbols[\ ];数字[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;あ;い;う;え;お;か;き;く;け;こ;さ;し;す;せ;そ ;た;ち;つ;て;と;な;に;ぬ;ね;の;は;ひ;ふ;へ;ほ;ま;み;む;め;も;や;ゆ;よ;ら;り;る;れ;ろ;わ;ん;[ ]
    <$symbols><$numerics><$alphabetics><$kana>
    Then, you need to capitalize the first letter in the bracket used for sorting for every index entry.
    Example:
    Instead of
    画面[hua4mian4]
    specify
    画面[Hua4mian4]
    Now, I'm wondering if there is a way to do a search and replace on all index entries to capitalize the first letter...

  • Sort Order for Legend and X Axis

    Does anyone know of a way to keep a specific sort order for both the X Axis and the Legend. Both start with numbers and I can get one or the other to sort correcly on the chart but not both. Biggest problem is not all of the legend items are in the first X Axis item so the colors change on the bar graph depending on the legend items in the first X Axis item.

    If you tie bar colors with values, how you will differentiate the bars for different legends.
    Take an example, there are three columns Employee, Location and salery have following values
    Employee Location Salery
    A London 30000
    B Chicago 40000
    C London 50000
    D Chicago 60000
    if we keep Location as Legend and Employee in X Axis, and sort Legend first then Employee. Set Blue for Chicago and Red for London, First two blue bars for A and C will be displayed and then two red bars for B and D will be displayed. Order in X axis will be A,C,B and D. This is not in sequence but this is the way it will and it should work. If you sort by Employee instead if Location, you will get sequence in X axis, but the same colored bars wont be together.
    Thanks
    Swami

  • Sort Order for SAPDBPNPCE

    Hello all,
    using the Program SAPDBPNP to select the logical database PNP you have a button called sort order. With the new logical database PNPCE you do not!
    Anyone knows how to sort tze result using the SAPDBPNPCE?
    regards,
    Markus

    Hi Markus,
    No, the Sort Order has not been removed in  PNPCE.. which report are you using? If it is tied to the Report Category PNPCE, the Sort Order icon is displayed 4th from the left on the tool bar.. You can alos use the CTRL + F1 keys option.
    Regards,
    Suresh Datti

  • How do I run sp_spaceused for all tables in a database?

    Hi,
    I am struggling to understand how to run the sp_spaceused sproc for all tables in a database.
    I know how to use it for one table but how would I replicate it automatically for each table in a given database?
    Regards,
    Ian.

    I just managed to alter the code of VidyaSagar and have pulled out all the information including Schema name. Below is what it looks like:
    set
    nocount
    on
    select
    'Database Name: ',
    db_name
    if
    exists(select
    name from tempdb..sysobjects
    where name='##tmp'
    drop
    table ##tmp
    create
    table ##tmp(TABLE_SCHEMA
    nvarchar(256),TABLE_NAME
    nvarchar(256),
    num_rows int,
    reserved_KB varchar(15),data_KB
    varchar(15),index_KB
    varchar(15),unsed_KB
    varchar(15
    go
    declare
    @tbl_schema nvarchar(256
    declare
    @tbl_name nvarchar(256
    declare
    @schema_tbl_name nvarchar(256
    declare
    tblname CURSOR
    for
    select
    TABLE_SCHEMA
    TABLE_NAME
    from
    INFORMATION_SCHEMA.TABLES
    where TABLE_TYPE='BASE
    TABLE' 
    open
    tblname
    Fetch
    next
    from tblname
    INTO @tbl_schema,@tbl_name
    WHILE
    @@FETCH_STATUS
    = 0
    BEGIN
    set @schema_tbl_name=@tbl_schema+'.'+@tbl_name
    insert
    into ##tmp(TABLE_NAME
    , num_rows
    , reserved_KB
    ,data_KB
    ,index_KB
    ,unsed_KB
    exec
    sp_spaceused
    @schema_tbl_name
    update ##tmp
    set TABLE_SCHEMA
    =@tbl_schema
    where TABLE_SCHEMA
    is
    NULL
    and TABLE_NAME=@tbl_name
    FETCH
    NEXT
    FROM tblname
    INTO @tbl_schema,@tbl_name 
    END
    CLOSE
    tblname
    deallocate
    tblname
    go
    select
    from
    ##tmp
    drop
    table ##tmp
    Warm Regards, Ajay

  • Control of sort order for asian language navigation

    I am a help writer who is working with both development and a localization vendor to create localized javahelp. I am the most knowledgeable about javahelp, which is not saying much. It has come to me to figure out how to establish the correct sort order for Simplified Chinese and Japanese language Index and Glossary navigators, Could someone explain to me how this is done outside of tools like RoboHelp (which has caused us major headaches yet seems to be the only way the vendor knows how to do JavaHelp). In layman's terms, please.
    thanks,
    ellen

    Same issue here, and the bug syncs to my iPhone, so when I want to quickly text or e-mail someone, their phone numbers and e-mail addresses appear in the wrong order, Work or Home before iPhone or Mobile. How can we get this big fixed in the next Snow Leopard update?

  • Changing Search sort order for Simplified Chinese

    We're generating a Simplified Chinese WebHelp system using Robohelp 10 and we need to change the sort order in the Search results so that it follows the pinyin order instead of "Y, Z, M, T" (Referring to 仪,准,美,通). Is there a way to do this?

    I sort of found a workaround, but it may lead to other problems, so use it at your own risk.
    It also requires a bit of work.
    The idea is to use the sort order for Japanese by specifying the following in the IX reference page.
    Symbols[\ ];数字[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;あ;い;う;え;お;か;き;く;け;こ;さ;し;す;せ;そ ;た;ち;つ;て;と;な;に;ぬ;ね;の;は;ひ;ふ;へ;ほ;ま;み;む;め;も;や;ゆ;よ;ら;り;る;れ;ろ;わ;ん;[ ]
    <$symbols><$numerics><$alphabetics><$kana>
    Then, you need to capitalize the first letter in the bracket used for sorting for every index entry.
    Example:
    Instead of
    画面[hua4mian4]
    specify
    画面[Hua4mian4]
    Now, I'm wondering if there is a way to do a search and replace on all index entries to capitalize the first letter...

  • TA26589 iphone 4s sort order for number in contacts

    iphone 4s How to sort order for numbers in contacts ?
    Like
    First - mobile
    Second - office
    Third - work
    Four - home
    It differs as you enter while as you enter / update.
    Can any one guide me.
    Thanks.

    All you do is hold down on any of the icons for a few seconds and they will start wiggling. You can then move them to your hearts content, either on the same page or to different pages. Just press the HOME button to return to normal mode.
    Glor

  • Unable to retrieve nametab info for logic table BSEG during Database Export

    Hi,
    Our aim is to Migrate to New hardware and do the Database Export of the existing System(Unicode) and Import the same in the new Hardware
    I am doing Database Export on SAP 4.7 SR1,HP-UX ,Oracle 9i(Unicode System) and during Database Export "Post Load Processing phase" got the error as mentioned in SAPCLUST.log
    more SAPCLUST.log
    /sapmnt/BIA/exe/R3load: START OF LOG: 20090216174944
    /sapmnt/BIA/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#20
    $ SAP
    /sapmnt/BIA/exe/R3load: version R6.40/V1.4 [UNICODE]
    Compiled Aug 13 2007 16:20:31
    /sapmnt/BIA/exe/R3load -ctf E /nas/biaexp2/DATA/SAPCLUST.STR /nas/biaexp2/DB/DDLORA.T
    PL /SAPinst_DIR/SAPCLUST.TSK ORA -l /SAPinst_DIR/SAPCLUST.log
    /sapmnt/BIA/exe/R3load: job completed
    /sapmnt/BIA/exe/R3load: END OF LOG: 20090216174944
    /sapmnt/BIA/exe/R3load: START OF LOG: 20090216182102
    /sapmnt/BIA/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#20
    $ SAP
    /sapmnt/BIA/exe/R3load: version R6.40/V1.4 [UNICODE]
    Compiled Aug 13 2007 16:20:31
    /sapmnt/BIA/exe/R3load -datacodepage 1100 -e /SAPinst_DIR/SAPCLUST.cmd -l /SAPinst_DI
    R/SAPCLUST.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): UTF8
    (GSI) INFO: dbname   = "BIA20071101021156                                                                               
    (GSI) INFO: vname    = "ORACLE                          "
    (GSI) INFO: hostname = "tinsp041                                                    
    (GSI) INFO: sysname  = "HP-UX"
    (GSI) INFO: nodename = "tinsp041"
    (GSI) INFO: release  = "B.11.11"
    (GSI) INFO: version  = "U"
    (GSI) INFO: machine  = "9000/800"
    (GSI) INFO: instno   = "0020293063"
    (EXP) TABLE: "AABLG"
    (EXP) TABLE: "CDCLS"
    (EXP) TABLE: "CLU4"
    (EXP) TABLE: "CLUTAB"
    (EXP) TABLE: "CVEP1"
    (EXP) TABLE: "CVEP2"
    (EXP) TABLE: "CVER1"
    (EXP) TABLE: "CVER2"
    (EXP) TABLE: "CVER3"
    (EXP) TABLE: "CVER4"
    (EXP) TABLE: "CVER5"
    (EXP) TABLE: "DOKCL"
    (EXP) TABLE: "DSYO1"
    (EXP) TABLE: "DSYO2"
    (EXP) TABLE: "DSYO3"
    (EXP) TABLE: "EDI30C"
    (EXP) TABLE: "EDI40"
    (EXP) TABLE: "EDIDOC"
    (EXP) TABLE: "EPIDXB"
    (EXP) TABLE: "EPIDXC"
    (EXP) TABLE: "GLS2CLUS"
    (EXP) TABLE: "IMPREDOC"
    (EXP) TABLE: "KOCLU"
    (EXP) TABLE: "PCDCLS"
    (EXP) TABLE: "REGUC"
    myCluster (55.16.Exp): 1557: inconsistent field count detected.
    myCluster (55.16.Exp): 1558: nametab says field count (TDESCR) is 305.
    myCluster (55.16.Exp): 1561: alternate nametab says field count (TDESCR) is 304.
    myCluster (55.16.Exp): 1250: unable to retrieve nametab info for logic table BSEG   
    myCluster (55.16.Exp): 8033: unable to retrieve nametab info for logic table BSEG   
    myCluster (55.16.Exp): 2624: failed to convert cluster data of cluster item.
    myCluster: RFBLG      *003**IN07**0001100000**2007*
    myCluster (55.16.Exp): 318: error during conversion of cluster item.
    myCluster (55.16.Exp): 319: affected physical table is RFBLG.
    (CNV) ERROR: data conversion failed.  rc = 2
    (RSCP) WARN: env I18N_NAMETAB_TIMESTAMPS = IGNORE
    (DB) INFO: disconnected from DB
    /sapmnt/BIA/exe/R3load: job finished with 1 error(s)
    /sapmnt/BIA/exe/R3load: END OF LOG: 20090216182145
    /sapmnt/BIA/exe/R3load: START OF LOG: 20090217115935
    /sapmnt/BIA/exe/R3load: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#20
    $ SAP
    /sapmnt/BIA/exe/R3load: version R6.40/V1.4 [UNICODE]
    Compiled Aug 13 2007 16:20:31
    /sapmnt/BIA/exe/R3load -datacodepage 1100 -e /SAPinst_DIR/SAPCLUST.cmd -l /SAPinst_DI
    R/SAPCLUST.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): UTF8
    (GSI) INFO: dbname   = "BIA20071101021156                                                                               
    (GSI) INFO: vname    = "ORACLE                          "
    (GSI) INFO: hostname = "tinsp041                                                    
    (GSI) INFO: sysname  = "HP-UX"
    (GSI) INFO: nodename = "tinsp041"
    (GSI) INFO: release  = "B.11.11"
    (GSI) INFO: version  = "U"
    (GSI) INFO: machine  = "9000/800"
    (GSI) INFO: instno   = "0020293063"
    myCluster (55.16.Exp): 1557: inconsistent field count detected.
    myCluster (55.16.Exp): 1558: nametab says field count (TDESCR) is 305.
    myCluster (55.16.Exp): 1561: alternate nametab says field count (TDESCR) is 304.
    myCluster (55.16.Exp): 1250: unable to retrieve nametab info for logic table BSEG   
    myCluster (55.16.Exp): 8033: unable to retrieve nametab info for logic table BSEG   
    myCluster (55.16.Exp): 2624: failed to convert cluster data of cluster item.
    myCluster: RFBLG      *003**IN07**0001100000**2007*
    myCluster (55.16.Exp): 318: error during conversion of cluster item.
    myCluster (55.16.Exp): 319: affected physical table is RFBLG.
    (CNV) ERROR: data conversion failed.  rc = 2
    (RSCP) WARN: env I18N_NAMETAB_TIMESTAMPS = IGNORE
    (DB) INFO: disconnected from DB
    SAPCLUST.l/sapmnt/BIA/exe/R3load: job finished with 1 error(s)
    /sapmnt/BIA/exe/R3load: END OF LOG: 20090217115937
    og (97%)
    The main eror is "unable to retrieve nametab info for logic table BSEG "  
    Your reply to this issue is highly appreciated
    Thanks
    Sunil

    Hello,
    acording to this output:
    /sapmnt/BIA/exe/R3load -datacodepage 1100 -e /SAPinst_DIR/SAPCLUST.cmd -l /SAPinst_DI
    R/SAPCLUST.log -stop_on_error
    you are doing the export with a non-unicode SAP codepage. The codepage has to be 4102/4103 (see note #552464 for details). There is a screen in the sapinst dialogues that allows the change of the codepage. 1100 is the default in some sapinst versions.
    Best Regards,
    Michael

Maybe you are looking for

  • 11i to R12 Upgrade- Doubt in XLA tables

    Hi All,      I am migrating the 11i AP reports to R12..      In the below query I have commented the obselete and changed 11i columns & tables , but I wasnt able to find the alternate column in WHERE clause for 2 columns in xla_ae_lines and 1 in xla_

  • Prevent large numbers from becoming scientific notation on CSV import

    Hi, I'm importing contacts in a .CSV file into iWork Numbers and it takes a 12-digit phone number from a guy in the UK and turns it into scientific notation. So something like 447729803988 becomes 4.4772E+11 which obviously loses some important digit

  • Progress bar ref mismatch

    Hi all, On the attachment, the BD on left called the BD on right.  Notice that I have a broken wire on left, and I don't understand why.  It says that there is a conflict in class.  Do any of you know why?  The intension of the left BD is to get the

  • FileChooser problem

    Hello, I have a problem with filechooser filter. I read the documentation and I can set the filter. But I have 2 problems with it. 1. Directorys are not visible. 2. User can select the "All files" option too. But I don't want to allow it. What can I

  • "Instructor-led class" compulsary for OCP(O9i)

    I am really interested in taking to become an OCP.(Oracle 9i) But I am a little upset that it is compulsary to take an "Instructor-led class" in order to get the OCP. However, if we start off with the OCP track before Sept 1st we don't have to take t