Max no. of entries in an internal table?

Max no. of entries in an internal table?

Hi,
You can specify the initial amount of main memory assigned to an internal table object when you define the data type using the following addition:
INITIAL SIZE <n>
This size does not belong to the data type of the internal table, and does not affect the type check. You can use the above addition to reserve memory space for <n> table lines when you declare the table object.
When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each are then allocated.
You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The space occupied, depending on the line width, is 16 <= <n> <= 100.
It only makes sense to specify a concrete value of <n> if you can specify a precise number of table entries when you create the table and need to allocate exactly that amount of memory
(exception: Appending table lines to ranked lists). This can be particularly important for deep-structured internal tables where the inner table only has a few entries (less than 5, for example).
To avoid excessive requests for memory, large values of <n> are treated as follows: The largest possible value of <n> is 8KB divided by the length of the line. If you specify a larger value of <n>, the system calculates a new value so that n times the line width is around 12KB.
Regards,
Bhaskar

Similar Messages

  • Using for all entries of two internal tables in where clause of the select

    Hi experts,
    My requirement is, need to select Marc-minbe and wrpl-sobst, for all the entries of the two internal tables it_mara , and it_t001w.
    here is the select queries i have used,
    select matnr normt from  mara into it_mara for all entries in it_data where normt = it_data-normt.
    select konnr werks from t001w into it_t001w for all entries in it_data where konnr = it_data-konnr.
    now i need to select minbe of marc table and sobse of wrpl table for all the entries of above internal tables, it_mara and it_t001w, using both matnr of it_mara and werks of it_t001w in where condition.
    Pls advise how i can do it.
    Thanks.
    Moderator message: very basic, please work on this yourself first, these forums are not a substitute for ABAP training.
    Edited by: Thomas Zloch on Dec 6, 2010 9:38 AM

    Hi
    call SE16 with table TFTIT in order to get a full list (it will be long...)
    A list of FMs with parameters can be found in table FUNCT.
    Finally go to sm37rsdf4
    that will give you all the function modules with description
    Here is the list:
    http://www.erpgenie.com/abap/functions.htm
    hope this helps...
    Regards
    CSM Reddy

  • Summarizing entries of the Internal table

    Hi All Experts!!
    I have problem regarding summarizing of the entries of the internal table.I want the amount field of the entries be summed based on 3  fields of table rkst skst rkstar.It means that summation be carried out if the set of these 3  fields are same.If there is different set new entry will be created.
    Here I want to summarize itab gt_yrepost2.
      LOOP AT gt_yrepost2 INTO gwa_yrepost2.
        sum_amount = sum_amount + gwa_yrepost2-amount
    be summed for repeating sets of 3 fields*****
          lwa_sum_yrepost2-amount = sum_amount.
          lwa_sum_yrepost2-kokrs = gwa_yrepost2-kokrs.
          lwa_sum_yrepost2-belnr = gwa_yrepost2-belnr.
          lwa_sum_yrepost2-buzei = gwa_yrepost2-buzei.
          lwa_sum_yrepost2-kstar = gwa_yrepost2-kstar.
          lwa_sum_yrepost2-bukrs = gwa_yrepost2-bukrs.
          lwa_sum_yrepost2-pbukrs = gwa_yrepost2-pbukrs.
          lwa_sum_yrepost2-tcurr = gwa_yrepost2-tcurr.
          lwa_sum_yrepost2-skst = gwa_yrepost2-skst."field1
          lwa_sum_yrepost2-rkst = gwa_yrepost2-rkst."field2
          lwa_sum_yrepost2-rkstar = gwa_yrepost2-rkstar."field3
          lwa_sum_yrepost2-txt = gwa_yrepost2-txt.
          APPEND lwa_sum_yrepost2 TO gt_sum_yrepost2.
    It means that if there is change in set of key fields new entry will be created. Else the entries will be summed to a single entry.In this example gt_sum_yrepost2 contained the summed(summarized) entries.
    The positive thing here is that if for one set of these fields the other values will be same.Hence other fields will take value of any of the repeating entries(with repeated set).
    Please help in this regards..
    Thanks in Advance....
    Prabhas.
    Edited by: PRABHAS jha on Jan 25, 2008 4:34 PM

    Hi Prabhas ,
    You could use Collect statement instead of Append.
    Thanks
    Rekha

  • Number of entries in the internal table for perticular field value

    hi All,
    Is this possible to get the count of records from the internal table for a perticular field value.
    currently my requirement is to get the entries from the internal table which does not have two records for perticular field value (say a = 123) whose status is active (say b = 'X').
    also suggets should use LOOP or DELETE or DESCRIBE for a internal table to ful fill this requirement.
    Thanks in advance.
    Pradeep

    Try like this..
    Create another table itab2 with same structure as itab1 & move the contents of itab1 to itab2
    ITAB2[] = ITAB1[].
    Then delete entries from itab2
    Delete itab2 whete a = '123' and b = 'X'
    Then use Describe statement to get the no of entries
    Describe table itab2 lines v_lines.
    Hope this helps...

  • Extract Cube data for all entries of an internal table

    Hi
    I want to fetch the data from the cube for all entries of another internal table.
    Scenario : Fetching the COMPANY_CODE and DATE into an internal table and for those company codes and Dates, I have to fetch the records of the Cube.,
    I am using the Function Module : RSDRI_INFOPROV_READ
    But not sure how to accommodate the multiple selections condition for this.
    Selection Required:
                                    *For all entries of it_cc
                                      where comp_code = it_cc-comp_code and
                                                  date = it_cc-date.*
    Please help me how to such multiple conditions and "for all entries" functionality for fetching the data from the cube.
    Thanks.
    Veera Karthik G

    HI
    You can try like this
    LOOP AT lt_donotcall_old .
    <ls_donotcall>-examination_date = sy-date.
    <ls_donotcall>-examination_time = sy-time.
    ENDLOOP.
    append it_donotcall_old.
    Reward all helpfull answers
    Regards
    Pavan

  • Count of entries in an Internal table

    Hi all,
    Can anyone give me a code as to how to get the count of entries in an internal table??
    Regards
    Sukanya

    Hi,
    with
    data: count type i.
      DESCRIBE TABLE it_table LINES count.
    will get the number of entries in a table,
    regards,
    Stefan Huemer

  • Max number of records in an internal table

    Hi,
    Can any one tell me what is the Max Number of records we can get into an internal table.
    if you have any link of sap help on this please FWD.
    thanks in Adv.
    Regards,
    Lakshmikanth.T.V

    Hi lakshmikanth,
    Internal Tables as Dynamic Data Objects
    Internal tables are always completely specified regarding row type, key and access type. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    regards,
    keerthi.

  • How to find min and max of a field from sorted internal table

    Hi,
    I have sorted Internal Table by field f1.
    How do I find max and min value of f1.
    For min value of f1 I am using,
    READ TABLE IT1 INDEX 1.
    IT1-F1 = MIN.
    Is this correct? And how do I find the max value of f1 from this table.
    Thanks,
    CD

    Yes, that is right, and you can get the max like this.
    data: lv_lines type i.
    * get min
    READ TABLE IT1 INDEX 1.
    MIN  = IT1-F1.
    * get max
    lv_lines = lines( it1 ).
    read table it1 index lv_lines.
    MAX  = IT1-F1.
    Regards,
    Rich Heilman

  • Need clarification to sum the entries in a internal table

    Hi Gurus ,
            Below i have written the logic for have the count of number of records in the internal table along with it i need to find the Total dollar amount of all the records .
    iam not sure how to have that total .
    please provide me the solution .
    you can see at the bottom the where i tryed to sum .
    LOOP AT IT_BKPF.
    *AP ENTRIES
        IF ( ( IT_bkpf-yke_awsys <> ' ' ) AND
                ( It_bkpf-ldgrp = '0L' OR It_bkpf-ldgrp = ' ' ) AND
                 ( IT_BKPF-BLART EQ 'N1' OR IT_BKPF-BLART EQ 'N2' OR IT_BKPF-BLART EQ 'LP' OR
                   IT_BKPF-BLART EQ 'TK' OR IT_BKPF-BLART EQ 'L5' OR IT_BKPF-BLART EQ 'L6' OR
                   IT_BKPF-BLART EQ '1A' OR IT_BKPF-BLART EQ '1B' OR IT_BKPF-BLART EQ '1C' OR
                   IT_BKPF-BLART EQ '1D' OR IT_BKPF-BLART EQ '1E' OR IT_BKPF-BLART EQ '1F' OR
                   IT_BKPF-BLART EQ '1G' OR IT_BKPF-BLART EQ '1H' OR IT_BKPF-BLART EQ '1I' OR
                   IT_BKPF-BLART EQ '1J' OR IT_BKPF-BLART EQ '1K' OR IT_BKPF-BLART EQ '1L' OR
                   IT_BKPF-BLART EQ '1M' OR IT_BKPF-BLART EQ '1N' ) ).
       CLEAR : COUNT_AP_0L ,V_COUNT_AP_0L.
          READ TABLE It_bseg WITH KEY BUKRS = IT_BKPF-BUKRS
                                      BELNR = IT_BKPF-BELNR
                                      GJAHR = IT_BKPF-GJAHR
                                      BINARY SEARCH.
          LOOP AT IT_BSEG FROM SY-TABIX.
            IF IT_BSEG-BUKRS <> IT_BKPF-BUKRS.
           OR IT_BSEG-BELNR <> IT_BKPF-BELNR
           OR IT_BSEG-GJAHR <> IT_BKPF-GJAHR.
              EXIT.
            ENDIF.
            IF SY-SUBRC IS INITIAL .
          COUNT_AP_0L = COUNT_AP_0L + 1.
          MOVE COUNT_AP_0L TO V_COUNT_AP_0L .
          AT END OF DMBTR.
          SUM.
          ENDAT.      ENDIF.
          ENDLOOP.
    Thanks ,
    vinay

    Hi,
    Use the sum statment after AT LAST.  statment.
    regards,
    Santosh Thorat.

  • Summarizing entries of the Internal table--Urgent..plz help

    Hi All!!
    I have an internal table containing fields f1, f2 ,f3 ..f8.
    I want to summarize the entries based on three fields of table f1,f2 and f3.These fields are numeric fields.The other fields have numeric and non numeric fields.One of the field f4 is quantity field which needs to summed.
    For example the contents:
    1 2 3 4 A 5 6 7
    1 2 3 4 A 5 6 7
    1 2 3 4 B 5 6 7
    3 4 5 5 D 5 6 7
    3 4 5 6 D 5 6 7
    will be summarized as
    1 2 3 8 A 5 6 7
    1 2 3 4 B 5 6 7
    3 4 5 11 D 5 6 7
    4th field is quantity field.It is assumed that if the first 3 fields are same all others numeric field will be same.Non numeric may be different.
    Please help in this regard..
    Thanks in advance..
    Prabhas.

    Hi Prabhas,
    Decalre your internal table of type HASHED. < See F1 to declare such a table>. with key fields as all the character fields.
    Then when you are making the entry in your table Use Collect statement.
    like Collect itab.
    This should give you the required results.
    Use table declaration as Hashed Table only.
    Use F1 to get details, In case you need code I can give the same as well.
    Hope this helps.
    Happly Learning!
    Regards,
    Lalit

  • For all entries with 2 internal table

    HI experts.
    How to use  2 for all entries in a select statement.
    Below refer to my below code.
    select vbeln matnr lfimg vgbel posnr from lips into corresponding fields of table
      it_lips for all entries in  it_likp   where
                  vbeln = it_likp-vbeln and
                  matnr = it_mara-matnr.
    I want to add another for all entries it_mara.
    Please help me .Thanks in advanced.

    hi,
    it is possible....
    use this query...
    declare another internal table of the same type as it_lips.
    data : it_lips_final like it_lips.
    select vbeln matnr lfimg vgbel posnr from lips into corresponding fields of table
    it_lips for all entries in it_likp where
    vbeln = it_likp-vbeln .
    loop at it_lips.
      read table it_mara into it_mara with key matnr = it_lips-matnr.
      if sy-subrc = 0.
        append it_lips to it_lips_final.
      endif.
    endloop.
    refresh it_lips[].
    it_lips[] = it_lips_final[]
    what the above code does is selects all the entries of vbeln from lips and filters it in the loop reading it from mara checking for matnr value and finally
    all the entries according to your requirement is there in it_lips_final which we move it to it_lips again...
    this is something similar to writing a for all entries for 2 table.... but in another fashion
    Regards
    Siddarth

  • Usage of 'Select for all entries' for dynamic internal tables..

    Hi all,
    I have a situation where I need to use select for all entries for a dynamic internal table.
    select * from /BIC/AZHSD_O1500 into i_table for all entries in <b>Dynamic_table</b> where doc_number = <dynamic_table????????>
    here iam not knowing how to match the <dynamic_table????????> doc_number ?
    the dynamic_table contains the doc_number as one field.
    here dynaimc_table is the internal table which is dynamic.
    I have tried various options but couldnot find the solution.
    Please resolve.
    Sidhartha.

    data : i_dyn_where type char72 occurs 0.
    field-symbols : <fs> type table.
    assign itab[] to <fs>.
    i_dyn_where = 'docno = <fs>-docno'.
    append i_dyn_where.
    select *
    from   vbak
    into   table t_vbak
    for    all entries in <fs>
    where  (I_dyn_where).   "Populate this where condition dynamically too
    Hope this will solve ur prob.

  • HANDLING MULTIPLE ENTRIES IN THE INTERNAL TABLE

    Hi guys,
              I got some problem with handling multiple entries from database table. I am retriving four fields and an amount field from the database table and creatinf a file to upload in the application server.But the file has to be taken like below.
          If the four fields which i am retrieving are repeated then we have to take the net amount and make all the entries as one record. else if any of the four fields vary then i have to take it as a seperate record in the internal table. So how can we do this !! I have tried AT NEW and some other logics too but could get the exact one.
      Pls help me out ASAP....

    I think I may have misunderstood your problem.  If you have an exactly match(all four fields), only then you need to collect,  right?
    Try this example.
    report zrich_0002.
    data: begin of itab occurs 0,
          field1(10) type c,
          field2(10) type c,
          field3(10) type c,
          field4 type p decimals 2,
          end of itab.
    data: begin of icheck occurs 0,
          field1(10) type c,
          field2(10) type c,
          field3(10) type c,
          field4 type p decimals 2,
          end of icheck.
    data: begin of itab2 occurs 0,
          field1(10) type c,
          field2(10) type c,
          field3(10) type c,
          field4 type p decimals 2,
          end of itab2.
    start-of-selection.
      itab-field1 = 'A'.
      itab-field2 = 'B'.
      itab-field3 = 'C'.
      itab-field4 = '123.45'.
      append itab.
      itab-field1 = 'A'.
      itab-field2 = 'B'.
      itab-field3 = 'C'.
      itab-field4 = '123.45'.
      append itab.
      itab-field1 = 'A'.
      itab-field2 = 'B'.
      itab-field3 = 'C'.
      itab-field4 = '123.45'.
      append itab.
      itab-field1 = 'A'.
      itab-field2 = 'B'.
      itab-field3 = 'C'.
      itab-field4 = '678.90'.
      append itab.
      loop at itab.
        read table icheck with key field1 = itab-field1
                                   field2 = itab-field2
                                   field3 = itab-field3
                                   field4 = itab-field4.
        if sy-subrc = 0.
          move-corresponding itab to itab2.
          collect itab2.
        else.
          move-corresponding itab to icheck.
          append icheck.
          move-corresponding itab to itab2.
          append itab2.
        endif.
      endloop.
      check sy-subrc  = 0.
    Regards,
    Rich Heilman

  • How to delete entries in an internal table except for one entry

    Hi all,
    I have 4 records in my internal table and I need to delete all the  records in the internal table except the last one.How do i do this?Any sample code?
    Thanks.
    Moderator message - Please do not ask or answer basic questions - thread locked
    Edited by: Rob Burbank on Dec 16, 2009 3:23 PM

    Hi,
      use following logic:
    DATA: lt_itab type standard table.
    DATA: l_lines type i.
    DESCRIBE TABLE lt_itab lines l_lines.
    l_lines = l_lines - 1.
    delete lt_itab from 1 to l_lines.
    Regards,
      Karol

  • How to delete the entries in internal table

    Hi Experts,
    I have 2 internal tables ,
    if i find any same entries of 2 internal tables,  i have to delete that entries in first internal table.
    Regards,
    Srinivasu

    hi check this..
    report .
    data:begin of itab occurs 0,
         f1 type c ,
         f2 type i,
         end of itab .
    data:begin of itab1 occurs 0,
         f1 type c ,
         end of itab1 .
         itab-f1 = 'A'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'b'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'c'.
         itab-f2 = 12.
         append itab .
         itab1-f1 = 'A'.
         append itab1 .
    loop at itab1 .
    read table itab with key f1 = itab1-f1 .
    if sy-subrc  = 0.
    delete itab where  f1 = itab1-f1 .
    endif .
    endloop.
    loop at itab.
    write:/ itab-f1,itab-f2.
    endloop.

Maybe you are looking for

  • How do I set up HP 2540 to cell phone?

    Can't connect Android to hp2540 wirelessly

  • Dazzle Filter Freezing Render

    I'm having a strange issue where the "Dazzle" filter causes the entire system to lock up (not just FCP) at the start of rendering. The dialog box says "Writing Video" then the Beachball shows up. No percentage ever shows up. I've used it in the past,

  • AS2 adjustment

    I am using this code within a AS2 project: for(var i:uint = 1; i<=3; i++){       this["btn"+String(i)].addEventListener(MouseEvent.ROLL_OVER, bringToFront); function bringToFront(evt:MouseEvent):void {      this.setChildIndex(SimpleButton(evt.current

  • Best for display only one option

    Upgraded older mac mini to Mavericks. Previously running Lion with display at 1280x800. Now only get one setting 1024. I tried the free "Display Menu"app but same thing. Any reason for this not having more options? Thanks, Jim NVIDIA GeForce 9400:  

  • GRE tunnel

    Hi, Can i use my WAN interface ip as the GRE tunnel source ip in my cisco router. Is there any issue if i'am assigning a private ip to the GRE tunnel interface.