Sorting Order - Urgent Help.....

Hi all,
I am doing migration from SQL Server 2K to Oracle 9.2.0.5.0.
I need to compare data from Oracle and SQL Server.
What is the default sorting behavior for Oracle? I mean I have a select statement like -
     Select <column> from <table>
This table doesn’t have a primary key. It doesn’t have an index also. It has two columns – col1 is NUMBER and col2 is VARCHAR2 (50). When I retrieve data from Oracle it is sorting according to ROWID. As per my understanding ROWID is in the same order in which data was loaded in the table. In one case, I have found that ROWID is different from the data load order. My requirement is to order both Oracle data and SQL Server data so that I can compare them row by row. In absence of a key and an index what is the parameter based on which oracle sorts the data for a table?
I have NLS_SORT=BINARY and NLS_LANG=BINARY.
The result of a query 'select * from table1':
col1 col2
3 Unknown
3 CAN-seeking
3 Preclinical
3 Phase I
3 Phase II A
3 Phase II B
3 Phase III
3 Registration
3 Phase IV
4 Discovery
4 Unknown
4 CAN-seeking
4 Preclinical
4 Phase I
4 Phase II A
4 Phase II B
4 Phase III
4 Registration
1 Phase IV
4 Phase IV
5 Discovery
The result of 'Select * from table1 order by col1':
col1 col2
3 Unknown
3 CAN-seeking
3 Preclinical
3 Phase I
3 Phase II A
3 Phase II B
3 Phase III
3 Registration
3 Phase IV
4 Discovery
4 Unknown
4 CAN-seeking
4 Preclinical
4 Phase I
4 Phase II A
4 Phase IV
4 Phase II B
4 Phase III
4 Registration
5 Discovery
Can anybody help me on this....
Thanks in advance.....

Doesn't Oracle sort by ROWID by default? What is the order in which it fetches the results from the result set? I am really lost at this..... I have used this logic:
Sort by primary key, if it exists
Sort by first NUMBER column in absence of primary key.
However, the order from SQL Server and Oracle when sorted on col1 as in my explanation is different.
SQL Server uses SQL_Latin1_General_CP1_CI_AS. The SQL Server result for -
'select * from table1 order by col2' is:
col1 col2
3     Unknown
3     CAN-seeking
3     Preclinical
3     Phase I
3     Phase II A
3     Phase II B
3     Phase III
3     Registration
3     Phase IV
4     Discovery
4     Unknown
4     CAN-seeking
4     Preclinical
4     Phase I
4     Phase II A
4     Phase II B
4     Phase III
4     Registration
4     Phase IV
5     Discovery
Thanks

