Memory space issue in internal table

Hi ,
My report is dumping because there is no memory space availabe for extending the memory of an internal table, after it gets filled with about 2500000 lakh records.
the dump analysis is as follows :-
Error analysis
The internal table (with the internal identifier "IT_317") could not be
enlarged any further. To enable error handling, the internal table had
to be deleted before this error log was formatted. Consequently, if you
navigate back from this error log to the ABAP Debugger, the table will
be displayed there with 0 lines.
When the program was terminated, the internal table concerned returned
the following information:
Line width: 1700
Number of lines: 106904
Allocated lines: 106904
New no. of requested lines: 8 (in 1 blocks)
How to correct the error
The amount of storage space (in bytes) filled at termination time was:
Roll area...................... 7272944
Extended memory (EM)........... 603339264
Assigned memory (HEAP)......... 396390176
Short area..................... " "
Paging area.................... 40960
Maximum address space.......... 529887568
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
Please suggest what can be done.
Regards,
Vikas Arya

Hi,
This solution might not sound good. But give a thought.
While appending data u may take more than one internal table.
Append first 10lakh records to 1st table, Second 10 lakhs to second table etc.
But from where are u getting the source data? It should be present in some internal table correct?
Probably u can use dynamic internal tables concept.
Also check ur code carefully. After the place of appending if u are not going to use any internal tables then use FREE itab
statement to free the memory allocated.
Also reduce the global declarations as much as possible
Thanks,
Vinod.

