Diff btwn STANDARD and SORTED tbls??

Hi Experts,
Just curious to know that, In Wht scenarios/requiremets, we need to create a internal table, like fillowing(or How they differ from TYPE STANDARD TABLE OF)??
<i><b>it_a504 TYPE SORTED TABLE OF a504 WITH UNIQUE KEY kunnr prodh.
      wa_a504 TYPE a504,</b></i>.
thanq
Message was edited by:
        Srikhar

mainly performance reason ,if you use sorted internal table then it will have good performance than standard intentable
The internal tables could be catogrised into two.
  indexed   : standard and sorted tables.
  nonindexed: hash tables.
standard table: it is the one we use generally.In this the data is not sorted and the only thing we can do is just process the data with out any restriction on it.
sorted tables: it works in two different manner.
                       Frist one: is similar to standard table but the only difference is the data will be filled in a particular manner either ascending or descending.
                      Second one: u can also fill the table keeping any field as primary key.now the data will be filled based on that particular key.
Hash tables:   u can use this when u want  to fill your  internal table avoiding the duplication of data.it never permits the duplicate record to be stored in a internal table
Thanks
seshu

Similar Messages

  • Standard and sorted itab

    what is the diff between standard and sorted itab

    Hi Abhay,
    check the following explanation.
    <b>Standard tables</b>
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPENDstatement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option (BINARY) with key access, the response time is logarithmically proportional to the number of table entries.
    <b>Sorted tables</b>
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERTstatement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHEREcondition.
    Hope this helps.
    Regards,
    kinshuk

  • Types of  DTP , Diff between Standard and Error DTP

    Hi experts,
    What is DTP ,  are the Types of  DTP , Diff between Standard and Error DTP , how it works in BI 7.0.
    I will assign points for your valuable answers.

    Hello ,
    Data transfer process (DTP) to transfer data within BI from one persistent object to another object, in accordance with certain transformations and filters. In this respect, it replaces the data mart interface and the InfoPackage. As of SAP NetWeaver 7.0, the InfoPackage only loads data to the entry layer of BI (PSA).
    The data transfer process makes the transfer processes in the data warehousing layer more transparent. Optimized parallel processing improves the performance of the transfer process (the data transfer process determines the processing mode). You can use the data transfer process to separate delta processes for different targets and you can use filter options between the persistent objects on various levels. For example, you can use filters between a DataStore object and an InfoCube.
    Data transfer processes are used for standard data transfer, for real-time data acquisition, and for accessing data directly.
    1.Benefit: Data ‘Distribution’within BI Capabilities (from PSA or InfoProviders to InfoProviders)
    2.Improved transparency of staging processes across data warehouselayers (PSA, DWH layer, ODS layer, Architected Data Marts)
    3.Improved performance and high scalability
    4.Separation of delta mechanism for different data targets: delta capability is controlledby the DTP
    5.Enhanced filtering in dataflow
    6.Repair modus based on temporary buffers (buffers keep complete set of data)
    See these docs for more info
    [Data Transfer Process |http://help.sap.com/saphelp_nw04s/helpdata/en/42/f98e07cc483255e10000000a1553f7/content.htm]
    [Enterprise Data Warehouse (EDW)|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/67efb9bb-0601-0010-f7a2-b582e94bcf8a]
    [What's New with SAP NetWeaver 2004s - Detailed|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/910aa7a7-0b01-0010-97a5-f28be23697d3]
    [SAP NetWeaver 7.0 ETL and EII|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0b24053-654e-2a10-4180-b0e7c7b4c9f2]
    [How to Create Monitor Entries from a Transformation Routine (NW7.0)|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50fda171-e36e-2910-9290-e3dab26c50b5]
    FAQ on SAP NetWeaver 2004s
    [Modeling the Enterprise Data Warehousing for SAP NetWeaver 2004s FAQ|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7c2a7c65-0901-0010-5e8c-be0ad9c05a31]
    [Enterprise Data Warehousing for SAP NetWeaver 2004s FAQ|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c9f5fb91-0c01-0010-67a8-fd35946e9403]
    Thanks
    Chandran

  • Diff btwn Grid and cluster

    Hi,
    what is the exact difference btwn Grid and cluster?

    Read the following:
    Diff btwn Grid and cluster
    Simon

  • Diff Btwn 0CPQUABU  and 0QUANT_B on Inventory

    Hi Gurus,
    what is the Diff Btwn 0CPQUABU  and 0QUANT_B fields on Inventory Cubes.
    I see 0CPQUABU assigned to 0RECTOTSTCK on the update rules of 2LIS_03_BX .
    Any explaination on how the key figures , I mean stocks are calculated will be useful.
    Sree
    Message was edited by:
            SreeRama
    Message was edited by:
            SreeRama

    Vikash,
    In case of ATP you are including the order line quantity that is being entered into consideration for calculating ATP (on the fly) where as the item supply demand will consider only scheduled order lines.
    Also ATP check does the check for all the lines if the item has configuration (I believe). THis is not the case in the item supply demand. It is just doing the check only for that item.
    Also ATP can be global. If you want to check the availablity of the item across your supply and demand network, you can do that (Global Order Promising). Supply Demand is purely inventory function. ATP is planning function.
    These are few differences. There can be or are much more.
    Take a look at the ASO_ATP_INT to get an idea how to do this. This is used in quote and iStore where customers can check themselves when the product is available using the date.
    I suggest you use ATP functionality and not Supply demand logic.
    Thanks
    Nagamohan

  • Diff btwn contracts and scheduling agreements????

    hi buddies.....
    i have facing this question in lot of interviews but cant able to answer properly....
    plz gimme some interview point of view answers...
    thanks in advance...
    venkatesh.v

    Outline agreements in procurement can be 2 types:
    Contracts or Scheduling agreements.
    Contract is where you have a contract with the vendor,may be a for a predetermined quantity or predefined value. So everytime you need the matl, you need to make PO ref the contract asking for the delivery of the matl. In such instance when PO is ref with contract its called contract release orders or call off orders.
    Scheduling agreement is a long term purchase agreement, where you will keep issuing the delivery schedules whenever there is a change in requirement or at predetermined time intervals. The delivery schedule can be on hour/daily/weekly/monthly basis. But it will contain different zones viz. firm/tradeoff/Forecast. Firm zone schedules are confirmed requirement and need to be taken by ordered party. Tradeoff zone requirement is to purchase the raw materails and ordering party is liable to pay raw material cost, in case of requirement cancellation. Forecast zone requirement is to help the vendor to plan his requirements.
    SA is also an agreement with the vendor for the supply of matl, may be a quanity or value. The delivery dates will be maintained in ME38 ref the SA which are called delivery schedules.So you can maintain the delivery schedule and communicate the vendor on Forecase basis or JIT basis. And when you need some more matl then will only create SA deliveries using ME38. SA could be of 2 types:- without release documentation-system will transmit the delivery info to the vendor once you save the document.
    With release documentation- after creating the delivery schedules you need to create SA release using ME84.
    The main difference between contract and SA is volume of docs generated would be higher in contract since everytime you need to make a PO ref the contract and its time consuming, whereas SA can be integrated with MRP such that it automatically creates delivery schedules during MRP run provided if there is a requirement to the matl.
    Visit : http://help.sap.com/saphelp_srm30/helpdata/en/7d/0a093f7c392e5ae10000000a114084/content.htm

  • FFT and Overall Values Differ btwn VI and DIAdem

    Hi all,
    I have an application that displays live vibration readings including the spectrum and overall vibration level.  All my report generation is done in DIAdem scripts, so it's critical that any values calculated and displayed on the LabVIEW side match the values calculated and reported in DIAdem.  The attached VI and Script, when fed the input from the attached TDMS file, give me significantly different values for the magnitude of the FFT and overall RMS value.  Can anyone spot what I'm doing wrong?
    Thanks,
    Scott
    CLAD
    Solved!
    Go to Solution.
    Attachments:
    FFT and RMS Script.VBS ‏5 KB
    FFT and RMS VI.vi ‏39 KB
    VibrationSample.tdms ‏103 KB

    Hello,
    Here is a great reponse from R&D. I felt it would be better to place this on the web then keep it limited to your service request.
    The difference has to do with the Window-correction. The results are identical if you select rectangluar (or no) window.
    Usually a Window is taking a part of the singnal away, so in the first place, the result has a different shape and is smaller compared to result with rectangular window. This can be corrected with a specific factor for each window.
    There are two possible corrections. Random and periodic.
    - Periodic is used if you have pure sine-wave like signals and you want to measure the peak value. A typical use case is the flattop-window which is designed for this type of calculations.   The periodic correction is too large if you want to add the values to calculate the total RMS of the signal or of a the summation of a certain frequency band.
    - Random is correcting the signal back to the correct overall RMS value and should be used in all other cases.
    The periodic correction for the Hanning window is a factor of two. The random correction is about 1.633. DIAdem will give the same result as LabVIEW if you use the following correction type:
    FFTWndCorrectTyp = "periodic"
    In the world of FFT-analysis, the different corrections are very often not obvious and hidden to the user. Unfortunately this is also the case in LabVIEW. You can find a good example of an explanation here:
    http://blog.prosig.com/2009/09/01/amplitude-and-energy-correction-a-brief-summary/
    There are different factors for the different window functions. If you go deeper into the FFT-VI you will find the "Scaled Window VI". This has an output "window constants". With this, it is possible to get the correction values for the window functions.
    I also think, that periodic is wrong in most cases when Hanning is used, because Hanning is best for the summation of RMS values in frequency bands and the results are wrong without a random correction.
    Hope that helps.
    Jacob R. | Applications Engineer | National Instruments

  • Is can we develop MATCH btwn VBEP and VBFA, for data pulling?

    Hi Experts,
    I got a requirement, in which I hv to develop a report for the Open quantities for sales order items. fine.
    I ssue is that, in the report I hv to show at Schedule line level i.e. VBEP.
    So, by pulling the records from VBEP depending on the seldction criteria, I hv to pull the MATCHING record from VBFA for Post Goods Issue.
    Then, I hv to implememnt the follwoing formula,
    Open Quantity = VBEP, say Schedule line 1 quantity -(mnus) first saved corresponding Order, Item Quantitity-RFMNG in VBFA for PGI type
    As we know, VBEP is at Schedule line lvel, where as VBFA is ITEM level!!
    So, pls. let me know that,
    1 - Is really, we can develop the MATCH btwn VBEP and VBFA tbls, I mean, always, the data will be correctly pulled?
    2 - If so, Is the folllwoing statement is OK?
    LOOP AT IT_VBFA WHERE VBELV = IT_VBEP-VBELN and POSNV = IT_VBEP-POSNR and ERDAT LE IT_VBEP-MBDAT
    3 - Any other good statement for my requirement?
    Looks like, functional guy is also NOT much idea, here.
    Thanx
    Edited by: Srinivas on Jun 1, 2008 12:15 AM

    no reply

  • Creation of Sorted and Standard and Hashed Internal Tables ..

    Hi ..
    Pls  specify me.. how to create .. sorted ,Standard and Hashed Internal Tables...
    pls give me  the full code  regarding ...this ..
    Thnks

    Standard tables
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    Sorted tables
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    Hashed tables
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    Special Features of Standard Tables
    Unlike sorted tables, hashed tables, and key access to internal tables, which were only introduced in Release 4.0, standard tables already existed several releases previously. Defining a line type, table type, and tables without a header line have only been possible since Release 3.0. For this reason, there are certain features of standard tables that still exist for compatibility reasons.
    Standard Tables Before Release 3.0
    Before Release 3.0, internal tables all had header lines and a flat-structured line type. There were no independent table types. You could only create a table object using the OCCURS addition in the DATA statement, followed by a declaration of a flat structure:
    DATA: BEGIN OF <itab> OCCURS <n>,
    <fi> ...
    END OF <itab>.
    This statement declared an internal table <itab> with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.
    The number <n> in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering ‘0’ had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.
    The above statement is still possible in Release 4.0, and has roughly the same function as the following statements:
    TYPES: BEGIN OF <itab>,
    <fi> ...,
    END OF <itab>.
    DATA <itab> TYPE STANDARD TABLE OF <itab>
    WITH NON-UNIQUE DEFAULT KEY
    INITIAL SIZE <n>
    WITH HEADER LINE.
    In the original statement, no independent data type <itab> is created. Instead, the line type only exists as an attribute of the data object <itab>.
    Standard Tables From Release 3.0
    Since Release 3.0, it has been possible to create table types using
    TYPES <t> TYPE|LIKE <linetype> OCCURS <n>.
    and table objects using
    DATA <itab> TYPE|LIKE <linetype> OCCURS <n> WITH HEADER LINE.
    The effect of the OCCURS addition is to construct a standard table with the data type <linetype>. The line type can be any data type. The number <n> in the OCCURS addition has the same meaning as before Release 3.0. Before Release 4.0, the key of an internal table was always the default key, that is, all non-numeric fields that were not themselves internal tables.
    The above statements are still possible in Release 4.0, and have the same function as the following statements:
    TYPES|DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE DEFAULT KEY
    INITIAL SIZE <n>
    WITH HEADER LINE.
    They can also be replaced by the following statements:
    Standard Tables From Release 4.0
    When you create a standard table, you can use the following forms of the TYPES and DATA statements. The addition INITIAL SIZE is also possible in all of the statements. The addition WITH HEADER LINE is possible in the DATA statement.
    Standard Table Types
    Generic Standard Table Type:
    TYPES <itab> TYPE|LIKE STANDARD TABLE OF <linetype>.
    The table key is not defined.
    Fully-Specified Standard Table Type:
    TYPES <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE <key>.
    The key of a fully-specified standard table is always non-unique.
    Standard Table Objects
    Short Forms of the DATA Statement :
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>.
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH DEFAULT KEY.
    Both of these DATA statements are automatically completed by the system as follows:
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE DEFAULT KEY.
    The purpose of the shortened forms of the DATA statement is to keep the declaration of standard tables, which are compatible with internal tables from previous releases, as simple as possible. When you declare a standard table with reference to the above type, the system automatically adopts the default key as the table key.
    Fully-Specified Standard Tables:
    DATA <itab> TYPE|LIKE STANDARD TABLE OF <linetype>
    WITH NON-UNIQUE <key>.
    The key of a standard table is always non-unique.
    Internal table objects
    Internal tables are dynamic variable data objects. Like all variables, you declare them using the DATA statement. You can also declare static internal tables in procedures using the STATICS statement, and static internal tables in classes using the CLASS-DATA statement. This description is restricted to the DATA statement. However, it applies equally to the STATICS and CLASS-DATA statements.
    Reference to Declared Internal Table Types
    Like all other data objects, you can declare internal table objects using the LIKE or TYPE addition of the DATA statement.
    DATA <itab> TYPE <type>|LIKE <obj> WITH HEADER LINE.
    Here, the LIKE addition refers to an existing table object in the same program. The TYPE addition can refer to an internal type in the program declared using the TYPES statement, or a table type in the ABAP Dictionary.
    You must ensure that you only refer to tables that are fully typed. Referring to generic table types (ANY TABLE, INDEX TABLE) or not specifying the key fully is not allowed (for exceptions, refer to Special Features of Standard Tables).
    The optional addition WITH HEADER line declares an extra data object with the same name and line type as the internal table. This data object is known as the header line of the internal table. You use it as a work area when working with the internal table (see Using the Header Line as a Work Area). When you use internal tables with header lines, you must remember that the header line and the body of the table have the same name. If you have an internal table with header line and you want to address the body of the table, you must indicate this by placing brackets after the table name (<itab>[]). Otherwise, ABAP interprets the name as the name of the header line and not of the body of the table. You can avoid this potential confusion by using internal tables without header lines. In particular, internal tables nested in structures or other internal tables must not have a header line, since this can lead to ambiguous expressions.
    TYPES VECTOR TYPE SORTED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    DATA: ITAB TYPE VECTOR,
    JTAB LIKE ITAB WITH HEADER LINE.
    MOVE ITAB TO JTAB. <- Syntax error!
    MOVE ITAB TO JTAB[].
    The table object ITAB is created with reference to the table type VECTOR. The table object JTAB has the same data type as ITAB. JTAB also has a header line. In the first MOVE statement, JTAB addresses the header line. Since this has the data type I, and the table type of ITAB cannot be converted into an elementary type, the MOVE statement causes a syntax error. The second MOVE statement is correct, since both operands are table objects.
    plz reward if useful

  • Diff betn. Oracle8i Standard and Enterprise edition

    Can someone tell me the difference between Oracle8i Standard and Enterprise edition ?
    Thanks.

    Here's the Oracle white paper on the subject...
    http://otn.oracle.com/products/oracle9i/pdf/9idb_rel2_prod_fam.pdf
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Help needed for storing and sorting objects.

    Hello
    I have an assignment and it is to create a guessing game, here is the question,
    In this assignment you are to write a game where a user or the computer is to guess a random
    number between 1 and 1000. The program should for example read a guess from the keyboard, and
    print whether the guess was too high, too low or correct. When the user has guessed the correct
    number, the program is to print the number of guesses made.
    The project must contain a class called Game, which has only one public method. The method must
    be called start(), and, when run it starts the game. The game continues until the user chooses to
    quit, either at the end of a game by answering no to the question or by typing 'quit' instead of a
    guess. After each game has been played, the program is to ask the user for a name and insert this
    together with the number of guesses into a high score list. When a game is started the program
    should print the entire high score list, which must be sorted with the least number of guesses first
    and the most last. Note, the list must be kept as long as the game-object is alive!
    each score also
    consists of the game time. In case there are two high scores with the same number of guesses, the
    game time should decide which is better. The game time starts when the first guess is entered and
    stops when the correct guess has been made. There should also be input checks in the program so
    that it is impossible to input something wrong, i.e. it should be impossible to write an non-numeric
    value then we are guessing a number, the only allowed answers for a yes/no question is yes or no,
    every other input should yield an error message an the question should be printed again.
    I understand how to code most of it, except I am not sure how to store the playerName, playerScore, playerTime and then sort that accordingly.
    I came across hashmaps, but that wont work as the data values can be the same for score.
    Is it only one object of lets say a highScore class, and each time the game finishes, it enters the values into an arrayList, I still dont understand how I can sort the array all at once.
    Should it be sorted once for score, then another array created and sorted again, I dont get it I am confused.
    Please help clarify this.

    Implode wrote:
    We had the arrayList/collections lecture today.
    I asked the teacher about sorting objects and he started explaining hashmaps and then he mentioned another thing which we will only be learning next term, I'm sure we must only use what we have learned.
    How exactly can this be done. I have asked a few questions in the post already.
    ThanksWell, there was probably a gap in the communication. Hash maps (or hash tables, etc.) are instance of Map. Those are used to locate a value by its unique key. Generally, to speed up access, you implement a hashing function (this will be explained hopefully in class). Think of name-value pairs that are stored where the name is unique.
    Contrast this with items that are sorted. Any List can be sorted because its elements are ordered. An ArrayList is ordered, generally, by the order you inserted the elements. However, any List can be given its own ordering via Comparable or Comparator. You can't do this with an ordinary Map. The purpose of a Map is speedy access to the name-value pairs, not sorting. The List likewise has different purposes, advantages, disadvantages, etc. List can be sorted.
    A Map is generally similar to a Set. A Set is a vanilla collection that guarnatees uniqueness of each element (note, not name-value pairs, but simple elements). There is one concrete class of Map that can be sorted, TreeMap, but I doubt your professor was referring to that. The values or the keys can be returned from the Map and sorted separately, but again, I doubt he was referring to that.
    Take a look at the Collections tutorial here on this site or Google one. It is fairly straightforward. Just keep in mind that things (generally) break down into Set, Map and List. There are combinations of these and different flavors (e.g., Queue, LinkedHashMap, etc.) But if you can learn how those three differ, you will go a long way towards understanding collections.
    (Oh, and be sure to study up on iterators.)
    - Saish

  • Standard and Detailed Profitability

    Hello Gurus
    I am a newbie in HPCM.
    I am aware that there are standard and detailed HPCM available,
    standard HPCM uses Essbase while detailed HPCM uses a relational database.
    What are the Pros and Cons and major differences for these two?
    Thank you very much for your time!
    Regards
    K

    Table type
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be UNIQUE or NON-UNIQUE. Standard tables and sorted tables are known generically as index tables.
    Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    http://help.sap.com/saphelp_erp2005/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/frameset.htm
    Please award points

  • COLLECT: Which table is better to use - STANDARD or SORTED?

    Hello Performance gurus,
    I read this curious fact about COLLECT statement:
    In standard tables that are filled using COLLECT only, the entry is determined by a temporary hash administrator. The workload is independent of the number of entries in the table. The hash administrator is temporary and is generally invalidated when the table is accessed to be changed. If COLLECT statements are specified after an invalidation, a linear search of all table rows is performed. The workload for this search increases in a linear fashion in relation to the number of entries.
    In sorted tables, the entry is determined using a binary search. The workload has a logarithmic relationship to the number of entries in the table.
    In hashed tables, the entry is determined using the hash administrator of the table and is always independent of the number of table entries.
    So does this mean if we're populating a table using COLLECT we should prefer STANDARD over SORTED(due to the HASH administration)? Is there any performance overload while setting up the temporary hash administrator for STANDARD tables?
    Please enlighten me.
    BR,
    Suhas

    Actually I have just noticed I already had created a test program for this somewhere in the past.
    Here are the results:
    STANDARD            1.091.295
    SORTED              3.159.771
    HASHED                994.101
    If for the STANDARD table you somehow destroy the hash administration (in this case it was done in the beginning by APPENDing one record):
    STANDARD            2.255.905
    SORTED                 14.013
    HASHED                  8.022
    (this 2nd execution was with less rows that the 1st execution, otherwise for the standard table it would take too long).
    So this does prove that standard tables can be faster than sorted tables in that special case, but again I would not rely on that.
    Rui Dantas

  • Contacts Display and Sort by Company Name

    I have over 1000 contacts in Outlook which synced wonderfully with my new iPhone.
    Alas, I need to lookup and sort by Company Name. This is a VERY standard method for contacts. The options presented by iphone are first and last name, sigh and tech support had no suggestions and the helpful tech support genttleman could find no 3rd party applications which could help.
    Help!
    I relly like my iPhone, but I need to be able to look up contacts and notes by company.
    Thanks

    I have noticed something useful when entering contacts directly into my iPhone. When entering a contact that I want shown in the list by the company name, I enter the company name first (without entering the "first name" and "last name") and save it. If you do it that way, the little square where the photo would be will change from the blank head to some buildings, and the contact will be listed by the company name. You can then go back and edit to add a first and last name and it will stay listed by company name.
    However, if you enter the last name, first name, and company name all at the same time it will list the entry by the "last name" instead of by the company.
    For example, if I want my son's doctor's office to display as "Arizona Pediatrics" instead of "Dr. John Smith" in the contact list, I would enter the Arizona Pediatrics first, save, and then go back in and add the Dr. John Smith in the last name, first name fields.
    I need to check the manual to see if this is detailed, as I stumbled on it accidentaly, but it's pretty useful.
    -SB

  • Can we pass IT table name dynamically to READ and SORT stmt

    Hello All,
      i have a requirement in which i am passing table name using a variable and want to read the same table: so my question is can we execute read and sort stmt with dynamic IT name. please see below for explaination.
    v_itname = <it_2>.
    now read using variable
    READ table ( v_itname ) with key <field>.
    and
    SORT ( v_itname ) by (otab).
    thanks
    Mani

    Hi ,
    This can be done. Please refer to the  codes below. Please note that the code will work if the itabs are of type standard table else it may dump.
    You just need to replace the variables form the values from your internal table.
    DATA: v_table1(10) TYPE c VALUE 'I_MARA',
          v_field(10)  TYPE c VALUE 'MATNR',
          i_mara TYPE STANDARD TABLE OF mara.
    FIELD-SYMBOLS : <fs_tab>   TYPE STANDARD TABLE,
                    <fs_field> TYPE ANY.
    DATA: otab TYPE abap_sortorder_tab,
    oline TYPE abap_sortorder.
    SELECT * UP TO 10 ROWS
      FROM  mara
      INTO TABLE i_mara.
    IF sy-subrc = 0.
      ASSIGN (v_table1) TO <fs_tab>.
      IF sy-subrc = 0.
        oline-name = v_field.
        APPEND oline TO otab.
        SORT <fs_tab> BY (otab).
        READ TABLE <fs_tab>
        WITH KEY (v_field) = '000000000020000989' "
        BINARY SEARCH
        TRANSPORTING NO FIELDS.
        IF sy-subrc = 0.
        ENDIF.
      ENDIF.
    ENDIF.
    Regards,
    Dev.

Maybe you are looking for

  • How to get the current week from sysdate?

    Hi sir, i want to know how to get the current week from sysdate? thanks

  • How to remove IOS 8 from ipad?

    How to revert to ios7 from IOS 8 on iPad?

  • Screen sharing disappears

    So I have Remote Management turned on for all of our in house machines so I can diagnose remotely. From one of the workstations I work on, sometimes when I go to my network list of machines and some of the machines are missing. If i click a computer

  • DST patch for Solaris 8

    can't install the new patch 109809-06 the system replies that the patch already exists. verifying the installed patch is 109809-01 my guess is that they both are the same although the revision is different. what can we do for DST on March 11 this wil

  • IPod nano (4th gen) plays any song for 40 seconds, then stops

    Strange behaviour from my 4th gen iPod nano: 1. When plugged into Logitech iPod dock, plays any song selected for 40 seconds, then stops. Hit play, it plays for another 40 seconds, then stops again. (Logitech iPod dock works fine with my wife's iPod