What type of internal table should I use based from my scenario...

Hello Experts,
I am currently having a dillema here because I am trying to optimize a certain
part of a report where in the internal table contains around 300,000 lines of
records. The original internal table is of type standard table. So what the original
programmer did was to delete certain records in a given condition then sort it
by fields 1 and 2 in ascending order. Now, it then loops through that internal table
but gives run time error because it exceeded the limit in our prod server which is only 10 mins.
Now what I did was to try modifying the internal table to make it of type sorted. This is to eliminate
the sort statement. I dont know if what I am doing is right. Help would be greatly appreciated and
rewarded. Thanks a lot guys and take care!

Hi,
types: begin of t_itab,
         field1  like pa0001-pernr,
         field2  like pa0001-ename,
       end   of t_itab.
data: ls_itab  type t_itab,
      lt_itab  type  hashed table of t_itab  with unique key field1 field2.
  select pernr ename into table lt_itab  from pa0001.
  loop at lt_itab.
    <<<<< your logic
  endloop.
aRs

Similar Messages

  • What type of hard disk should I use if I want to use it on mac and windows?

    Hey Forum,
    I am using windows xp on my macbook (snow leopard). I came across some dealers who say that there are hard disks for mac only and for both mac and windows. So, I wanted to buy a hard disk so that I can use it both on mac and windows xp, so what type of hard disk should I use? Must I partition into 2?
    or are there any harddisk in the market which is compatible for both mac and windows xp without screwing up the format(NTFS/Mac OS X Journaled)? Pls look into this matter and help me with it.
    All of your replies and suggestions is much appreciated.
    Thank you.
    Ala.

    Run, don't walk, from that dealer! and never look back
    Once in a very long while Apple will have customized firmware on drives, and it is possible to find SCSI/SAS or drives that are destined to be used with high end storage controllers.
    But that is the exception that makes the rule.
    SATA is SATA. Though.... there are now SATA III drives that don't work in XP, or that need a jumper, and Seagate and some drives have managed to deliver firmware that has caused trouble... and Apple has had to issue firmware updates to help compatibility....

  • What type of vga cord should i use?

    I just purchased a mac mini and it is on its way. I have a 22'' memorex lcd tv and it has a VGA plug in. What type of vga cord should i use? Theres male to male and theres male to female. Which cord should i use and does any1 know a site i can order it off of?
    Mac Mini   Mac OS X (10.4.8)  

    i just did a quick google search for for dvi to vga cables, without the use of an adapter...
    http://www.google.com/search?hl=en&q=dvito+vga+cable-adapter&btnG=Search
    the first site that came up...
    http://www.datapro.net/products/1145.html
    these cables would allow you to hook up the monitor without using the adapter... would just save a little bit of space if depth is at all an issue, or the visibility of the cable sticking out that far back.

  • What type of blank DVD should I use to record photo images that are on my drive E

    I own a HP Pavilion dv5000 with an RW DVD + R DL multi recorder.  My question, which type of blank DVD should I use to record images that are on my drive E?  I can record without problems on a CR-R but when I try a blank DVD-R it won't work.  Please advise.

    Hi,
    Back to the good old days, HP supported only DVD +R discs, some vendors supported DVD -R discs. Now all vendors support both. You may want to try blank DVD +R. Hope this works. Please post back the result.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • What type of internal drive should I get for my Mac Pro?

    I want to buy a large internal hard drive for my Intel Mac Pro.
    1. What type do I need to get? What do I need to look for as far as specs?
    2. Anyone know what the largest sized one I can put inside it is?
    Thanks.

    Some drives over 2.2TB started using blocks 4K in size instead of the traditional 1/2K sized blocks. That does not sound like a Big Deal, but it changes the Error Correcting Codes needed and means a new data-separation algorithm inside the drive.
    For Operating Systems, it means that you want the smallest block to be 4K instead of 1/2K, because allocating blocks on 1/2K bound will give you logical blocks that split across physical blocks, which will be s-l-o-w.
    Mac OS designers saw that stuff coming and changed the software to accomodate it. They included it with other changes in GUID partition map, which worked well at 10.4.6 and later.

  • What type of hard disk should i use

    I have a  imac 27 inch late 2013 , 3,5mhz  Intel i7.
    I want to get a hard disk to store photos and others.
    what do you suggest.
    Thanks

    I am going to assume you already have at least 1 high quality backup disk. If you do not that should be your #1 priority. NEVER use a backup disk to also store data files though!!!
    However back to your original question and off my soapbox! Many experienced users on these forums prefer OWC (www.macsales.com) Mercury Elite Pro series of EHD. Very high quality, reasonable cost and excellent service. Here is the link to get you started:
    http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB

  • What type of email service should I use to verify my account? hotmail, yahoo, gmail ect...

    Basically over the past week or so i have been having problems with my apple ID. I have created more than 3 apple ID's due to verification problems (i verified my ID 3 times yet it said i didn't when i tried to log in on app world) so i have log into mail with all my accounts and now my iPad says that i have used to many accounts

    All account maintenance is done using your Adobe ID and signing in at Adobe
    For anything else, you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • What iOS Developer Program license should be used?

    What iOS Developer Program license should be used for the following scenario: our company wants to develop an app to be distributed among employees, our subsidiaries, our service/sales partners (distributors of our products) and finally end-users. The app is primarily aimed at end-user of our product.  We don't want to provide that app via the iTunes App store to general public , but rather only to users, that are well-known to our company or to our sales/service partners.  These users already have one of our products.
    Is such a scenario feasible at all? Comparing iOS Developer and iOS Developer Enterprise it looks like applications can be distributed either through the App Store or through enterprise deployment limited to a company's employees only. Please advise. Thanks!

    If you can reach these forums here, you can reach those links.
    Apps for employees...Enterprise Program.
    Everything else....Individual Program. See the App Store Review Guidelines for iOS Apps for restrictions and cases where apps may be rejected, otherwise.

  • What is the maximal line length of type any internal table

    Dear all,
    who can tell me what is the maximal line length of type any internal table.
    Thanks!

    There is no limit to the record length of an internal table.
    There is overall memory limit for every program (as setup by your basis). So, depending on the width of the ITAB, the number of records in ITAB is limited by the assigned memory.

  • What are dyanmic internal tables and what s the exact use of forall entries

    what are dyanmic internal tables and what s the exact use of forall entries?

    hi,
    <u><b>dynamic internal table.</b></u>
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci912390,00.html
    http://www.sap-img.com/ab030.htm
    <u><b>
    FOR ALL ENTRIES</b></u> is an effective way of doing away with using JOIN on two tables.
    You can check the below code -
    SELECT BUKRS BELNR GJAHR AUGDT
    FROM BSEG
    INTO TABLE I_BSEG
    WHERE BUKRS = ....
    SELECT BUKRS BELNR BLART BLDAT
    FROM BKPF
    INTO TABLE I_BKPF
    FOR ALL ENTRIES IN I_BSEG
    WHERE BUKRS = I_BSEG-BUKRS
    AND BELNR = I_BSEG-BELNR
    AND BLDAT IN SO_BLDAT.
    *******************************8
    look another example
    what is the use of FOR ALL ENTRIES
    1. INNER JOIN
    DBTAB1 <----
    > DBTAB2
    It is used to JOIN two DATABASE tables
    having some COMMON fields.
    2. Whereas
    For All Entries,
    DBTAB1 <----
    > ITAB1
    is not at all related to two DATABASE tables.
    It is related to INTERNAL table.
    3. If we want to fetch data
    from some DBTABLE1
    but we want to fetch
    for only some records
    which are contained in some internal table,
    then we use for alll entries.
    1. simple example of for all entries.
    2. NOTE THAT
    In for all entries,
    it is NOT necessary to use TWO DBTABLES.
    (as against JOIN)
    3. use this program (just copy paste)
    it will fetch data
    from T001
    FOR ONLY TWO COMPANIES (as mentioned in itab)
    4
    REPORT abc.
    DATA : BEGIN OF itab OCCURS 0,
    bukrs LIKE t001-bukrs,
    END OF itab.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    itab-bukrs = '1000'.
    APPEND itab.
    itab-bukrs = '1100'.
    APPEND itab.
    SELECT * FROM t001
    INTO TABLE t001
    FOR ALL ENTRIES IN itab
    WHERE bukrs = itab-bukrs.
    LOOP AT t001.
    WRITE :/ t001-bukrs.
    ENDLOOP.
    Hope this helps!
    Regards,
    Anver

  • Does anybody know if the ipad air 1 is using yosemite or something different? I don't know what type of safari i should install because it disappeared from the ipad. Thanks!

    Does anybody know if the ipad air 1 is using yosemite or something different? I don't know what type of safari i should install because it disappeared from the ipad. Thanks!

    YYosemite is a Mac OS and it doesn't run on an iPad. You cannot delete or install Safari on the iPad. It is on your device somewhere.
    Swipe from screen to screen to look for it.
    Check Settings>General>Restrictions and make sure that you didn't disable it.
    You can also reset the home screen layout and the icon will reappear - but the home screen will return to the way that it looked when you first activated your iPad. Settings>General>Reset>Reset Home Screen Layout.

  • Types of internal tables - More explanation(urgent)

    hi friends,
                I wanted to explore diiferent types of internal table. when i went through the SAP.Help.Com for this , i wasnot able to get a clear idea of those 4 types of tables
    Mainly i wanted to know
    what is 1.standard table
            2.Hashed Table
            3.Sorted Table
            4. Index tables..
    what are the advantages of these table and please explain me a scenario for when under what circumstances we would use these?
    please reply me soon as i need to submit my documents reagarding this.
    Thanks in advance
    Thanks&Regards
    Prasanna.

    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.

  • Types of internal tables with regard to EFFICIENCY

    Will any one tell me syntax to define each type of internal table  (standard, sorted , hashed , database) . how to compare their efficincy ( access time which is more effficent) is there any documantation or programme of such type exist then please tell  . i want to declare each type of above table and also to compare them w.r.t to efficeny thanks  want urgent reply

    Hi,
    There are 3 types of Internal tables.
    Standard Internal Tables:
    Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
    This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command). The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to the number of table entries.
    Sorted Internal Tables:
    Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship 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, and you must specify either UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables both belong to the generic group index tables.
    This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
    Hashed Internal Tables:
    Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
    This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
    using internal tables that are similar to database tables.
    http://help.sap.com/saphelp_470/helpdata/EN/fc/eb35de358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Kiran Sure

  • Difference between line type and internal table?

    Hi..
    I wanted to know, what is the difference between Line type and Internal Table?

    Hi,
        Before the 4.7 release in SAP if we want to define an internal table we have to write the defination using the occurs statement and we need to define all the fields using INCLUDE STRUCTURE or indidually all the fields ine by one.
    From 4.7 release of R/3 SAP introduced the Line type concept and it's part of the ABAP OOPS concept. for internal table defination we don't need to use the occur statements. Instead INCLUDE structure  we need to create a Line type for that structure in Se11 and then we can define the internal table like :
    DATA : ITAB TYPE TABLE OF <LINE_TYPE>.
    Only thing is this table will be  a table without header. So for internal table processing we need to define a work area structure of type line of line type  . EX:
    DATA: WA_ITAB TYPE LINE OF <LINE_TYPE>.
    Hope this helps.
    Thanks,
    Greetson

  • Hi I want to know the difference between the type of internal tables.

    I know the types of internal table but i dont know the difference between them can any one explain me in simple sentence.

    Hi,
    <b>Standard Internal Tables</b>
    Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
    This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command). The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to
    the number of table entries.
    <b>Sorted Internal Tables</b>
    Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship 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, and you must specify either UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables both belong to the generic group index tables.
    This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of
    table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
    <b>Hashed Internal Tables</b>
    Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
    This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
    using internal tables that are similar to database tables.

Maybe you are looking for