Similar Messages

  • Space issue in  Internal table

    Hi Experts,
           I Have An issue  while Appending into Internal table.
    This is an outbound interface  in which I have 7 different types of records. I am  appending all the work area to an internal table with size 500 char. the problem is that  the last field is blank in some records  the spaces are trucated.  I need  those space at the end as that file will be encrypted and send.
    Thanks in advance.
    Vijay

    Hi Madhan,
    Try below tricky code to get spaces.
    DATA: BEGIN OF t_space OCCURS 0,   " Data table
          name(10) TYPE c,
          dept(10) TYPE c,
          last_fld(480) TYPE c,   " Last field in data table, which you have to check
          END OF t_space,
          wa_space LIKE LINE OF t_space.
    DATA: str_space TYPE string.
    DATA: BEGIN OF t_final OCCURS 0,        " Final table
          text(500) TYPE c,    " Single field with length 500 characters
          END OF t_final,
          wa_final LIKE LINE OF t_final.
    "Below is tricky way to get ASCII value for space.
    " Press ALT key and hold it and now press 255 in Numeric Keypad and now release ALT key.
    "This is ASCII value for space
    CONSTANTS: ascii_space VALUE ' '.    " Give this space as mentioned in above line
    wa_space-name = 'A'. wa_space-dept = 'IT'.
    APPEND wa_space TO t_space.
    wa_space-name = 'B'. wa_space-dept = 'CSE'.
    APPEND wa_space TO t_space.
    wa_space-name = 'C'. wa_space-dept = 'EEE'.
    APPEND wa_space TO t_space.
    wa_space-name = 'D'. wa_space-dept = 'ECE'.
    APPEND wa_space TO t_space.
    IF NOT t_space[] IS INITIAL.
      DO 480 TIMES.    "  480 times because it is length of the last_fld(480) in data table. Change it according to length of your last field
        CONCATENATE str_space ascii_space INTO str_space.
      ENDDO.
    ENDIF.
    LOOP AT t_space INTO wa_space.
    CONCATENATE wa_space-name wa_space-dept INTO wa_final. "Concatenate all data fields into final workarea except final field
      IF wa_space-last_fld IS INITIAL.  " Check whether final field is empty
        CONCATENATE wa_final str_space INTO wa_final.  " Concatenate spaces at end of final work area
      ENDIF.
      APPEND wa_final TO t_final. " Append to Final table
    ENDLOOP.
    Hope you understand friend.

  • Issue In internal table data population in the o/p

    Dear Guru , I have encountered an issue for which i am not able to findout the logic  . I have an internal table through which i am populating the below data for detail report format :->
    Plant     Material Number          Storage Loc     Movement Type          Avg Days
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    020     0820B0074          MOD4          101               space
    020     0820B0074          MOD4          101               2
    020     0820B0074          MOD4          101               3
    The requirment is like this the summary report should show o/p like below addition of all the rows with respect to plant , material, storage location and movement type :-
    Plant     Material Number          Storage Loc     Movement Type          Avg Days
    019     0820B0073          MOD3          101               space
    020     0820B0074          MOD4          101               5
    but when i am adding it with respect to plant, material, storage location and movement type the o/p i am getting is like below
    Plant     Material Number          Storage Loc     Movement Type          Avg Days
    019     0820B0073          MOD3          101               0
    020     0820B0074          MOD4          101               5
    becasue addition of 5 spaces ( Avg Days )of plant 019 is coming as ZERO --> 0
    so Guru what logic i should use to get the proper o/p,..I have Used Following logic to perform summation with respect to plant, material , storage loc and movement type.
    CLEAR: wa_mkpf_mseg, w_werks, w_matnr, w_lgort, w_bwart.
    LOOP AT t_mkpf_mseg INTO wa_mkpf_mseg.   
    IF wa_mkpf_mseg-werks EQ w_werks AND wa_mkpf_mseg-matnr EQ w_matnr AND wa_mkpf_mseg-lgort EQ w_lgort AND wa_mkpf_mseg-bwart EQ w_bwart.
          CLEAR: wa_p_coi.
          READ TABLE t_p_coi INTO wa_p_coi WITH KEY werks = wa_mkpf_mseg-werks matnr = wa_mkpf_mseg-matnr lgort = wa_mkpf_mseg-lgort bwart = wa_mkpf_mseg-bwart.
         IF sy-subrc = 0.
         wa_p_coi-Avg Days    = wa_p_coi-Avg Days   + wa_mkpf_mseg-Avg Days.
         MODIFY t_p_coi FROM wa_p_coi TRANSPORTING Avg Days   .
         CLEAR: wa_p_coi, wa_p_coi.
         endif.
    ELSE.
          wa_p_coi-werks                     = wa_mkpf_mseg-werks.
          wa_p_coi-matnr                     = wa_mkpf_mseg-matnr.
          wa_p_coi-bwart                   = wa_mkpf_mseg-bwart.
          wa_p_coi-lgort                     = wa_mkpf_mseg-lgort.
          wa_p_coi-Avg Days                  = wa_mkpf_mseg-Avg Days   .
         APPEND wa_p_coi TO t_p_coi.
               CLEAR: wa_p_coi.
    ENDIF.
        w_werks = wa_mkpf_mseg-werks.
        w_matnr = wa_mkpf_mseg-matnr.
        w_lgort = wa_mkpf_mseg-lgort.
        w_bwart = wa_mkpf_mseg-bwart.
       CLEAR: wa_mkpf_mseg.
      ENDLOOP.

    The soln what i found after working out
    CLEAR: wa_mkpf_mseg, w_werks, w_matnr, w_lgort, w_bwart.
    LOOP AT t_mkpf_mseg INTO wa_mkpf_mseg.
    IF wa_mkpf_mseg-werks EQ w_werks AND wa_mkpf_mseg-matnr EQ w_matnr AND wa_mkpf_mseg-lgort EQ w_lgort AND wa_mkpf_mseg-bwart EQ w_bwart.
    CLEAR: wa_p_coi.
    READ TABLE t_p_coi INTO wa_p_coi WITH KEY werks = wa_mkpf_mseg-werks matnr = wa_mkpf_mseg-matnr lgort = wa_mkpf_mseg-lgort bwart = wa_mkpf_mseg-bwart.
    IF sy-subrc = 0.
    if wa_p_coi-Avg Days  = ' ' and wa_mkpf_mseg-Avg Days = ' '.
    wa_p_coi-Avg Days = ' '.
    ELSE
    wa_p_coi-Avg Days = wa_p_coi-Avg Days + wa_mkpf_mseg-Avg Days.
    Endif.
    MODIFY t_p_coi FROM wa_p_coi TRANSPORTING Avg Days .
    CLEAR: wa_p_coi, wa_p_coi.
    endif.
    ELSE.
    wa_p_coi-werks = wa_mkpf_mseg-werks.
    wa_p_coi-matnr = wa_mkpf_mseg-matnr.
    wa_p_coi-bwart = wa_mkpf_mseg-bwart.
    wa_p_coi-lgort = wa_mkpf_mseg-lgort.
    wa_p_coi-Avg Days = wa_mkpf_mseg-Avg Days .
    APPEND wa_p_coi TO t_p_coi.
    CLEAR: wa_p_coi.
    ENDIF.
    w_werks = wa_mkpf_mseg-werks.
    w_matnr = wa_mkpf_mseg-matnr.
    w_lgort = wa_mkpf_mseg-lgort.
    w_bwart = wa_mkpf_mseg-bwart.
    CLEAR: wa_mkpf_mseg.
    ENDLOOP.

  • How to delete space in an internal table

    Hi All,
    In internal table I want to compress the leading space
    After searching I found Condense and SHIFT LEFT DELETE leading space commands work it is written...
    but when I write code A single space is appreaing in between the two fields...can any body help me where I am going wrong??
    Ex:
    data: begin of itab occurs 1 ,
    PSAtext TYPE CHAR15,
    psa type btrtl,
    end of itab.
    now o/p BEFORE CHANGE IS :
    SBI-CT    |1023
    After condense is SBI-CT |1023
    bETWEEN SBI-CT AND | there is a additional space. How can we avoid that?
    Sas
    Edited by: saslove sap on Sep 29, 2010 7:43 AM

    Well this is what I am going to solve this
    data:begin of STRING OCCURS 1 ,
    S1 TYPE STRING,
    END OF STRING.
    loop at itab.
    concatenate itab-f1 itab-f2 into string-s1 seperated by '|'.
    append string.
    end of itab.
    then I can transfer this string to Application server.
    Thanks for all the contributions.
    Regards
    sas

  • Issue in Internal Table for calculating MAX value

    Hi Abapers,
    I have internal table with data as follows:
                         Materail                               Currency      Quantity    Dominant_Currency
    1     000000000007001896     GBP     396
    2     000000000007001896     EUR     25
    3     000000000007001310     USD      7
    4     000000000007001310     GBP     646
    5     000000000007001310     EUR     195
    6     000000000007000949     GBP     947
    7     000000000007000949     EUR     117
    Now I have to find out the max quantity for each materail and currency against max quantity which will be put in the dominat currency fields of Internal Table.
    Eg: For material 000000000007001896, 396 is the max quantity and Currency for this is GBP so dominant currency will be GBP for first 2 records.
    Similarly 646 is max for 000000000007001310 therefore GBP will be dominant curr for the records containg material 000000000007001310
    Please solve the issue.
    Regards,
    Rahul Sinha

    lv_quantity --> quantity parameter
    sort itab by matnr quantity
    loop at itab.
    at new material.
    clear lv_quantity.
    endat,
    if itab-quantity > lv_quantity.
      lv_quantity = itab-quantity.
      itab-dominant_curr = itab-curr.
      modify itab transporting dominant_curr where material = itab-material.
    endif.
    "please write  modify statement with some logic..so that it is called once for one item
    endloop.
    if you find any issue revert back.

  • Issue with Internal Table

    Hi All,
    I have defined an internal table 'with occurs 0'.
    While debuggining, i am observing that only 50,000 lines are getting populated in that internal table.
    How to increase the capacity of the internal table, so that it can hold more number of lines?
    Regards
    Pavan

    I would like to explaing you all about this issue.
    I have defined an internal table as follows...
    data:  IT_CATSDB       TYPE BAPICATS2 OCCURS 0 WITH HEADER LINE.
    I have used a BAPI called "BAPI_CATIMESHEETRECORD_GETLIST" which will retirieve the Timesheet details of all employees within a given date range.
    Now, the number of entries that we got from this BAPI are stored in the internal table it_catsdb.
    I have observed that this internal table is holding max of 50k lines.
    If i check the database table (CATSDB) for the same conditions in SE11, i am able to get around 1L lines.
    Hence my report is showing incorrect output.
    Kindly help me out with some logic, so that this internal table can hold as much as data possible without any restriction.....
    Regards
    Pavan

  • Issue regarding internal tables

    Dear all,
    My issue is that , I need to enter data into a single internal table by fetching data from two sap tables using two different selct quries. I should not use joins or for all entries. And display the internal table data in the list.
    Problem am facing is only one select query is geeting fetched and the other table data in not in the list.
    Pleas provide the possible solutions.
    Thanks & Regards,
    Madhavi.M

    DATA: BEGIN OF itab1 OCCURS 0,
          qmnum LIKE qmel-qmnum,
          qmtxt LIKE qmel-qmtxt,
          indtx LIKE qmel-indtx,
          qmdat LIKE qmel-qmdat,
          ltrmn LIKE qmel-ltrmn,
          priok LIKE qmel-priok,
          aufnr LIKE qmel-aufnr,
          bezdt LIKE qmel-bezdt,
          qmnam LIKE qmel-qmnam,
          qmart LIKE qmel-qmart,
          END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0,
          qmnum LIKE qmih-qmnum,
          btpln LIKE qmih-btpln,
          ingrp LIKE qmih-ingrp,
          END OF itab2.
    DATA : itab3 TYPE TABLE OF z_notif WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS : notnum FOR qmel-qmnum OBLIGATORY,
                     notype FOR qmel-qmart,
                     floc FOR qmih-btpln,
                     name FOR qmel-qmnam.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    To fetch the values in the internal table ****************
    from ztable corresponding to the entries made *************
    by the user in the selection screen ******************
    SELECT qmnum qmtxt indtx qmdat ltrmn priok aufnr bezdt qmnam qmart INTO
    TABLE itab1 FROM qmel WHERE qmnum IN notnum
    AND qmart IN notype AND qmnam IN name.
    SELECT qmnum btpln ingrp INTO TABLE itab2 FROM qmih FOR ALL ENTRIES IN
    itab1 WHERE qmnum = itab1-qmnum AND btpln IN floc.
    To move the contents of ITAB1 to ITAB3 ***************
        LOOP AT itab1.
          itab3-qmnum = itab1-qmnum.
          itab3-qmtxt = itab1-qmtxt.
          itab3-indtx = itab1-indtx.
          itab3-qmdat = itab1-qmdat.
          itab3-ltrmn = itab1-ltrmn.
          itab3-priok = itab1-priok.
          itab3-aufnr = itab1-aufnr.
          itab3-bezdt = itab1-bezdt.
          itab3-qmnam = itab1-qmnam.
          itab3-qmart = itab1-qmart.
          READ TABLE itab2 WITH KEY qmnum = itab1-qmnum.
    To move the contents of ITAB2 to ITAB3 ***************
          itab3-btpln = itab2-btpln.
          itab3-ingrp = itab2-ingrp.
          APPEND itab3.
        ENDLOOP.
    have a look at this example this may help you.....
    reward if helpful.....

  • Issue with internal table in object oriented ABAP.

    Hello Gurus,
    I am having trouble defining internal table in Object oriented ABAP. for following:
    DATA: BEGIN OF IT_TAB OCCURS 0.
            INCLUDE STRUCTURE ZCUSTOM.
    DATA    tot_sum   TYPE char40.
    DATA END OF IT_TAB.
    Can someone help ?
    Regards,
    Jainam.
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Moderator message - Please post in the correct forum. You can easily find out for yourself by looking at SAP help for internal tables using OOP - thread locked
    Edited by: Rob Burbank on Feb 5, 2010 2:49 PM

    No, you can not declare internal table with header line in OO context. You have to declare the work are/header line separately
    Example:
    TYPES: BEGIN OF ty_it_tab.
            INCLUDE STRUCTURE mara.
    TYPES:  tot_sum TYPE char40.
    TYPES: END OF ty_it_tab.
    DATA: it_tab TYPE STANDARD TABLE  OF ty_it_tab.
    DATA: wk_tab TYPE ty_it_tab.
    LOOP AT it_tab INTO wk_tab.
    ENDLOOP.
    Edited by: Dean Q on Feb 5, 2010 8:50 PM

  • Limit on the memory/size of the internal table

    Hi,
    Is there any limit on the size of internal table....?
    we are having some select statements that are fetching huge no. of records into the internal tables...
    can some of the records be missed  or is there any limit on the no. of records or size of the internal table...
    The code that we are using is logically correct and it is working fine for small inputs but for the large selections, some of the records are getting missed as we are displaying the data from these internal tables only...
    We can not debug the code coz for the large inputs, code is taking around 2 to 3 hours of processing
    We are using this code in BI in the end routines
    We are doing the operation like
    itab1 = itab2
    where itab2 contains around 25000 records and itab1 is initial(no entries)
    If there is a limit , then how can we increase the size
    Please suggest..
    Thanks
    Tarun Brijwani
    Edited by: Tarun Brijwani on Apr 23, 2009 6:06 PM
    Edited by: Tarun Brijwani on Apr 23, 2009 6:06 PM

    Hello Tarun
    You can limit the number of records selected by your SELECT statement by adding the addition "UP TO n ROWS" to your SELECT statement.
    Example:
    SELECT * FROM TABLEXYZ UP TO 5000 ROWS WHERE .........
    Hope this helps you.
    Thanks and best regards
    Anand.

  • Logic issue with Internal Table

    Hi All,
    I have an internal table with following structure.
    Name of Internal table: ITAB
    Fields:   userid      login date     number
    Values:  abc         01012008    
                 abc         02012008
                 abc         02012008
                 abc         03012008
    Now i should store the value for the field itab-number, based on the ita-logindate.
    If the field logindate is having same date for 2 times (for the user 'abc'),
    the field itab-number should have the value as '2' .
    Basically i want to display a report to show how many times a user has logged into SAP system for a given date.......
    How to incorporate this logic?
    Regards
    Pavan

    Hi,
    Use the below logic.
    data: begin of itab1 occurs 0,
           uid  like sy-uname,
           date like sy-datum,
          end of itab1.
    data: begin of itab2 occurs 0,
           uid  like sy-uname,
           date like sy-datum,
           count type i,
          end of itab2.
    data v_count type i.
    start-of-selection.
    itab1-uid = 'abc'.
    itab1-date = '20080101'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080102'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080102'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080103'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080104'.
    append itab1.
    sort itab1 by uid date.
    loop at itab1.
    v_count = v_count + 1.
    at end of date.
    itab2-uid = itab1-uid.
    itab2-date = itab1-date.
    itab2-count = v_count.
    append itab2.
    clear  v_count.
    endat.
    endloop.

  • Performance issue in internal tables

    Hi,
    I am having an internal table with large volume (around 10  Lacs ) of records. Right now it has been sorted with required fields and using the same fileds in the where condtion of loop. But it is taking lot of time to read the records while loop the internal table.
    Could you please suggest the best way to read the internal table so that read time should be reduced.
    Points will be assinged for the better soultions.
    Thanks  in Advance,
    Chandra Mohan Vempati

    Hi..
    When you execute a LOOP using WHERE condition, it will actually process all the rows from first row to Last row.
    To Avoid this we have to use LOOP AT IT_VBAK from <row> .
    Try this code .. it will surely improve the performance.
    For eg IT_VBAK is my internal table with 10 lacks records .
    But i want to process only records with KUNNR = 1000.
    DATA: V_START TYPE I.
    DATA : V_KUNNR TYPE VBAK-KUNNR.
    SORT IT_VBAK BY KUNNR.
    READ TABLE IT_VBAK INTO WA_VBAK
       with KEY KUNNR = '0000001000'
       TRANPORTING NO FIELDS
       BINARY SEARCH.
    IF SY-SUBRC = 0.
      V_START = SY-TABIX.  "Capture the row position of first row
      V_KUNNR = WA_VBAK-KUNNR.
      LOOP AT IT_VBAK INTO WA_VBAK
                                    From V_START.
    **Terminate the loop after the completion of the records for the KUNNR
         IF  WA_VBAK-KUNNR <> V_KUNNR.
           EXIT.
         ENDIF.
    **Process the records here      
    WRITE:/ WA_VBAK-VBELN,
                 WA_VBAK-VKORG.
       ENDLOOP.  
    ENDLOOP.
    <b>Reward if Helpful</b>

  • AT END OF  Issue in internal tables

    Hi all,
    My requirement is I have to sum all the VBRP-NETWR and VBRP-WAVWR Fields and move it to one table.
    example;
    AT END OF pernr.
       SUM.
    here I have to move the total value of VBRP-NETWR and *VBRP-WAVWR values to internal table fields (i.e *tab_item-netwr & tab_item-wavwr, how can we do this
    ENDAT.
    Please help me.
    Thanks & Regards,
    Sivaram Kandula

    Hi,
    sort tab_item by pernr.
    loop at tab_item.
      v_total_netwr = v_total_netwr + tab_item-netwr.
      v_total_wavwr = v_total_wavwr + tab_item-wavwr)
      At end of pernr.
        move 'Y; to v_flg.
      endat.
      if v_flg eq 'Y'.
         move v_total_netwr to another internal table and append
         move v_total_wavwr to another internal table and append
         clear: v_flg. clear : v_total_netwr, v_total_wavwr.
      endif.
    endloop.
    Thanks
    aRs

  • SUM issue in Internal table

    Hi All,
    I have an internal table as follows.
    Now if the KUNNR, PRCTR and VERNA field are similar, i have to sum up the QTY columns accordingly.
    I mean to say, in this case, the rows 1, 2 and 3 have same kunnr, prctr and verna fields. Henc ei should sum up the corresponding columns (qty1, qty2, qty3 and SUM) and make it as one row.
    kunnr  |    prctr    |   verna  |   qty1  |  qty2  |    qty3  |  sum
    11       |    100      |  Raj     | 10.0   |  5.0     |   0.0    |  15.0
    11       |   100       |  Raj     | 8.0     |  1.0     |   2.0    |  11.0
    11       |    100      |  Raj     | 0.0     |  0.0     |   6.5    |  6.5
    12       |    200      |  Ram   | 2.0     |  0.0     |   0.0    |  2.0
    How to carry out this calculation....???
    Regards
    Pavan

    Hi Friend,
               Use the Control Break Statement for this,  Go through the following steps
    1.     Sort  the Internal Table
    2.     Loop the Internal Table
    3.     Use the Control Break Statement
    4.     Sum
    5.    Write Statement
    6.     Endloop.                                      
    Ex.
    sort itab.
    loop at itab.
       at end of kunnr.
               sum.
      write:  'mara-kunnr'.
    endat.
    endloop.
    Hope the answer of your question.
    Regards,
    Md Ziauddin.
    Edited by: MD ZIAUDDIN on Dec 31, 2008 7:40 PM

  • How internal tables are physicaly located in memory?

    Array, chained list, or else? Plese provide any opinion or documentation.
    Sincerely yours, Long Nguyen.

    A data model is an abstraction of a part of the real world which is represented using formal structures. A relational database basically uses one formal structure known as a table.
    A table can be defined as a two-dimensional matrix made of rows and columns. It can also be described as a group of records of the same type.Records are groups of fields based on existing data types. These data types are previously defined in the datadictionary. A table is a similar concept to a conventional indexed file; the difference is that in the relational model the main index is known as the primary key, which is made of one or more fields of the record. A record is also known as tuple or simply a row. The most significant feature of the primary key is that it identifies univocally one and only one record of the table: a table does not permit records with duplicated primary keys.
    Structures. The object structure refers to the definition of a compound object that does not have any content. It's like a table or a view, but it never has entries: it's only a structure. These types of objects are used in programs for defining data structures or for defining data in the interfaces from the module pools and the screens. The basic difference between structures and tables (or views) is that the
    structure does not exist at the underlying database system level; however, both tables and views do exist in the database. Structures only exist as definitions in the dictionary. As a result, structures do not need to be activated.
    Table. As previously explained, a table is a two-dimensional data matrix. A table can contain zero or many rows, corresponding to the predefined table structure (entity type). This is, at the same time, a complex structure, which can be made up of one or several fields (attributes). Every row that makes up the database table has the same structure and properties. The fields that make up the structure of the table records, as well as its attributes, permitted value range, and so on, are set when defining the table.
    Some general recommendations for internal tables:
    •     As long as all that you need from an internal table is to append lines to it and perhaps to sort it after filling it, standard tables are still the best choice. The other table kinds are too expen-sive for these simple tasks. Keep in mind that when inserting or deleting lines in index tables containing many lines, the administration of the logical index that manages the lines of the ta-ble internally can become expensive, with regard to performance and additional memory space. Only for standard tables that are filled with APPEND only, and where no lines are de-leted except for the last line, is there no need for a logical index, and hence
    no additional costs are incurred.
    •If memory space is an issue, for very large internal tables (> 500000 lines) with a
    small line size, sorted tables might be preferable to hashed tables, since for internal administration, they need only 6 bytes per line compared to 18 bytes for hashed tables.
    •When declaring internal tables, use the addition INITIAL SIZE only for inner tables in nested tables. For outer tables, the automatic allocation of initial memory size is appropriate. For inner tables, though, it may result in saving a large amount of memory.
    •When reading internal tables with READ TABLE or LOOP AT, choose the appropriate output behavior. Writing into a work area wa with the addition INTO wa is only necessary if you want to change the work area without influencing the internal table. For pure reading purposes or for modifying the contents of the internal table, the additions ASSIGNING <fs> for assigning internal table lines to a field symbol <fs> and REFERENCE INTO dref for setting a refer-ence in a data reference variable dref to internal table lines are the better choices by far.
    •Use CLEAR instead of REFRESH for internal tables. The reason is that for internal tables with-out header lines, the general statement CLEAR does exactly the same as the special state-ment REFRESH. Since internal tables with header lines should no longer be used, the state-ment REFRESH is effectively obsolete. In order to free more memory, you can consider the use of FREE.
    •The statement COLLECT should no longer be used for standard tables — use COLLECT mainly for hashed tables. The reason is that COLLECT is based on a hash algorithm. While the hash administration of a hashed table is always available and robust, for standard tables a temporary hash administration must be created when the COLLECT statement is used. This temporary hash administration is invalidated when the table is accessed for changing. If fur-ther COLLECT statements are entered after an invalidation, a linear search of all table rows must be performed. Furthermore, COLLECT only works properly on internal tables with unique lines, while a unique table key is guaranteed for hashed tables only. Therefore, for standard tables it cannot be guaranteed that the contents will always be suitable for editing using COLLECT.
    •Don’t use APPEND SORTED BY — use SORT instead. The reason is that creating a ranked list with APPEND SORTED BY is based on several assumptions about the internal table and how it is filled. Using SORT is the general method that can be applied to all kinds of table and inde-pendent from the mode of filling.
    Chk these links for more information about internal tables
    internal tables
    Regards,
    Balaji Reddy G
    **Rewards for helpful answers

  • Exporting internal table to memory variable

    I need to extract some data within a program into an internal table. Then I need to export the internal table into a memory variable
    Then in another program i need to import this memory variable into another internal table
    How to do the import export into a memory variable

    See the simple example :
    REPORT  ZTEST_AMEM1.
    tables : lfa1.
    data : begin of i_lfa1 occurs 0 ,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of i_lfa1.
    start-of-selection.
    select lifnr
           name1
           land1 from lfa1
           into table i_lfa1 up to 100 rows.
    Export
    export i_lfa1 to memory id 'SAP'.
    submit ztest_amem2 and return.
    write:/ 'hello'.
    *& Report  ZTEST_AMEM2
    REPORT  ZTEST_AMEM2.
    data : begin of j_lfa1 occurs 0,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of j_lfa1.
    start-of-selection.
    import i_lfa1 to j_lfa1 from memory id 'SAP'.
    loop at j_lfa1.
    write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.
    endloop.