Similar Messages

  • SQL Query Sorting Order issue - Help needed

    Hi All,
    I am using the following query in my project to display the records in the grid.
    /* Formatted on 04-09-2013 PM 8:01:51 (QP5 v5.149.1003.31008) */
      SELECT eol,
             status_msg,
             relation,
             building_name,
             device_id id,
             CEIL (SYSDATE - updated_date) duration,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_id_ref,
             LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_names,
             spname || '-' || ip_address || '-' || port AS child_asset_group
        FROM DEVICE_TESTBED_VW
       WHERE lab_id IN
                ('7099849',
                 '10769617',
                 '4258712',
                 '10513562',
                 '10515074',
                 '5882676',
                 '8330925')
    GROUP BY eol,
             status_msg,
             relation,
             device_id,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             building_name
    ORDER BY building_name ASC,
             LOWER (child_asset_group) ASC,
             LOWER (relation) DESC
    The problem is , if any one sorting with any column  , the order is not correct
    In this below code , i have done sorting by port . But the result data order is not correct .
    /* Formatted on 04-09-2013 PM 8:07:02 (QP5 v5.149.1003.31008) */
      SELECT eol,
             status_msg,
             relation,
             building_name,
             device_id id,
             CEIL (SYSDATE - updated_date) duration,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_id_ref,
             LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_names,
             spname || '-' || ip_address || '-' || port AS child_asset_group
        FROM DEVICE_TESTBED_VW
       WHERE lab_id IN
                ('7099849',
                 '10769617',
                 '4258712',
                 '10513562',
                 '10515074',
                 '5882676',
                 '8330925')
    GROUP BY eol,
             status_msg,
             relation,
             device_id,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             building_name
    ORDER BY PORT ASC
    Can some one help me to fix this issue?

    Hi,
    Sorry, it's not clear what you want.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. For example, if you really need to GROUP BY 28 columns, post a problem where you need to GROUP BY only 2 or 3 columns.  (Just explain that you really have 28, so people will give solutions that are sure to work for all 28).)
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Error while running Process Order API to import orders - URGENT HELP NEEDED

    Hi all,
    I'm stuck with order import using OE_ORDER_PUB.PROCESS_ORDER api. Wanted to import a simple order in Vision database using the process order api. Figured out the right data to use, inserted into Headers and Lines Iface All tables. When calling the OE_ORDER_PUB.PROCESS_ORDER api, it is throwing this error:
    "Header ID does not exist on this record or does not match ID specified on header record. You require a valid header ID if the operation is Create."
    But when I validate the same record using the CORRECTIONS form in Order Import GUI, the order is successfully validated. Also the order is imported when I click the IMPORT button.
    I understand that HEADER_ID column is not required for creating a new order, but not sure why it is erroring. Here is the data I'm using:
    Insert into oe_headers_iface_all
    (org_id, order_type_id, order_source_id, orig_sys_document_ref, ordered_date, request_date,
    sold_from_org_id, sold_to_org_id, ship_from_org_id, ship_to_org_id, invoice_to_org_id,
    CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN,OPERATION_CODE)
    values (204, 1430, 1046, '101040', sysdate, sysdate, 204, 1004, 606, 1018, 1017, 0, sysdate, 0, sysdate, 0, 'CREATE');
    Insert into oe_lines_iface_all
    ("ORDER_SOURCE_ID","ORIG_SYS_DOCUMENT_REF","ORIG_SYS_LINE_REF","ORIG_SYS_SHIPMENT_REF","ORG_ID","INVENTORY_ITEM","LINE_TYPE_ID",request_date,"SCHEDULE_DATE","DELIVERY_LEAD_TIME","ORDERED_QUANTITY","ORDER_QUANTITY_UOM",sold_from_org_id, sold_to_org_id, ship_from_org_id, ship_to_org_id, invoice_to_org_id,"UNIT_SELLING_PRICE","CREATED_BY","CREATION_DATE","LAST_UPDATED_BY","LAST_UPDATE_DATE","LAST_UPDATE_LOGIN","OPERATION_CODE")
    values
    (1046,'101040', '1', '1', 204, 'AS72111', 1427, sysdate, sysdate+1, 0, 10, 'Ea' ,204, 1004, 606, 1018, 1017,100,0,sysdate,0,sysdate,0,'CREATE');
    Any help is appreciated.
    FYI - this is a 11.5.10.2 version installed on Windows 2003 server.
    Thanks in advance.
    Jags

    I might be late in replying, but hope it might help.
    From your query it seems you are inserting records into interface tables and then calling process order API( probably from some PL/SQL block).
    This is where I am confused, because I hope you understand, that interface tables are for use with Order Import concurrent Program, and for Process ORder API, you need to provide the data as parameter. The api has, header record type and line table type as parameters. So you need to assign correct data to these variables and pass them as parameter when you are calling Process Order API.
    If you are doing the same thing, then post the exact pl/SQL code and error message from the API. That might help diagnose the issue.
    Regards,
    Nitin Darji

  • Wrong Exg. rate type picking in Foreign Purchase order - URGENT HELP

    Hi Friends,
    We have an issue with Exchange rate type.
    We want to post the exg. taye type SPOT for our doc. types WL, WA, WE in goods movement.
    We have configured the SPOT rate in OBA7 for the above doc. types. In OB08, we have given the exchange rates for our foreign currency.
    Still, the PO and MIGO, MIRO are picking up the default exchange rate "M" and posting the documents.
    We have even written a substitution rule but unfortunately that is not working here.
    Please help me
    Thanks,
    Konni

    Hi Rohit,
    Thanks for your response.
    When i am creating a STO order from (Foreign currency) from ME21N, the exchange rate fields are not appearing in Header data - Deliver / Invoice.
    Please suggest
    Thanks

  • Need help saving Bridge file sort order

    Is there a way to save the sort order in Bridge CS4? The default in mine is "By Date Created", and I would prefer it defaulted to "By Filename". I change it to sort according to filename, but it just reverts back to date created next time I open the window. I'm sure this is a really obvious setting that I am missing, but cannot find it. Any help would be appreciated.

    You can save the sort order as part of a workspace, Use the triangle at top
    of the Bridge window (left to the search option) and in here choose new
    workspace.
    Obvious you first have to set everything you like to appear as you want it
    in this new workspace, including the sort order...
    For better overview you can drag the vertical line next to the workspace
    names to the left to extend them to the left.
    I'm sure this is a really obvious setting that I
    am missing, but cannot find it.

  • Sort order help for date string in crosstab

    Hello All,
    I need to calculate the number of calls for service for the last 13 months. Display the number in the report footer by month and year in a grid similar to a crosstab and in ascending date sort order. 
    Example: 
    May 2008    1,400
    Jun 2008     1,287
    Jul 2008      1,290
    all months through last full month 
    May 2009    1,385
    I can calculate the number of calls per month and display the month and year by converting the month and year to text.  However, I cannot seem to find a way to sort the month and year without some kind of on-going manual intervention.  I need to make the report maintenance free for monthly scheduled e-mail distribution in business objects enterprise.  Specified order does not work since the column headers will change each month.  It needs a sort order formula, but I am not sure how can this be done inside a cross tab? 
    Any help or suggestions are appreciated!
    Thanks,
    Wendy Douglass

    Hi,
    I have a similar cross tab in my report. but only problem is grouping is done based on a parameter GroupBy, which has Day, Week, Month values.
    if user selects day or week, cross tab should display column in dd/mm/yy format, if its month, MMM-yy format.
    I have created a date formula ,  GroupBy = Day then Opendate
                                                       GroupBy = Week then opendate -dayofweek(opendate)+1
                                                       GroupBy = date(year(opendate),month(opendate),1)
    and used this date formula as column in cross tab. I tried to format using custom date style...but its not working in cross tab.
    if I use totext to format the date formula, data will not be in sorted order...ex, its showing jul-99 before jun-99
    can anyone help?
    Thanks in Advance,
    Jyothi
    Edited by: Jyothi Yepuri on Jul 8, 2009 5:27 AM
    Edited by: Jyothi Yepuri on Jul 8, 2009 6:10 AM

  • I need to sort and organize all my email addresses in apple mail? - where are they and how can I organize and copy them ? urgent help needed please

    really need urgent help - where do I find the entire list of all my email addresses? and how do I sort and organize them into folders ?

    really need urgent help - where do I find the entire list of all my email addresses? and how do I sort and organize them into folders ?

  • Change Sorting order in F4 Help in BEx Query

    Hello All,
    My users want to change the sorting order of variable (e.g. Calmonth) in the selection screen (while executing a query).
    Currently, by default,the sorting order is ascending on key.
    I need to change it to descending on key.
    How to change the sorting order for F4 ONLY?
    Thanks,
    Mainak

    Hi,
    You can sort the Char.Values by doing settings in Query Designer :
    Say for 0calmonth :
    In its Display properties tab,You select appropriate options in
    Sort Char -> select the name
    sort by -> Key/Text
    Sort Direction -> Ascending/Descending.
    You will then have them in required order.
    ALso if you want it only for F4 help:
    In F4 help screen,you will see two arrow buttons next to Char. name. they are useful for sorting the values to either descending or ascending.
    Hope it helps:)
    Edited by: Sriman on Nov 12, 2008 5:17 PM

  • Frustrated and seeking help with a custom sort order...

    I created a family photo album and arranged all of the pictures in a specific order and sync'd them with my iPad, unfortunately the pictures do not stay in the custom sequence.
    I tried Batch renaming with a Custom Name and Index, but the renaming is applied to the pictures based on the date they were created and not by the way I have arranged them.
    Is there a solution to my problem?
    TIA

    I flagged fifty photos and from that selection I created an album. I went to the album and dragged the photos in to the order I wanted them to appear after selecting Manual. Each time I now choose the manual option it arranges the photos into the sequence I created.
    The problem I'm having is that when I synchronize my iPad with iTunes the photos revert back to their original sort order, which is the default date they were brought in to Aperture.
    As I said, I tried to give them new names and index numbers using a batch command AFTER I arranged them manually, which works, however the names are assigned to the photos sequentially starting with oldest photos and not to photos as I have arranged them.
    Honestly, it would be easier for me to create a slideshow using the timeline in FCP, but a video is not what I'm after.
    I hope I have answered your questions.
    TIA

  • Need help please: cover flow sort order logic

    hi community,
    is there a official document / specification from apple where the sort order and the settings of the corresponding tags (album, album artist, compilation on/off) of the cover flow is described?
    AA)
    i use diffent ipods. earlier versions diplayed in coverflow:
    1) sorted by artist for compilation = off, following
    2) sorted by album for compilation = on
    this was fine for me.
    BB)
    now on my nano 5g order is as following:
    - only 1 list: sorted by artist with all compilations listed in
    does anybody know how i can set up the nano to display the cover flow like AA)?
    best regards
    gef_audio

    s there a official document / specification from apple
    If there is, it would be in Apple's Knowledge Base or iPod nano (5th generation) - User Guide.

  • Urgent!  Details of english sort orders in SQL databases

    I need (for reasons that would take too long to explain and probably breach company security) to duplicate in Java (preferably a Comparator) the sorting order used by a SQL database.
    I can find lots of things telling me how to tell a database to use a sort order, but nothing will tell me exactly what that order is.
    Does anybody have a clue? And yes, we are prepared to buy books for this.

    It is probably different for each database. It can even be different for different installations of the same database if the charset can be custom set. You would need to know the specifics for the database you are working with, which the dba should know.

  • Urgent help needed with un-removable junk mail that froze Mail!!

    Urgent help needed with un-removable junk mail that froze Mail?
    I had 7 junk mails come in this morning, 5 went straight to junk and 2 more I junked.
    When I clicked on the Junk folder to empty it, it froze Mail and I can't click on anything, I had to force quit Mail and re-open it. When it re-opens the Junk folder is selected and it is froze, I can't do anything.
    I repaired permissions, it did nothing.
    I re-booted my computer, on opening Mail the In folder was selected, when I selected Junk, again, it locks up Mail and I can't select them to delete them?
    Anyone know how I can delete these Junk mails from my Junk folder without having to open Mail to do it as it would appear this will be the only solution to the problem.

    Hi Nigel
    If you hold the Shift key when opening the mail app, it will start up without any folders selected & no emails showing. Hopefully this will enable you to start Mail ok.
    Then from the Mail menus - choose Mailbox-Erase Junk Mail . The problem mail should now be in the trash. If there's nothing you want to retain from the Trash, you should now choose Mailbox- Erase Deleted Messages....
    If you need to double-check the Trash for anything you might want to retain, then view the Trash folder first, before using Erase Junk Mail & move anything you wish to keep to another folder.
    The shift key starts Mail in a sort of Safe mode.

  • Urgent help need

    hi friends,
      Help me how to do this
    REPORT  ZINTERFACE_SAMPLE.
    type-pools:SLIS.
    TABLES:knb1, "Customer Master (Company Code)
           kna1,
           knvp. "Customer Master Partner Functions
    TYPES:BEGIN OF T_knb1,
          kunnr like knb1-kunnr,
          bukrs like knb1-bukrs,
          akont like knb1-akont,
          END OF T_knb1.
    TYPES:BEGIN OF T_kna1,
          kunnr like kna1-kunnr, "customer number
          NAME1 like KNA1-NAME1, "customer name
          stras like KNA1-STRAS, "Customer address
          ort01 like KNA1-ORT01, "Customer city
          stcd1 like KNA1-STCD1, "Tax id
          pstlz like KNA1-PSTLZ, "Postal code
          END OF   T_kna1.
    TYPES:BEGIN OF T_knvp,
          kunnr like knvp-kunnr, "customer number
          parvw like knvp-parvw,
          kunn2 like knvp-kunn2, "Customer number of business partner
          END OF T_KNVP.
    TYPES:BEGIN OF T_final,
          Record_type      TYPE c,
          Sold_to_cust(10) TYPE c,
          Payer(10)        TYPE c,
          Sequence(5)      TYPE n,
          Cust_name(35)    TYPE c,
          Cust_adreess(35) TYPE c,
          Cust_city(35)    TYPE c,
          Tax_id(16)       TYPE c,
          Postal_code(5)   TYPE c,
          Branch           TYPE c,
          Delivery(3)      TYPE c,
          END OF T_final.
    *Internal table declaration
    DATA:I_knb1  TYPE STANDARD TABLE OF t_knb1  initial size 0,
         i_kna1  TYPE STANDARD TABLE OF t_kna1  initial size 0,
         i_knvp  TYPE STANDARD TABLE OF t_knvp  initial size 0,
         i_final TYPE STANDARD TABLE OF t_final initial size 0.
    DATA: t_fieldcat_tab TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    *Work area declaration
    DATA:wa_knb1  TYPE t_knb1,
         wa_kna1  TYPE t_kna1,
         wa_knvp  TYPE t_knvp,
         wa_final TYPE t_final.
               *variable declaration
    data:sequence TYPe n,
         g_line TYPE i.
                    selection screen                        *
    SELECTION-screen begin of block b1 with frame title text-001.
    parameters:p_bukrs like knb1-bukrs, "Company code
               p_akont like knb1-akont .
    selection-screen end of block b1.
    SELECTION-screen begin of block b2 with frame title text-002.
    PARAMETERS:R1 RADIOBUTTON GROUP G1,
               R2 RADIOBUTTON GROUP G1.
    Parameters:p_file like rlgrap-filename.
                                       "Recon Account in General Ledger
    selection-screen end of block b2.
    *AT selection-screen ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
       IMPORTING
         FILE_NAME = P_FILE.
    START-OF-selection.
    PERFORM f_fetchdata.
    PERFORM f_prepare_fieldcat.
    PERFORM f_display_report.
    *END-OF-SELECTION.
    *IF R1 EQ 'X'.
    *perform F_DOWNLOAD.
    *ENDIF.
    *IF R2 EQ 'X'.
    *OPEN DATASET P_FILE FOR OUTPUT IN text mode ENCODING DEFAULT.
    *LOOP AT i_final INTO WA_final.
    *TRANSFER WA_final TO P_FILE.
    *ENDLOOP.
    *CLOSE DATASET P_FILE.
    *ENDIF.
    *&      Form  f_fetchdata
    FORM f_fetchdata .
    select kunnr
           bukrs
           akont
           from knb1
           into table i_knb1
           where bukrs = p_bukrs
           AND   akont = p_akont.
    DESCRIBE TABLE i_knb1 LINES g_line.
    LOOP AT i_knb1 INTO wa_knb1.
    SELECT single KUNNR
                  NAME1
                  STRAS
                  ORT01
                  STCD1
                  PSTLZ
                  FROM kna1
                  INTO wa_kna1
                  where kunnr = wa_knb1-kunnr.
    if sy-subrc <> 0.
    *Error KNA1 record not found.
    endif.
    SELECT single kunnr
                  parvw
                  kunn2
                  FROM KNVP
                  INTO wa_knvp
                  where kunnr = wa_knb1-kunnr
                  AND parvw = 'RG'.
    if sy-subrc <> 0.
    *Error KNA1 record not found.
    endif.
    sequence = sequence + 1.
    MOVE: 'c'              TO    wa_final-Record_type,
          wa_knvp-kunnr    TO    wa_final-Sold_to_cust,
          sequence         TO    wa_final-Sequence,
          wa_KNA1-NAME1    TO    wa_final-Cust_name,
          wa_kna1-STRAS    TO    wa_final-Cust_adreess ,
          wa_kna1-ort01    TO    wa_final-Cust_city,
          wa_kna1-STCD1    TO    wa_final-Tax_id,
          wa_kna1-PSTLZ    TO    wa_final-Postal_code,
          '1'              TO    wa_final-branch,
          'abc'            TO    wa_final-Delivery.
    INSERT wa_final INTO TABLE i_final.
    endloop.
    ENDFORM.                    " f_fetchdata
    FORM f_prepare_fieldcat.
      t_fieldcat_tab-col_pos = 1.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Record_type'.
      t_fieldcat_tab-seltext_l = 'Record type'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 2.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Sold_to_cust'.
      t_fieldcat_tab-seltext_l = 'Sold to cust'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 3.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'payer'.
      t_fieldcat_tab-seltext_l = 'Payer'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 4.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Sequence'.
      t_fieldcat_tab-seltext_l = 'sequence'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 5.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Cust_name'.
      t_fieldcat_tab-seltext_l = 'Cust name'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 6.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Cust_adreess'.
      t_fieldcat_tab-seltext_l = 'Cust adreess'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 7.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Cust_city'.
      t_fieldcat_tab-seltext_l = 'Cust city'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 8.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Tax_id'.
      t_fieldcat_tab-seltext_l = 'Tax id'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 9.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Postal_code'.
      t_fieldcat_tab-seltext_l = 'Postal code'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 10.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Branch'.
      t_fieldcat_tab-seltext_l = 'Branch'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 11.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'KWMENG'.
      t_fieldcat_tab-seltext_l = 'Order Qty'.
      APPEND t_fieldcat_tab.
      t_fieldcat_tab-col_pos = 12.
      t_fieldcat_tab-tabname  = 'i_final'.
      t_fieldcat_tab-fieldname  = 'Delivery'.
      t_fieldcat_tab-seltext_l = 'Delivery'.
      APPEND t_fieldcat_tab.
      ENDFORM.                    " f_prepare_fieldcat
    *&      Form  f_display_report
    *To display the ALV Report
    FORM f_display_report.
      DATA: l_repid LIKE sy-repid.
      l_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                   I_CALLBACK_PROGRAM  = l_repid
                   i_buffer_active     = 'X'
                   IT_FIELDCAT         = t_fieldcat_tab[]
                   I_DEFAULT           = 'X'
                   I_SAVE              = 'A'
             TABLES
                   T_OUTTAB            = i_final[].
            EXCEPTIONS
                  PROGRAM_ERROR                  = 1
                  OTHERS                         = 2
              IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             ENDIF.
              ENDFORM." f_display_report
    *&      Form  F_DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM F_DOWNLOAD .
    *CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      FILENAME                      = p_file
      FILETYPE                      = 'ASC'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
    TABLES
       DATA_TAB                      = i_final
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_WRITE_ERROR              = 2
      INVALID_FILESIZE              = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      NO_AUTHORITY                  = 10
      OTHERS                        = 11
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    ENDFORM.                    " F_DOWNLOAD
    for this one when i given the proper input
    it showing the Runtime error.
    Could u please tell me what mistake i have done
    Urgent help
    Regards
    harshavi N.

    HI,
    Run this program..
    REPORT ZINTERFACE_SAMPLE.
    type-pools:SLIS.
    TABLES:knb1, "Customer Master (Company Code)
    kna1,
    knvp. "Customer Master Partner Functions
    TYPES:BEGIN OF T_knb1,
    kunnr like knb1-kunnr,
    bukrs like knb1-bukrs,
    akont like knb1-akont,
    END OF T_knb1.
    TYPES:BEGIN OF T_kna1,
    kunnr like kna1-kunnr, "customer number
    NAME1 like KNA1-NAME1, "customer name
    stras like KNA1-STRAS, "Customer address
    ort01 like KNA1-ORT01, "Customer city
    stcd1 like KNA1-STCD1, "Tax id
    pstlz like KNA1-PSTLZ, "Postal code
    END OF T_kna1.
    TYPES:BEGIN OF T_knvp,
    kunnr like knvp-kunnr, "customer number
    parvw like knvp-parvw,
    kunn2 like knvp-kunn2, "Customer number of business partner
    END OF T_KNVP.
    TYPES:BEGIN OF T_final,
    Record_type TYPE c,
    Sold_to_cust(10) TYPE c,
    Payer(10) TYPE c,
    Sequence(5) TYPE n,
    Cust_name(35) TYPE c,
    Cust_adreess(35) TYPE c,
    Cust_city(35) TYPE c,
    Tax_id(16) TYPE c,
    Postal_code(5) TYPE c,
    Branch TYPE c,
    Delivery(3) TYPE c,
    END OF T_final.
    *Internal table declaration
    DATA:I_knb1 TYPE STANDARD TABLE OF t_knb1 initial size 0,
    i_kna1 TYPE STANDARD TABLE OF t_kna1 initial size 0,
    i_knvp TYPE STANDARD TABLE OF t_knvp initial size 0,
    i_final TYPE STANDARD TABLE OF t_final initial size 0.
    DATA: t_fieldcat_tab TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    *Work area declaration
    DATA:wa_knb1 TYPE t_knb1,
    wa_kna1 TYPE t_kna1,
    wa_knvp TYPE t_knvp,
    wa_final TYPE t_final.
    *variable declaration
    data:sequence TYPe n,
    g_line TYPE i.
    selection screen *
    SELECTION-screen begin of block b1 with frame title text-001.
    parameters:p_bukrs like knb1-bukrs, "Company code
    p_akont like knb1-akont .
    selection-screen end of block b1.
    SELECTION-screen begin of block b2 with frame title text-002.
    PARAMETERS:R1 RADIOBUTTON GROUP G1,
    R2 RADIOBUTTON GROUP G1.
    Parameters:p_file like rlgrap-filename.
    "Recon Account in General Ledger
    selection-screen end of block b2.
    *AT selection-screen ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    FILE_NAME = P_FILE.
    START-OF-selection.
    PERFORM f_fetchdata.
    PERFORM f_prepare_fieldcat.
    PERFORM f_display_report.
    *END-OF-SELECTION.
    *IF R1 EQ 'X'.
    *perform F_DOWNLOAD.
    *ENDIF.
    *IF R2 EQ 'X'.
    *OPEN DATASET P_FILE FOR OUTPUT IN text mode ENCODING DEFAULT.
    *LOOP AT i_final INTO WA_final.
    *TRANSFER WA_final TO P_FILE.
    *ENDLOOP.
    *CLOSE DATASET P_FILE.
    *ENDIF.
    *& Form f_fetchdata
    FORM f_fetchdata .
    select kunnr
    bukrs
    akont
    from knb1
    into table i_knb1
    where bukrs = p_bukrs
    AND akont = p_akont.
    DESCRIBE TABLE i_knb1 LINES g_line.
    LOOP AT i_knb1 INTO wa_knb1.
    SELECT single KUNNR
    NAME1
    STRAS
    ORT01
    STCD1
    PSTLZ
    FROM kna1
    INTO wa_kna1
    where kunnr = wa_knb1-kunnr.
    if sy-subrc <> 0.
    *Error KNA1 record not found.
    endif.
    SELECT single kunnr
    parvw
    kunn2
    FROM KNVP
    INTO wa_knvp
    where kunnr = wa_knb1-kunnr
    AND parvw = 'RG'.
    if sy-subrc <> 0.
    *Error KNA1 record not found.
    endif.
    sequence = sequence + 1.
    MOVE: 'c' TO wa_final-Record_type,
    wa_knvp-kunnr TO wa_final-Sold_to_cust,
    sequence TO wa_final-Sequence,
    wa_KNA1-NAME1 TO wa_final-Cust_name,
    wa_kna1-STRAS TO wa_final-Cust_adreess ,
    wa_kna1-ort01 TO wa_final-Cust_city,
    wa_kna1-STCD1 TO wa_final-Tax_id,
    wa_kna1-PSTLZ TO wa_final-Postal_code,
    '1' TO wa_final-branch,
    'abc' TO wa_final-Delivery.
    INSERT wa_final INTO TABLE i_final.
    endloop.
    ENDFORM. " f_fetchdata
    FORM f_prepare_fieldcat.
    t_fieldcat_tab-col_pos = 1.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'RECORD_TYPE'.
    t_fieldcat_tab-seltext_l = 'Record type'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 2.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'SOLD_TO_CUST'.
    t_fieldcat_tab-seltext_l = 'Sold to cust'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 3.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'PAYER'.
    t_fieldcat_tab-seltext_l = 'Payer'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 4.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'SEQUENCE'.
    t_fieldcat_tab-seltext_l = 'sequence'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 5.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'CUST_NAME'.
    t_fieldcat_tab-seltext_l = 'Cust name'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 6.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'CUST_ADREESS'.
    t_fieldcat_tab-seltext_l = 'Cust adreess'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 7.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'CUST_CITY'.
    t_fieldcat_tab-seltext_l = 'Cust city'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 8.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'TAX_ID'.
    t_fieldcat_tab-seltext_l = 'Tax id'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 9.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'POSTAL_CODE'.
    t_fieldcat_tab-seltext_l = 'Postal code'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 10.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'BRANCH'.
    t_fieldcat_tab-seltext_l = 'Branch'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 11.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'KWMENG'.
    t_fieldcat_tab-seltext_l = 'Order Qty'.
    APPEND t_fieldcat_tab.
    t_fieldcat_tab-col_pos = 12.
    t_fieldcat_tab-tabname = 'I_FINAL'.
    t_fieldcat_tab-fieldname = 'DELIVERY'.
    t_fieldcat_tab-seltext_l = 'Delivery'.
    APPEND t_fieldcat_tab.
    ENDFORM. " f_prepare_fieldcat
    *& Form f_display_report
    *To display the ALV Report
    FORM f_display_report.
    DATA: l_repid LIKE sy-repid.
    l_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = l_repid
    IT_FIELDCAT = t_fieldcat_tab[]
    I_DEFAULT = 'X'
    I_SAVE = 'A'
    TABLES
    T_OUTTAB = I_FINAL[].
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM." f_display_report
    *& Form F_DOWNLOAD
    text
    --> p1 text
    <-- p2 text
    FORM F_DOWNLOAD .
    *CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    FILENAME = p_file
    FILETYPE = 'ASC'
    MODE = ' '
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    COL_SELECT = ' '
    COL_SELECTMASK = ' '
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    DATA_TAB = i_final
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    ENDFORM. " F_DOWNLOAD
    It is perfectly working for me..
    I made the field name and table name as CAPs in the field catalog internal table.
    I removed the buffer paramter in the ALV FM.
    Thanks,
    Naren

  • Any way to Restore Last Manual Sort Order or Prevent from being Overwritten accidentally?

         Help!
         I'm constantly accidentally overwriting painstakingly created manual sort ordering (sometimes hours but more often months of accumulated work) in folders with files numbering up to 1,000, when i, however breifly, switch to another sort ordering (size, date modified etc) to check something, immediately forget that i'm in another sort order, and, unthinkingly (actually i guess i'm thinking of a lot of other things) drag a file to another position, this immediately destroys any past manual sorting i've established, overwriting it with this new inadvertent manual ordering.
         I've tried CommandZ (edit undo) but that only undoes my last rating or labeling, i've rushed to force quit Bridge through the activity montior hoping i will catch it before its overwritten, but obviously i am not as fast as a computer, and i don't think this has ever worked.
    Is there any way or any script someone has written to formally save a manual sort order? Is there anything i've missed to attempt restoring it? Has anyone, repeatedly foiled by this, written something that would give a warning and require confirmation say for instance, if i tried to drag or move a file while in another sort ordering (this seems like something that should have existed the minute the opportunity was given to create manual organization). Would anyone be willing to?
         Seriously, me forgetting almost every time isn't going to change and, more vexingly, it's even happened when i didn't mean to move anything but fumbled momentarily while in another sort order. I think most people might forget because (in the context of computing) we are conditioned to expect a warning if something we have just created is about to be written over or discarded, and since there is no option to formally save a manual ordering we have just created.
         Also, if this was in the real world, moving a single file would not reshuffle everything on your desk. If i had the option to formally save a manual organization i would NOT forget to do this and would use it, as i've wished for one every time spent a while rearranging files. Knowing how easily all the hours (much less months and years of cumulative work) of organizational work can be accidentally lost makes working within Bridge unpleasantly anxious.
          I'm literally willing to do anything including installing some sketchy 3rd-part scripts (though honestly i have no idea what that means or how to do it). I extentively use and rely heavily upon this function so this is a fairly serious Achille's heel. It's like watching your incredibly important meticulously constructed house of cards collapse with a careless but innocent sigh, or like having the equivelent of a not even charming cat dance across your keyboard during a live concert, etc etc....
         Also it is not usually appropriate, given the context, to batch rename everything to preserve a manual ordering w sequence numbers, etc. Often the filenames are considerably (but necessarily, to connote important differences) long already, and when i have to rearrange things in the future would have to do that each time, etc, etc, making for even more unwieldly filenames that didn't have any substantive information at the beginning. I'm looking for a way to make this function (manual sort ordering), well, more functional, secure and stable, the workarounds i've considered cause too many additonal problems.
         Thank you in advance for any help you may be able to offer, and as this is my first attempt to use the forums as i live on a boat with no regular net access, would appreciate any forum etiquette corrections, and advance apologies for any misspellings, dyslexic and spellcheck does not seem to work in this interface. next time will edit in external wordprocessing program beforehand,
              li'l mc szpf
         PS i'm on a 27" mac w CS4 Design Premium, w up to the minute OS (10.6.8) and Adobe software updates installed recently (i do not often move the monster but this week was housesitting w net access, so she has had all recommended shots and vaccinations....)
         PPS I know most of y'all might be running the newest and the latest of everything, but, i'm fairly certain this is still a problem in recent versions as this has happened to me at school where all the macs are running cs5. Though if it's been addressed somehow in cs6 would update entire suite just to fix this one problem in Bridge. I've tried many searches and found nothing relevant or wouldn't bother the considerable expertise and resources of an official forum, was extremely hesitant to ask (feared getting snapped at for unwittingly broaching forum etiquette) but it is truly the bane of my considerable Bridge existence, so was willing to risk the imaginary censure and opprobrium....
    Message was edited by: PECourtejoie

    That is a good question, to do this requires two functions and a restart of Bridge all done automagically
    Copy and paste the script into ExtendScript Toolkit
    This gets installed with Photoshop and can be found:-
    PC: C:\Program Files\Adobe\Adobe Utilities
    MAC: <hard drive>/Applications/Utilities/Adobe Utilities
    Start Bridge
    PC: Edit - Preferences - Startup Scripts
    Mac: Adobe Bridge menu - Preferences - Startup Scripts
    At the bottom click the "Reveal Button" this will open the folder where the script should be saved.
    Close and restart Bridge.
    Accept the new script.
    To use:
    Tools - Backup Manual Sort
    This will backup the hidden manual sort file .BridgeSort to .BridgeSortSave
    Tools - Restore Manual Sort
    This will copy the .BridgeSortSave back to .BridgeSort and will close and restart Bridge so that the manual sort is restored.
    if( BridgeTalk.appName == "bridge" ) { 
    var backUpManSort = new MenuElement( "command","Backup Manual Sort", "at the end of Tools" , "backupms" );
    var RestoreManSort = new MenuElement( "command","Restore Manual Sort", "at the end of Tools" , "restorems" );
    backUpManSort.onSelect = function () {
    var fileSort = new File(app.document.presentationPath +"/.BridgeSort");
    var fileSave = new File(app.document.presentationPath +"/.BridgeSortSave");
    if(fileSave.exists) fileSave.remove();
    fileSort.copy(fileSave);
    fileSave.hidden=true;
    RestoreManSort.onSelect = function () {
    var fileSort = new File(app.document.presentationPath +"/.BridgeSort");
    var fileSave = new File(app.document.presentationPath +"/.BridgeSortSave");
    if(!fileSave.exists){
    alert("No backup file exists");
    return;
    app.document.sorts = [{ type:"string",name:"document-kind", reverse:false }];
    if(fileSort.exists) fileSort.remove();
    fileSave.copy(fileSort);
    fileSort.hidden=true;
    app.document.chooseMenuItem("mondo/command/new");
    app.documents[0].close();
    app.document.sorts = [{ name:"user",type:"date", reverse:false }];
    Hope this works for you.

  • SORT ORDER WITHIN GROUPS

    Post Author: Kara
    CA Forum: General
    Hi,
    I am using version 9. I have designed a report based on an access control database. It shows a person's time in and time out, then totals these hours. My report is grouped as follows:
    Department
    Date/Time
    Unique ID
    The main data of the report is shown in group footer 3 (Unique ID) and is displayed in numerical order. I need to change the sort order to display by last name, first name but because I have grouped by unique ID I can't seem to be able to do it!
    Any help gratefully received,
    Kara

    Post Author: CoolTowers
    CA Forum: General
    I use a similar report to track service personnel who also have a unique ID.  I have mine set up as follows - maybe this'll help.
    I used selection expert to specify the dates I want to see. 
    Group 1 sorts on the unique ID. Instead of printing the unique ID field in the group header, I have Employee.EmpName.  They'll come out in their unique ID sort so the names might be a little out of order. If that's a problem you could put sort option on that field.
    Group 2 sorts by the Job ID, with the group header suppressed.
    Detail line has location, job id, date, time on, time off, total time in hours and if it's completed.
    Group 2 summarizes at date and amount at the job ID level.
    Group 1 summarizes at technician.
    I get very accurate reports to match against their hand written time cards.
    Perhaps if you re-arranged the grouping?

Maybe you are looking for

  • Just Got A New iMac, Can I Get Music Off My iPhone To Put Into iTunes?

    I just purchased a new iMac today and I have all my music on my other iMac. I used to plug my iPod into the new computers I got and copy the songs onto it. But my iPod got stolen. I was wondering if I could do the same thing with my iPhone. Is there

  • Set up of two accounts of itunes on one computer

    I have an itunes acount which is linked to my iphone and ipod touch.   My partner has purchased an iphone, how do we set his up to his own account separately?

  • IPod Classic 120GB won't sync songs

    My iPod recently began having issues, such as not playing songs that should've worked, skipping over them, etc. So I chose to restore it, and now it stops syncing songs at around 3 GB worth of music, and I'll either get error 1303, 53, or 69. I sync

  • IMac will not boot up, all I get is white screen help

    MY iMac will not boot up, all I get is white screen? what do I need to do to start machine please?

  • How to make the application offline

    I have X7 phone and each day the amount of my pulse is decreasing. the internet is working but I didnt use it. How can I make the application become offline and not receiving updates. I already set my widgets to offline mode but it still like that. n