No 'order by' selection for cluster tables generates run-time

Hi together,
Basically I want to use a "select...order by" statement with table mhnd.
Since mhnd is a cluster table you can not use "...order by".
So, I use a select ... into table. I then sort this table and finally read it (index = 1)
Unfortunatly this approach generates huge run-time.
What can be done to minimize run-time?
Thanks for any help

Hi Gerd,
Which cluster table you are using and what`s data you wanted? Maybe there are some FM to extract data from it.
regards,
Archer

Similar Messages

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

  • Select from Cluster Table

    Hi,
    I want to read data fields name1 name2 name3 name4 from cluster table BSEC.
    I tried select statement it takes lot of time.
    Let me know if theres a better way.
    Any help will be rewarded with points.
    Thanks,
    blluesh

    Hi,
    Generally Select on cluster table will be very slow especially if u dont pass all the keys. Let me know what are all the fields u are passing to this select in WHERE clause. Also check the transperant table TCJ_CPD which has all name fields.
    Thanks,
    Vinod.

  • IUUC_REPL_CONTENT - How to apply filters and replicate for Cluster tables BSEG/CDPOS

    Hello Friends,
    I have replicated the transparent tables by applying filters in IUUC_REPL_CONTENT but I know it's different for Cluster tables.
    Does anyone replicated the BSEG or CDPOS ?
    I need some inputs on this folks.
    Thanks in advance.
    Regards
    Raja

    May be this is helpful - http://scn.sap.com/community/replication-server/blog/2014/02/25/how-to-filter-on-the-initial-load-parallelize-replication

  • How to build sql query for view object at run time

    Hi,
    I have a LOV on my form that is created from a view object.
    View object is read-only and is created from a SQL query.
    SQL query consists of few input parameters and table joins.
    My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
    Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
    Thanks
    Srikanth Addanki

    As I understand you want to change the query at run time.
    If this is what you want, you can use setQuery Method then use executeQuery.
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_

  • Dynamic table in Run time

    Hi,
    I need to create a dynamic table in run time
    Input from user will be like
    Param1---->'tablename'
    Param2---->'col1name datatype,col2name datatype,col3name datatype,col4name datatype,col5name datatype,col6name datatype........................'
    Param3---->returnCode OUT NUMBER
    Param4---->errorMessage OUT VARCHAR2
    how to write a script to execute the above statement.
    The input will be from java page, it has connection string of the database
    Thanks!

    After remove *:*
    Error report:
    ORA-06550: line 4, column 6:
    PLS-00103: Encountered the symbol "CREATE_TABLE" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "CREATE_TABLE" to continue.
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Change the Value of column of the internal table at run time

    Hello Experts,
    With the below code i am able to determine the value hold
    by internal table at run time for a sepcific column but i am not getting the way
    of how to update the internal if one of the value is changed,
      lr_desc_table ?= cl_abap_typedescr=>describe_by_data( itab  ).
      lr_desc_struc ?= lr_desc_table->get_table_line_type( ).
    loop at itab assigning <fs_data>.
        loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
          assign component  <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
          lv_excel_row = <fs_field>.
         CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
            EXPORTING
              INTEXT  = lv_excel_row
            IMPORTING
              OUTTEXT = lv_excel_row.
          assign lv_excel_row to <fs_field>. "this is not changing the value actually hold in internal table
        endloop.
      endloop.

    Hi,
    Resolved this issue with the code mentioned below.
    Code:
    loop at lt_export_items assigning <fs_data>.
      ls_data = <fs_data>.
        loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
          assign component  <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
          lv_excel_row = <fs_field>.
          CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
            EXPORTING
              INTEXT  = lv_excel_row
            IMPORTING
              OUTTEXT = lv_excel_row.
              concatenate 'ls_data-' <fs_comp_wa>-name into  lv_var.
              assign (lv_var) to <fs_var>.
              <fs_var> = lv_excel_row.
        endloop.
        modify lt_export_items from ls_data .
        clear:ls_data.
      endloop.
    Take care,
    Sanju

  • How to insert records dynamically in a table at run time

    hi, all
      please help me out,
      my problum is how can i insert records from on table to another table at  run time dynamically. Initally the records are coming  from R/3 backend.
    regards

    Hi,
    One way is to first create a Value node (NewNode) with structure binding of that of the model node. Then iterate through the model node, create NewNode elements and set the value from model node elements into it.
    IPrivate<view>.I<model node> mele;
    IPrivate<view>.I<NewNode> nele;
    for(int=0;i<wdContext.node<output>().node<record>().size();i++)
    mele = wdContext.node<output>().node<record>().get<record>ElementAt(i);
    nele = wdContext.node<NewNode>().create<NewNode>Element();
    wdContext.node<NewNode>().addElement(nele);
    nele.set<attr>(mele.get<attr>());
    Second way is to create that NewNode inside the model node and create a supply function.
    Regards,
    Piyush.

  • HOWTO: Control Printer Attributes for a Report at Run Time Reports 6i

    HOWTO: Control Printer Attributes for a Report at Run Time
    Like page width , height etc
    my problem is i had installed a printer and it is set for
    printing different reports ( like invoice slips , legal size ,
    A3 etc ) each time i have to manually set the page settup from
    printer folder .instead if there is an option to set the printer
    attributes from Reports 6i it is great
    rajesh

    All the Printer Setup(Page Height and Page Width) must be set in
    the Reprot Program. These can be set at the Layout-Main Section
    in the Object Navigator.
    hth

  • How to implement line selectability for a table control using table Wizard?

    Hello SDN Community,
    I have created a table control using the Table Wizard.  I found my exact question in this forum, but unfortunately it had not been andsered.  While I cannot paste a screen-print into this plane-text area, here are the steps I followed...
    1) SE51
    2) Create new screen 0100
    3) Click Layout button
    4) Clidk Table Control (with Wizard) and draw box on canvas.
    5) Step is "Start" - click Continue
    6) Step is "Name of Table Control" - provided name
    7) Step is "Table Name" - provided name of dictionary table (AUFK)
    8) Step is "Definition of Columns" - selected order numver and order text
    9) Step is "Table Control Attributes" - Line Selectability is in display mode - cannot set it.
    I would like to have a selectability column for my table.  Would appreciate any insight into how to do this.
    Thank you,
    Dean Atteberry.

    This is a puzzling...
    For the table control wizard, in the Table Control Attributes step, I was able to get line selectability to open up by declaring a char01 data element at the beginning of my type.
    The puzzling is in regards to the "Selection col. fld" entry field.
    If I leave it blank and try to go to the next step, I get message "Enter the name of the selection column if you are using a program table"
    So it looked like it wanted to know the name of my selection column.  So I type in "CHAR1".  and got the message "The field "CHAR1" for the selection column is already contained in the table."
    Hmmmmm.... don't understand............
    Dean Atteberry.

  • List of function module used for cluster table

    hi,
      I want to know the list of all function module used th extract data from cluster table such as such MONI, STXL.
    thanks,
    john dias

    When inside SE11 for MONI, lets say, press the where-used list button and select the option for FUNCTION MODULE INTERFACES to see a list of FMs that take a structure of type MONI as input/output parameter. Although this will not give an exhaustive list of FMs, it will assist you to a good extent.
    Additionally, you can try FM APPLICATION_DATA_GET.
    For STXL, take a look at FM READ_TEXT and associated include file LSTXDUXX for more functions in this function group SAPLSTXD.
    Regards
    Message was edited by: Shehryar Khan
    Message was edited by: Shehryar Khan

  • Define view for cluster table?

    Hi Experts,
    Can we create a database view with a cluster table? Please let me know how.
    Regards,
    Vishal.

    Hi,
    Please try this and use BSEG as an example.
    1. Go to SE12.
    2. Enter BSEG
    3. Click Display button
    4. Go to Delivery and Maintenance' tab.
    5. You should be able to see Pool/cluster RFBLG.
    6. Double click RFBLG and then click Where-Used list button (CTRLSHIFTF3).
    7. Select Table option and click Execute button.
    8. System will show all the table that belong to this pool/cluster.
    For Pool/Cluster REGUC, it is only used in table REGUP.
    Regards,
    Ferry Lianto

  • HOw to improve insert/update/select  for nested table.

    Hi All,
    I think this is my second thread for nested table.
    i just want to know what are the different ways available to improve the insert/update/select operation on Nested table.
    Thanks in advance.

    By not using a nested table for data storage in the first place...
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:8135488196597
    Perhaps Parallel Query/DML might give some relief.

  • Select for partitioned table, will this work with sign?

    Hi,
    I have partitioned table and select for it like :
    PARTITION BY RANGE  ( "INDATE"  )
      (   PARTITION "PRT_20091201" VALUES LESS THAN (TO_DATE(' 2009-12-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')...
       SELECT COLUMN_LIST FROM TABLE1   WHERE
               ( indate >= to_date(t_indate || t_timefrom, 'mm/dd/yyyy HH24:MI:SS'))                       AND
               ( indate <= to_date(t_indate || t_timeto,   'mm/dd/yyyy HH24:MI:SS'))                        AND... so selecting all info for the given date withing specifiied time period, and I'm using >= condition on partitioned column, do you think it will work correctly getting directly to the single partition, or Oralce requires me put strictly = sign for that column, and then additioanly I can probably select time period, something like:
    SELECT COLUMN_LIST FROM TABLE1   WHERE
              ( indate = to_date(t_indate , 'mm/dd/yyyy'))                        AND
                   ( trim_to_time(indate) >= to_char(t_timefrom, ' HH24:MI:SS'))              AND
                   ( trim_to_time(indate) <= to_char( t_timeto,   ' HH24:MI:SS'))              AND... Tx all
    Tr

    trento wrote:
    Hi,
    I have partitioned table and select for it like :
    PARTITION BY RANGE  ( "INDATE"  )
    (   PARTITION "PRT_20091201" VALUES LESS THAN (TO_DATE(' 2009-12-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')...
    SELECT COLUMN_LIST FROM TABLE1   WHERE
    ( indate >= to_date(t_indate || t_timefrom, 'mm/dd/yyyy HH24:MI:SS'))                       AND
    ( indate <= to_date(t_indate || t_timeto,   'mm/dd/yyyy HH24:MI:SS'))                        AND... so selecting all info for the given date withing specifiied time period, and I'm using >= condition on partitioned column, do you think it will work correctly getting directly to the single partition, or Oralce requires me put strictly = sign for that column, and then additioanly I can probably select time period, something like:
    SELECT COLUMN_LIST FROM TABLE1   WHERE
    ( indate = to_date(t_indate , 'mm/dd/yyyy'))                        AND
    ( trim_to_time(indate) >= to_char(t_timefrom, ' HH24:MI:SS'))              AND
    ( trim_to_time(indate) <= to_char( t_timeto,   ' HH24:MI:SS'))              AND... Tx all
    TrI agree with David that the first example looked okay, but you should test to make sure. You can check individual partition contents by executing a query using the PARTITION option to specifiy a specific partition to check the values there.

  • Select * for multiple tables in cfquery does not work anymore as it used to with CF5

    I am migrating from CF5. the following code used to work:
    SELECT *
    FROM tablea a, tableb b
    where a.id =b.id
    now I get an error when getting the value of ID (error:
    queryname.ID undefined). I suspect the * is the problem and is not
    permitted in that format with CF 7.
    Any help will be appreciated
    Thanks

    cfdump is, for the most part, a debugging tool which allows
    you to look at varialbes and their values at various points of the
    template. Rarely would you want to let real users see that sort of
    output.
    I'd be suspicious if adding cfdump, and nothing else solved
    the problem. I also wouldn't rely on it as a permanent solution.
    Using select * for a query against more than one table is still
    "sloppy" code and cold fusion tends be less forgiving of sloppy
    code with each upgrade.
    In case you were wondering, it's "sloppy" because it brings
    back more data than you need. You will never need the joining
    fields twice.

Maybe you are looking for