Maybe you are looking for

  • I continue to be unable to access any of my iBooks on my new iPad 2, even though I've updated to iOS 8.1.2. Any thoughts?

    I upgraded to an ipad 2 around the same time as I upgraded to iOS 8.1, and I haven't been able to access any of my iBooks from my previous ipad. They are present in my iTunes. They all appear in my ipad's iBook app, but they're all grayed out. I have

  • ITunes 10.6.1.7 after install error

    I have installed the latest update to 10.6.1.7 it was successful but I now get the following error "a required iTunes component is not installed.  Please repair or reinstall iTunes (-42404).  I have done both repaired and reinstallation.  Still getti

  • Re-installing after macbook rebuild serial number not working

    My macbook had to be rebuilt due to a software problem. Lightroom 5 has been deleted. I tried re-installing lightroom (downloaded) and can use the trial version etc. However, when I tried to put my serial number in, it did not work. This is probably

  • GWPA for HTML5 in Eclipse - Generated program not working

    I have been using GWPA to create test front-ends for my GW services in HANA Studio for months.  From workflow to simple services exposing cost centers, etc.  After an update to HANA Studio everything is broken.  All I have are warnings in the JAVA co

  • Header and Item data in a module pool

    Hi Friends, I designed a screen in that i have header data and item data. Here in my screen header i have vendor number,Vendor name, bank Name, Branch, LC value and Due date fields. and for item details i have to take table control.In the item detail